diff --git a/.github/renovate.json b/.github/renovate.json index 21e94b4a890..4a2ee83be34 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -12,8 +12,7 @@ "commitMessageAction": "update", "groupName": "all", "ignoreDeps": [ - "google.golang.org/appengine", - "google.golang.org/grpc" + "google.golang.org/appengine" ], "packageRules": [ { @@ -26,7 +25,7 @@ ], "force": { "constraints": { - "go": "1.20" + "go": "1.21" } } } diff --git a/CHANGES.md b/CHANGES.md index 402ad338014..ba6e9a56839 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,41 @@ # Changes +## [0.195.0](https://github.com/googleapis/google-api-go-client/compare/v0.194.0...v0.195.0) (2024-08-28) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#2750](https://github.com/googleapis/google-api-go-client/issues/2750)) ([6bdae51](https://github.com/googleapis/google-api-go-client/commit/6bdae51c0ef535dcba79f6299f1b6040c189a155)) +* **all:** Auto-regenerate discovery clients ([#2752](https://github.com/googleapis/google-api-go-client/issues/2752)) ([5b1ebe2](https://github.com/googleapis/google-api-go-client/commit/5b1ebe2dd1516dfe42e73205992f741a885658da)) +* **all:** Auto-regenerate discovery clients ([#2753](https://github.com/googleapis/google-api-go-client/issues/2753)) ([70a68c2](https://github.com/googleapis/google-api-go-client/commit/70a68c2fb4fb4f05a35c726109b0d8087cf6e572)) +* **all:** Auto-regenerate discovery clients ([#2755](https://github.com/googleapis/google-api-go-client/issues/2755)) ([3f3bd66](https://github.com/googleapis/google-api-go-client/commit/3f3bd668270c5baff4e058dd572ba85cd12ead4d)) +* **all:** Auto-regenerate discovery clients ([#2756](https://github.com/googleapis/google-api-go-client/issues/2756)) ([e907e01](https://github.com/googleapis/google-api-go-client/commit/e907e01d29910f6480adcfa4054cfc9809fb36fe)) +* **all:** Auto-regenerate discovery clients ([#2759](https://github.com/googleapis/google-api-go-client/issues/2759)) ([04cbad8](https://github.com/googleapis/google-api-go-client/commit/04cbad81acfcb65b90194782cc369506febd854f)) + +## [0.194.0](https://github.com/googleapis/google-api-go-client/compare/v0.193.0...v0.194.0) (2024-08-22) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#2746](https://github.com/googleapis/google-api-go-client/issues/2746)) ([5d61f08](https://github.com/googleapis/google-api-go-client/commit/5d61f08943c359fa97c9764f9e7e6592894b251e)) + + +### Bug Fixes + +* **gen:** Change HttpBody.Data from string to any for monitoring:v1 ([#2744](https://github.com/googleapis/google-api-go-client/issues/2744)) ([eda6a59](https://github.com/googleapis/google-api-go-client/commit/eda6a594194b59d5089c3bfbe52bd125a542da4e)), refs [#2304](https://github.com/googleapis/google-api-go-client/issues/2304) + +## [0.193.0](https://github.com/googleapis/google-api-go-client/compare/v0.192.0...v0.193.0) (2024-08-20) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#2733](https://github.com/googleapis/google-api-go-client/issues/2733)) ([4118ec2](https://github.com/googleapis/google-api-go-client/commit/4118ec2221db4788e545eb530f2ae777b18228d3)) +* **all:** Auto-regenerate discovery clients ([#2736](https://github.com/googleapis/google-api-go-client/issues/2736)) ([6b81f1a](https://github.com/googleapis/google-api-go-client/commit/6b81f1a4b92de2d536ff7a7d8ef95e15c52baf3f)) +* **all:** Auto-regenerate discovery clients ([#2737](https://github.com/googleapis/google-api-go-client/issues/2737)) ([a2308c1](https://github.com/googleapis/google-api-go-client/commit/a2308c1bd2489b55de42a9373a8277739d0a46b1)) +* **all:** Auto-regenerate discovery clients ([#2738](https://github.com/googleapis/google-api-go-client/issues/2738)) ([7296c72](https://github.com/googleapis/google-api-go-client/commit/7296c7296923910d9d34afd20674e8798883b8d2)) +* **all:** Auto-regenerate discovery clients ([#2739](https://github.com/googleapis/google-api-go-client/issues/2739)) ([9d915ff](https://github.com/googleapis/google-api-go-client/commit/9d915ffa9833eeedd85aba44aa6a60b40c823ffc)) +* **all:** Auto-regenerate discovery clients ([#2742](https://github.com/googleapis/google-api-go-client/issues/2742)) ([cb825c8](https://github.com/googleapis/google-api-go-client/commit/cb825c892c853d8731c2e1103fba6c9c7bcd0dc4)) + ## [0.192.0](https://github.com/googleapis/google-api-go-client/compare/v0.191.0...v0.192.0) (2024-08-13) diff --git a/accessapproval/v1/accessapproval-api.json b/accessapproval/v1/accessapproval-api.json index 5736aa95ff0..907b24056fc 100644 --- a/accessapproval/v1/accessapproval-api.json +++ b/accessapproval/v1/accessapproval-api.json @@ -913,7 +913,7 @@ } } }, - "revision": "20240607", + "revision": "20240820", "rootUrl": "https://accessapproval.googleapis.com/", "schemas": { "AccessApprovalServiceAccount": { @@ -1076,6 +1076,10 @@ "format": "google-datetime", "type": "string" }, + "requestedAugmentedInfo": { + "$ref": "AugmentedInfo", + "description": "This field contains the augmented information of the request." + }, "requestedDuration": { "description": "The requested access duration.", "format": "google-duration", @@ -1147,6 +1151,17 @@ }, "type": "object" }, + "AugmentedInfo": { + "description": "This field contains the augmented information of the request.", + "id": "AugmentedInfo", + "properties": { + "command": { + "description": "For command-line tools, the full command-line exactly as entered by the actor without adding any additional characters (such as quotation marks).", + "type": "string" + } + }, + "type": "object" + }, "DismissApprovalRequestMessage": { "description": "Request to dismiss an approval request.", "id": "DismissApprovalRequestMessage", diff --git a/accessapproval/v1/accessapproval-gen.go b/accessapproval/v1/accessapproval-gen.go index df5832b8793..6bd7f701b01 100644 --- a/accessapproval/v1/accessapproval-gen.go +++ b/accessapproval/v1/accessapproval-gen.go @@ -443,6 +443,9 @@ type ApprovalRequest struct { Name string `json:"name,omitempty"` // RequestTime: The time at which approval was requested. RequestTime string `json:"requestTime,omitempty"` + // RequestedAugmentedInfo: This field contains the augmented information of the + // request. + RequestedAugmentedInfo *AugmentedInfo `json:"requestedAugmentedInfo,omitempty"` // RequestedDuration: The requested access duration. RequestedDuration string `json:"requestedDuration,omitempty"` // RequestedExpiration: The original requested expiration for the approval. @@ -539,6 +542,30 @@ func (s ApproveDecision) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AugmentedInfo: This field contains the augmented information of the request. +type AugmentedInfo struct { + // Command: For command-line tools, the full command-line exactly as entered by + // the actor without adding any additional characters (such as quotation + // marks). + Command string `json:"command,omitempty"` + // ForceSendFields is a list of field names (e.g. "Command") 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. "Command") 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 AugmentedInfo) MarshalJSON() ([]byte, error) { + type NoMethod AugmentedInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DismissApprovalRequestMessage: Request to dismiss an approval request. type DismissApprovalRequestMessage struct { } diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index cebc85a349e..c2feac876e6 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1290,7 +1290,7 @@ } } }, - "revision": "20240716", + "revision": "20240811", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1705,7 +1705,7 @@ "id": "EgressFrom", "properties": { "identities": { - "description": "A list of identities that are allowed access through [EgressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", + "description": "A list of identities that are allowed access through [EgressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. For third-party identity, only single identities are supported and other identity types are not supported. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, and `principal` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", "items": { "type": "string" }, @@ -1904,7 +1904,7 @@ "id": "IngressFrom", "properties": { "identities": { - "description": "A list of identities that are allowed access through [IngressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", + "description": "A list of identities that are allowed access through [IngressPolicy]. Identities can be an individual user, service account, Google group, or third-party identity. For third-party identity, only single identities are supported and other identity types are not supported. The `v1` identities that have the prefix `user`, `group`, `serviceAccount`, and `principal` in https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported.", "items": { "type": "string" }, diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index c656bcdada7..8485702a802 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -889,9 +889,11 @@ func (s DevicePolicy) MarshalJSON() ([]byte, error) { type EgressFrom struct { // Identities: A list of identities that are allowed access through // [EgressPolicy]. Identities can be an individual user, service account, - // Google group, or third-party identity. The `v1` identities that have the - // prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in - // https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported. + // Google group, or third-party identity. For third-party identity, only single + // identities are supported and other identity types are not supported. The + // `v1` identities that have the prefix `user`, `group`, `serviceAccount`, and + // `principal` in https://cloud.google.com/iam/docs/principal-identifiers#v1 + // are supported. Identities []string `json:"identities,omitempty"` // IdentityType: Specifies the type of identities that are allowed access to // outside the perimeter. If left unspecified, then members of `identities` @@ -1229,9 +1231,11 @@ func (s GetPolicyOptions) MarshalJSON() ([]byte, error) { type IngressFrom struct { // Identities: A list of identities that are allowed access through // [IngressPolicy]. Identities can be an individual user, service account, - // Google group, or third-party identity. The `v1` identities that have the - // prefix `user`, `group`, `serviceAccount`, `principal`, and `principalSet` in - // https://cloud.google.com/iam/docs/principal-identifiers#v1 are supported. + // Google group, or third-party identity. For third-party identity, only single + // identities are supported and other identity types are not supported. The + // `v1` identities that have the prefix `user`, `group`, `serviceAccount`, and + // `principal` in https://cloud.google.com/iam/docs/principal-identifiers#v1 + // are supported. Identities []string `json:"identities,omitempty"` // IdentityType: Specifies the type of identities that are allowed access from // outside the perimeter. If left unspecified, then members of `identities` diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 9842240bbdc..73eec00f87c 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -305,6 +305,491 @@ }, "protocol": "rest", "resources": { + "datasets": { + "methods": { + "create": { + "description": "Creates a Dataset.", + "flatPath": "v1/datasets", + "httpMethod": "POST", + "id": "aiplatform.datasets.create", + "parameterOrder": [], + "parameters": { + "parent": { + "description": "Required. The resource name of the Location to create the Dataset in. Format: `projects/{project}/locations/{location}`", + "location": "query", + "type": "string" + } + }, + "path": "v1/datasets", + "request": { + "$ref": "GoogleCloudAiplatformV1Dataset" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Dataset.", + "flatPath": "v1/datasets/{datasetsId}", + "httpMethod": "DELETE", + "id": "aiplatform.datasets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Dataset.", + "flatPath": "v1/datasets/{datasetsId}", + "httpMethod": "GET", + "id": "aiplatform.datasets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Dataset resource.", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Datasets in a Location.", + "flatPath": "v1/datasets", + "httpMethod": "GET", + "id": "aiplatform.datasets.list", + "parameterOrder": [], + "parameters": { + "filter": { + "description": "An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `display_name`: supports = and != * `metadata_schema_uri`: supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. Some examples: * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"`", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `display_name` * `create_time` * `update_time`", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the Dataset's parent resource. Format: `projects/{project}/locations/{location}`", + "location": "query", + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/datasets", + "response": { + "$ref": "GoogleCloudAiplatformV1ListDatasetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Dataset.", + "flatPath": "v1/datasets/{datasetsId}", + "httpMethod": "PATCH", + "id": "aiplatform.datasets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the Dataset.", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see google.protobuf.FieldMask. Updatable fields: * `display_name` * `description` * `labels`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1Dataset" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "datasetVersions": { + "methods": { + "create": { + "description": "Create a version from a Dataset.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions", + "httpMethod": "POST", + "id": "aiplatform.datasets.datasetVersions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the Dataset resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/datasetVersions", + "request": { + "$ref": "GoogleCloudAiplatformV1DatasetVersion" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Dataset version.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "DELETE", + "id": "aiplatform.datasets.datasetVersions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset version to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Dataset version.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset version to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1DatasetVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists DatasetVersions in a Dataset.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The standard list filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The standard list page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Dataset to list DatasetVersions from. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Optional. Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/datasetVersions", + "response": { + "$ref": "GoogleCloudAiplatformV1ListDatasetVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a DatasetVersion.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "PATCH", + "id": "aiplatform.datasets.datasetVersions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the DatasetVersion.", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see google.protobuf.FieldMask. Updatable fields: * `display_name`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1DatasetVersion" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1DatasetVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a dataset version.", + "flatPath": "v1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}:restore", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.restore", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DatasetVersion resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:restore", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "endpoints": { + "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1/endpoints/{endpointsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.endpoints.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1/endpoints/{endpointsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.endpoints.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateContent": { + "description": "Generate content with multimodal inputs.", + "flatPath": "v1/endpoints/{endpointsId}:generateContent", + "httpMethod": "POST", + "id": "aiplatform.endpoints.generateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+model}:generateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1/endpoints/{endpointsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.endpoints.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, "projects": { "resources": { "locations": { @@ -3288,7 +3773,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -3543,7 +4028,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -13188,7 +13673,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", "required": true, @@ -13304,7 +13789,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", "required": true, @@ -16919,6 +17404,91 @@ "resources": { "models": { "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1/publishers/{publishersId}/models/{modelsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1/publishers/{publishersId}/models/{modelsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateContent": { + "description": "Generate content with multimodal inputs.", + "flatPath": "v1/publishers/{publishersId}/models/{modelsId}:generateContent", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.generateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+model}:generateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, "get": { "description": "Gets a Model Garden publisher model.", "flatPath": "v1/publishers/{publishersId}/models/{modelsId}", @@ -16928,6 +17498,11 @@ "name" ], "parameters": { + "huggingFaceToken": { + "description": "Optional. Token used to access Hugging Face gated models.", + "location": "query", + "type": "string" + }, "isHuggingFaceModel": { "description": "Optional. Boolean indicates whether the requested model is a Hugging Face model.", "location": "query", @@ -16970,13 +17545,42 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1/publishers/{publishersId}/models/{modelsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] } } } } } }, - "revision": "20240727", + "revision": "20240816", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -18559,6 +19163,12 @@ "description": "A response candidate generated from the model.", "id": "GoogleCloudAiplatformV1Candidate", "properties": { + "avgLogprobs": { + "description": "Output only. Average log probability score of the candidate.", + "format": "double", + "readOnly": true, + "type": "number" + }, "citationMetadata": { "$ref": "GoogleCloudAiplatformV1CitationMetadata", "description": "Output only. Source attribution of the generated content.", @@ -18592,7 +19202,7 @@ "The finish reason is unspecified.", "Token generation reached a natural stopping point or a configured stop sequence.", "Token generation reached the configured maximum output tokens.", - "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, Candidate.content is empty if content filters blocks the output.", + "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, content is empty if content filters blocks the output.", "Token generation stopped because the content potentially contains copyright violations.", "All other reasons that stopped the token generation.", "Token generation stopped because the content contains forbidden terms.", @@ -20717,6 +21327,16 @@ "format": "int32", "type": "integer" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "updateTime": { "description": "Output only. Timestamp when this EntityType was most recently updated.", "format": "google-datetime", @@ -20825,6 +21445,10 @@ "$ref": "GoogleCloudAiplatformV1GroundednessInput", "description": "Input for groundedness metric." }, + "pairwiseMetricInput": { + "$ref": "GoogleCloudAiplatformV1PairwiseMetricInput", + "description": "Input for pairwise metric." + }, "pairwiseQuestionAnsweringQualityInput": { "$ref": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput", "description": "Input for pairwise question answering quality metric." @@ -20833,6 +21457,10 @@ "$ref": "GoogleCloudAiplatformV1PairwiseSummarizationQualityInput", "description": "Input for pairwise summarization quality metric." }, + "pointwiseMetricInput": { + "$ref": "GoogleCloudAiplatformV1PointwiseMetricInput", + "description": "Input for pointwise metric." + }, "questionAnsweringCorrectnessInput": { "$ref": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput", "description": "Input for question answering correctness metric." @@ -20916,6 +21544,10 @@ "$ref": "GoogleCloudAiplatformV1GroundednessResult", "description": "Result for groundedness metric." }, + "pairwiseMetricResult": { + "$ref": "GoogleCloudAiplatformV1PairwiseMetricResult", + "description": "Result for pairwise metric." + }, "pairwiseQuestionAnsweringQualityResult": { "$ref": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult", "description": "Result for pairwise question answering quality metric." @@ -20924,6 +21556,10 @@ "$ref": "GoogleCloudAiplatformV1PairwiseSummarizationQualityResult", "description": "Result for pairwise summarization quality metric." }, + "pointwiseMetricResult": { + "$ref": "GoogleCloudAiplatformV1PointwiseMetricResult", + "description": "Generic metrics. Result for pointwise metric." + }, "questionAnsweringCorrectnessResult": { "$ref": "GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult", "description": "Result for question answering correctness metric." @@ -22242,6 +22878,20 @@ "type": "string" }, "type": "array" + }, + "timeSeries": { + "$ref": "GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries", + "description": "Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureView ) will treat time-series sources. If not set, will treat the source as a time-series source with `feature_timestamp` as timestamp column and no scan boundary." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries": { + "id": "GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries", + "properties": { + "timestampColumn": { + "description": "Optional. Column hosting timestamp values for a time-series source. Will be used to determine the latest `feature_values` for each entity. Optional. If not provided, column named `feature_timestamp` of type `TIMESTAMP` will be used.", + "type": "string" } }, "type": "object" @@ -22344,6 +22994,16 @@ "$ref": "GoogleCloudAiplatformV1FeatureOnlineStoreOptimized", "description": "Contains settings for the Optimized store that will be created to serve featureValues for all FeatureViews under this FeatureOnlineStore. When choose Optimized storage type, need to set PrivateServiceConnectConfig.enable_private_service_connect to use private endpoint. Otherwise will use public endpoint by default." }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. State of the featureOnlineStore.", "enum": [ @@ -22613,6 +23273,16 @@ "description": "Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "syncConfig": { "$ref": "GoogleCloudAiplatformV1FeatureViewSyncConfig", "description": "Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving." @@ -22802,6 +23472,16 @@ "description": "Output only. Time when this FeatureViewSync is finished.", "readOnly": true }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "syncSummary": { "$ref": "GoogleCloudAiplatformV1FeatureViewSyncSyncSummary", "description": "Output only. Summary of the sync job.", @@ -22831,6 +23511,11 @@ "readOnly": true, "type": "string" }, + "systemWatermarkTime": { + "description": "Lower bound of the system time watermark for the sync job. This is only set for continuously syncing feature views.", + "format": "google-datetime", + "type": "string" + }, "totalSlot": { "description": "Output only. BigQuery slot milliseconds consumed for the sync job.", "format": "int64", @@ -22879,6 +23564,16 @@ "format": "int32", "type": "integer" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. State of the featurestore.", "enum": [ @@ -23459,9 +24154,9 @@ ], "enumDescriptions": [ "Unspecified function calling mode. This value should not be used.", - "Default model behavior, model decides to predict either a function call or a natural language repspose.", - "Model is constrained to always predicting a function call only. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\".", - "Model will not predict any function call. Model behavior is same as when not passing any function declarations." + "Default model behavior, model decides to predict either function calls or natural language response.", + "Model is constrained to always predicting function calls only. If \"allowed_function_names\" are set, the predicted function calls will be limited to any one of \"allowed_function_names\", else the predicted function calls will be any one of the provided \"function_declarations\".", + "Model will not predict any function calls. Model behavior is same as when not passing any function declarations." ], "type": "string" } @@ -23644,7 +24339,7 @@ "type": "integer" }, "promptTokenCount": { - "description": "Number of tokens in the request.", + "description": "Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.", "format": "int32", "type": "integer" }, @@ -23691,6 +24386,11 @@ "$ref": "GoogleCloudAiplatformV1GenerationConfigRoutingConfig", "description": "Optional. Routing configuration." }, + "seed": { + "description": "Optional. Seed.", + "format": "int32", + "type": "integer" + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -23717,7 +24417,7 @@ "type": "object" }, "GoogleCloudAiplatformV1GenerationConfigRoutingConfig": { - "description": "Routing config.", + "description": "The configuration for routing the request to a specific model.", "id": "GoogleCloudAiplatformV1GenerationConfigRoutingConfig", "properties": { "autoMode": { @@ -23759,7 +24459,7 @@ "id": "GoogleCloudAiplatformV1GenerationConfigRoutingConfigManualRoutingMode", "properties": { "modelName": { - "description": "The model name to use. Only the public LLM models are accepted. e.g. gemini-1.5-pro-001.", + "description": "The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'.", "type": "string" } }, @@ -24404,6 +25104,16 @@ "readOnly": true, "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "updateTime": { "description": "Output only. Timestamp when this Index was most recently updated. This also includes any update to the contents of the Index. Note that Operations working on this Index may have their Operations.metadata.generic_metadata.update_time a little after the value of this timestamp, yet that does not mean their results are not already reflected in the Index. Result of any successfully completed Operation on the Index is reflected in it.", "format": "google-datetime", @@ -24629,6 +25339,16 @@ "description": "Optional. If true, the deployed index will be accessible through public endpoint.", "type": "boolean" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "updateTime": { "description": "Output only. Timestamp when this IndexEndpoint was last updated. This timestamp is not updated when the endpoint's DeployedIndexes are updated, e.g. due to updates of the original Indexes they are the deployments of.", "format": "google-datetime", @@ -26653,6 +27373,16 @@ "description": "Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests.", "type": "any" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "scheduleState": { "description": "Output only. Schedule state when the monitoring job is in Running state.", "enum": [ @@ -27787,7 +28517,7 @@ "type": "object" }, "GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter": { - "description": "Numeric filter is used to search a subset of the entities by using boolean rules on numeric columns. For example: Database Point 0: {name: “a” value_int: 42} {name: “b” value_float: 1.0} Database Point 1: {name: “a” value_int: 10} {name: “b” value_float: 2.0} Database Point 2: {name: “a” value_int: -1} {name: “b” value_float: 3.0} Query: {name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 {name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1", + "description": "Numeric filter is used to search a subset of the entities by using boolean rules on numeric columns. For example: Database Point 0: {name: \"a\" value_int: 42} {name: \"b\" value_float: 1.0} Database Point 1: {name: \"a\" value_int: 10} {name: \"b\" value_float: 2.0} Database Point 2: {name: \"a\" value_int: -1} {name: \"b\" value_float: 3.0} Query: {name: \"a\" value_int: 12 operator: LESS} // Matches Point 1, 2 {name: \"b\" value_float: 2.0 operator: EQUAL} // Matches Point 1", "id": "GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter", "properties": { "name": { @@ -28128,7 +28858,7 @@ }, "encryptionSpec": { "$ref": "GoogleCloudAiplatformV1EncryptionSpec", - "description": "Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookRuntimeTemplate has an encryption spec." + "description": "Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookService.NotebookRuntimeTemplate has an encryption spec." }, "executionTimeout": { "description": "Max running time of the execution job in seconds (default 86400s / 24 hrs).", @@ -28544,6 +29274,72 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PairwiseMetricInput": { + "description": "Input for pairwise metric.", + "id": "GoogleCloudAiplatformV1PairwiseMetricInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1PairwiseMetricInstance", + "description": "Required. Pairwise metric instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1PairwiseMetricSpec", + "description": "Required. Spec for pairwise metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseMetricInstance": { + "description": "Pairwise metric instance. Usually one instance corresponds to one row in an evaluation dataset.", + "id": "GoogleCloudAiplatformV1PairwiseMetricInstance", + "properties": { + "jsonInstance": { + "description": "Instance specified as a json string. String key-value pairs are expected in the json_instance to render PairwiseMetricSpec.instance_prompt_template.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseMetricResult": { + "description": "Spec for pairwise metric result.", + "id": "GoogleCloudAiplatformV1PairwiseMetricResult", + "properties": { + "explanation": { + "description": "Output only. Explanation for pairwise metric score.", + "readOnly": true, + "type": "string" + }, + "pairwiseChoice": { + "description": "Output only. Pairwise metric choice.", + "enum": [ + "PAIRWISE_CHOICE_UNSPECIFIED", + "BASELINE", + "CANDIDATE", + "TIE" + ], + "enumDescriptions": [ + "Unspecified prediction choice.", + "Baseline prediction wins", + "Candidate prediction wins", + "Winner cannot be determined" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PairwiseMetricSpec": { + "description": "Spec for pairwise metric.", + "id": "GoogleCloudAiplatformV1PairwiseMetricSpec", + "properties": { + "metricPromptTemplate": { + "description": "Required. Metric prompt template for pairwise metric.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput": { "description": "Input for pairwise question answering quality metric.", "id": "GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput", @@ -28850,6 +29646,16 @@ "$ref": "GoogleCloudAiplatformV1ResourceRuntimeSpec", "description": "Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration." }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "startTime": { "description": "Output only. Time when the PersistentResource for the first time entered the `RUNNING` state.", "format": "google-datetime", @@ -29357,6 +30163,61 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PointwiseMetricInput": { + "description": "Input for pointwise metric.", + "id": "GoogleCloudAiplatformV1PointwiseMetricInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1PointwiseMetricInstance", + "description": "Required. Pointwise metric instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1PointwiseMetricSpec", + "description": "Required. Spec for pointwise metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PointwiseMetricInstance": { + "description": "Pointwise metric instance. Usually one instance corresponds to one row in an evaluation dataset.", + "id": "GoogleCloudAiplatformV1PointwiseMetricInstance", + "properties": { + "jsonInstance": { + "description": "Instance specified as a json string. String key-value pairs are expected in the json_instance to render PointwiseMetricSpec.instance_prompt_template.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PointwiseMetricResult": { + "description": "Spec for pointwise metric result.", + "id": "GoogleCloudAiplatformV1PointwiseMetricResult", + "properties": { + "explanation": { + "description": "Output only. Explanation for pointwise metric score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Pointwise metric score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1PointwiseMetricSpec": { + "description": "Spec for pointwise metric.", + "id": "GoogleCloudAiplatformV1PointwiseMetricSpec", + "properties": { + "metricPromptTemplate": { + "description": "Required. Metric prompt template for pointwise metric.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Port": { "description": "Represents a network port in a container.", "id": "GoogleCloudAiplatformV1Port", @@ -29719,6 +30580,10 @@ "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke", "description": "Optional. Deploy PublisherModel to Google Kubernetes Engine." }, + "multiDeployVertex": { + "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex", + "description": "Optional. Multiple setups to deploy the PublisherModel to Vertex Endpoint." + }, "openEvaluationPipeline": { "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences", "description": "Optional. Open evaluation pipeline of the PublisherModel." @@ -29845,6 +30710,20 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex": { + "description": "Multiple setups to deploy the PublisherModel.", + "id": "GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex", + "properties": { + "multiDeployVertex": { + "description": "Optional. One click deployment configurations.", + "items": { + "$ref": "GoogleCloudAiplatformV1PublisherModelCallToActionDeploy" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines": { "description": "Open fine tuning pipelines.", "id": "GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines", @@ -30977,6 +31856,10 @@ "vertexAiSearch": { "$ref": "GoogleCloudAiplatformV1VertexAISearch", "description": "Set to use data source powered by Vertex AI Search." + }, + "vertexRagStore": { + "$ref": "GoogleCloudAiplatformV1VertexRagStore", + "description": "Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService." } }, "type": "object" @@ -31527,6 +32410,11 @@ "description": "Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false.", "type": "boolean" }, + "maxWaitDuration": { + "description": "Optional. This is the maximum duration that a job will wait for the requested resources to be provisioned if the scheduling strategy is set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait indefinitely. The default is 24 hours.", + "format": "google-duration", + "type": "string" + }, "restartJobOnWorkerRestart": { "description": "Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.", "type": "boolean" @@ -31538,21 +32426,24 @@ "ON_DEMAND", "LOW_COST", "STANDARD", - "SPOT" + "SPOT", + "DWS_FLEX_START" ], "enumDeprecated": [ false, true, true, false, + false, false ], "enumDescriptions": [ "Strategy will default to STANDARD.", - "Regular on-demand provisioning strategy.", - "Low cost by making potential use of spot resources.", + "Deprecated. Regular on-demand provisioning strategy.", + "Deprecated. Low cost by making potential use of spot resources.", "Standard provisioning strategy uses regular on-demand resources.", - "Spot provisioning strategy uses spot resources." + "Spot provisioning strategy uses spot resources.", + "DWS Flex start strategy uses DWS to queue for resources." ], "type": "string" }, @@ -36797,12 +37688,25 @@ "readOnly": true, "type": "string" }, + "totalTruncatedExampleCount": { + "description": "The number of examples in the dataset that have been truncated by any amount.", + "format": "int64", + "type": "string" + }, "totalTuningCharacterCount": { "description": "Output only. Number of tuning characters in the tuning dataset.", "format": "int64", "readOnly": true, "type": "string" }, + "truncatedExampleIndices": { + "description": "A partial sample of the indices (starting from 1) of the truncated examples.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, "tuningDatasetExampleCount": { "description": "Output only. Number of examples in the tuning dataset.", "format": "int64", @@ -38627,16 +39531,66 @@ "type": "object" }, "GoogleCloudAiplatformV1VertexAISearch": { - "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation", + "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder", "id": "GoogleCloudAiplatformV1VertexAISearch", "properties": { "datastore": { - "description": "Required. Fully-qualified Vertex AI Search's datastore resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", + "description": "Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", "type": "string" } }, "type": "object" }, + "GoogleCloudAiplatformV1VertexRagStore": { + "description": "Retrieve from Vertex RAG Store for grounding.", + "id": "GoogleCloudAiplatformV1VertexRagStore", + "properties": { + "ragCorpora": { + "deprecated": true, + "description": "Optional. Deprecated. Please use rag_resources instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ragResources": { + "description": "Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support.", + "items": { + "$ref": "GoogleCloudAiplatformV1VertexRagStoreRagResource" + }, + "type": "array" + }, + "similarityTopK": { + "description": "Optional. Number of top k results to return from the selected corpora.", + "format": "int32", + "type": "integer" + }, + "vectorDistanceThreshold": { + "description": "Optional. Only return results with vector distance smaller than the threshold.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1VertexRagStoreRagResource": { + "description": "The definition of the Rag resource.", + "id": "GoogleCloudAiplatformV1VertexRagStoreRagResource", + "properties": { + "ragCorpus": { + "description": "Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`", + "type": "string" + }, + "ragFileIds": { + "description": "Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1VideoMetadata": { "description": "Metadata describes the input video content.", "id": "GoogleCloudAiplatformV1VideoMetadata", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index e775748bca7..cb450856922 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -145,6 +145,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Datasets = NewDatasetsService(s) + s.Endpoints = NewEndpointsService(s) s.Projects = NewProjectsService(s) s.Publishers = NewPublishersService(s) return s, nil @@ -155,6 +157,10 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Datasets *DatasetsService + + Endpoints *EndpointsService + Projects *ProjectsService Publishers *PublishersService @@ -167,6 +173,36 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewDatasetsService(s *Service) *DatasetsService { + rs := &DatasetsService{s: s} + rs.DatasetVersions = NewDatasetsDatasetVersionsService(s) + return rs +} + +type DatasetsService struct { + s *Service + + DatasetVersions *DatasetsDatasetVersionsService +} + +func NewDatasetsDatasetVersionsService(s *Service) *DatasetsDatasetVersionsService { + rs := &DatasetsDatasetVersionsService{s: s} + return rs +} + +type DatasetsDatasetVersionsService struct { + s *Service +} + +func NewEndpointsService(s *Service) *EndpointsService { + rs := &EndpointsService{s: s} + return rs +} + +type EndpointsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -3683,6 +3719,8 @@ type GoogleCloudAiplatformV1CancelTuningJobRequest struct { // GoogleCloudAiplatformV1Candidate: A response candidate generated from the // model. type GoogleCloudAiplatformV1Candidate struct { + // AvgLogprobs: Output only. Average log probability score of the candidate. + AvgLogprobs float64 `json:"avgLogprobs,omitempty"` // CitationMetadata: Output only. Source attribution of the generated content. CitationMetadata *GoogleCloudAiplatformV1CitationMetadata `json:"citationMetadata,omitempty"` // Content: Output only. Content parts of the candidate. @@ -3700,8 +3738,8 @@ type GoogleCloudAiplatformV1Candidate struct { // "MAX_TOKENS" - Token generation reached the configured maximum output // tokens. // "SAFETY" - Token generation stopped because the content potentially - // contains safety violations. NOTE: When streaming, Candidate.content is empty - // if content filters blocks the output. + // contains safety violations. NOTE: When streaming, content is empty if + // content filters blocks the output. // "RECITATION" - Token generation stopped because the content potentially // contains copyright violations. // "OTHER" - All other reasons that stopped the token generation. @@ -3722,15 +3760,15 @@ type GoogleCloudAiplatformV1Candidate struct { // SafetyRatings: Output only. List of ratings for the safety of a response // candidate. There is at most one rating per category. SafetyRatings []*GoogleCloudAiplatformV1SafetyRating `json:"safetyRatings,omitempty"` - // ForceSendFields is a list of field names (e.g. "CitationMetadata") to + // ForceSendFields is a list of field names (e.g. "AvgLogprobs") 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. "CitationMetadata") 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. "AvgLogprobs") 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:"-"` } @@ -3740,6 +3778,20 @@ func (s GoogleCloudAiplatformV1Candidate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudAiplatformV1Candidate) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1Candidate + var s1 struct { + AvgLogprobs gensupport.JSONFloat64 `json:"avgLogprobs"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.AvgLogprobs = float64(s1.AvgLogprobs) + return nil +} + // GoogleCloudAiplatformV1CheckTrialEarlyStoppingStateMetatdata: This message // will be placed in the metadata field of a google.longrunning.Operation // associated with a CheckTrialEarlyStoppingState request. @@ -6777,6 +6829,10 @@ type GoogleCloudAiplatformV1EntityType struct { // generation time. If unset (or explicitly set to 0), default to 4000 days // TTL. OfflineStorageTtlDays int64 `json:"offlineStorageTtlDays,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // UpdateTime: Output only. Timestamp when this EntityType was most recently // updated. UpdateTime string `json:"updateTime,omitempty"` @@ -6947,12 +7003,16 @@ type GoogleCloudAiplatformV1EvaluateInstancesRequest struct { FulfillmentInput *GoogleCloudAiplatformV1FulfillmentInput `json:"fulfillmentInput,omitempty"` // GroundednessInput: Input for groundedness metric. GroundednessInput *GoogleCloudAiplatformV1GroundednessInput `json:"groundednessInput,omitempty"` + // PairwiseMetricInput: Input for pairwise metric. + PairwiseMetricInput *GoogleCloudAiplatformV1PairwiseMetricInput `json:"pairwiseMetricInput,omitempty"` // PairwiseQuestionAnsweringQualityInput: Input for pairwise question answering // quality metric. PairwiseQuestionAnsweringQualityInput *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput `json:"pairwiseQuestionAnsweringQualityInput,omitempty"` // PairwiseSummarizationQualityInput: Input for pairwise summarization quality // metric. PairwiseSummarizationQualityInput *GoogleCloudAiplatformV1PairwiseSummarizationQualityInput `json:"pairwiseSummarizationQualityInput,omitempty"` + // PointwiseMetricInput: Input for pointwise metric. + PointwiseMetricInput *GoogleCloudAiplatformV1PointwiseMetricInput `json:"pointwiseMetricInput,omitempty"` // QuestionAnsweringCorrectnessInput: Input for question answering correctness // metric. QuestionAnsweringCorrectnessInput *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessInput `json:"questionAnsweringCorrectnessInput,omitempty"` @@ -7018,12 +7078,16 @@ type GoogleCloudAiplatformV1EvaluateInstancesResponse struct { FulfillmentResult *GoogleCloudAiplatformV1FulfillmentResult `json:"fulfillmentResult,omitempty"` // GroundednessResult: Result for groundedness metric. GroundednessResult *GoogleCloudAiplatformV1GroundednessResult `json:"groundednessResult,omitempty"` + // PairwiseMetricResult: Result for pairwise metric. + PairwiseMetricResult *GoogleCloudAiplatformV1PairwiseMetricResult `json:"pairwiseMetricResult,omitempty"` // PairwiseQuestionAnsweringQualityResult: Result for pairwise question // answering quality metric. PairwiseQuestionAnsweringQualityResult *GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityResult `json:"pairwiseQuestionAnsweringQualityResult,omitempty"` // PairwiseSummarizationQualityResult: Result for pairwise summarization // quality metric. PairwiseSummarizationQualityResult *GoogleCloudAiplatformV1PairwiseSummarizationQualityResult `json:"pairwiseSummarizationQualityResult,omitempty"` + // PointwiseMetricResult: Generic metrics. Result for pointwise metric. + PointwiseMetricResult *GoogleCloudAiplatformV1PointwiseMetricResult `json:"pointwiseMetricResult,omitempty"` // QuestionAnsweringCorrectnessResult: Result for question answering // correctness metric. QuestionAnsweringCorrectnessResult *GoogleCloudAiplatformV1QuestionAnsweringCorrectnessResult `json:"questionAnsweringCorrectnessResult,omitempty"` @@ -8865,6 +8929,11 @@ type GoogleCloudAiplatformV1FeatureGroupBigQuery struct { // EntityIdColumns: Optional. Columns to construct entity_id / row keys. If not // provided defaults to `entity_id`. EntityIdColumns []string `json:"entityIdColumns,omitempty"` + // TimeSeries: Optional. If the source is a time-series source, this can be set + // to control how downstream sources (ex: FeatureView ) will treat time-series + // sources. If not set, will treat the source as a time-series source with + // `feature_timestamp` as timestamp column and no scan boundary. + TimeSeries *GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries `json:"timeSeries,omitempty"` // ForceSendFields is a list of field names (e.g. "BigQuerySource") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -8883,6 +8952,30 @@ func (s GoogleCloudAiplatformV1FeatureGroupBigQuery) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries struct { + // TimestampColumn: Optional. Column hosting timestamp values for a time-series + // source. Will be used to determine the latest `feature_values` for each + // entity. Optional. If not provided, column named `feature_timestamp` of type + // `TIMESTAMP` will be used. + TimestampColumn string `json:"timestampColumn,omitempty"` + // ForceSendFields is a list of field names (e.g. "TimestampColumn") 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. "TimestampColumn") 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 GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1FeatureMonitoringStatsAnomaly: A list of historical // SnapshotAnalysis or ImportFeaturesAnalysis stats requested by user, sorted // by FeatureStatsAnomaly.start_time descending. @@ -9023,6 +9116,10 @@ type GoogleCloudAiplatformV1FeatureOnlineStore struct { // PrivateServiceConnectConfig.enable_private_service_connect to use private // endpoint. Otherwise will use public endpoint by default. Optimized *GoogleCloudAiplatformV1FeatureOnlineStoreOptimized `json:"optimized,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. State of the featureOnlineStore. // // Possible values: @@ -9431,6 +9528,10 @@ type GoogleCloudAiplatformV1FeatureView struct { // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_ // store}/featureViews/{feature_view}` Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // SyncConfig: Configures when data is to be synced/updated for this // FeatureView. At the end of the sync the latest featureValues for each // entityId of this FeatureView are made ready for online serving. @@ -9690,6 +9791,10 @@ type GoogleCloudAiplatformV1FeatureViewSync struct { Name string `json:"name,omitempty"` // RunTime: Output only. Time when this FeatureViewSync is finished. RunTime *GoogleTypeInterval `json:"runTime,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // SyncSummary: Output only. Summary of the sync job. SyncSummary *GoogleCloudAiplatformV1FeatureViewSyncSyncSummary `json:"syncSummary,omitempty"` @@ -9747,6 +9852,9 @@ func (s GoogleCloudAiplatformV1FeatureViewSyncConfig) MarshalJSON() ([]byte, err type GoogleCloudAiplatformV1FeatureViewSyncSyncSummary struct { // RowSynced: Output only. Total number of rows synced. RowSynced int64 `json:"rowSynced,omitempty,string"` + // SystemWatermarkTime: Lower bound of the system time watermark for the sync + // job. This is only set for continuously syncing feature views. + SystemWatermarkTime string `json:"systemWatermarkTime,omitempty"` // TotalSlot: Output only. BigQuery slot milliseconds consumed for the sync // job. TotalSlot int64 `json:"totalSlot,omitempty,string"` @@ -9806,6 +9914,10 @@ type GoogleCloudAiplatformV1Featurestore struct { // `offline_storage_ttl_days` for each EntityType under a featurestore. If not // set, default to 4000 days OnlineStorageTtlDays int64 `json:"onlineStorageTtlDays,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. State of the featurestore. // // Possible values: @@ -10817,13 +10929,13 @@ type GoogleCloudAiplatformV1FunctionCallingConfig struct { // Possible values: // "MODE_UNSPECIFIED" - Unspecified function calling mode. This value should // not be used. - // "AUTO" - Default model behavior, model decides to predict either a - // function call or a natural language repspose. - // "ANY" - Model is constrained to always predicting a function call only. If - // "allowed_function_names" are set, the predicted function call will be + // "AUTO" - Default model behavior, model decides to predict either function + // calls or natural language response. + // "ANY" - Model is constrained to always predicting function calls only. If + // "allowed_function_names" are set, the predicted function calls will be // limited to any one of "allowed_function_names", else the predicted function - // call will be any one of the provided "function_declarations". - // "NONE" - Model will not predict any function call. Model behavior is same + // calls will be any one of the provided "function_declarations". + // "NONE" - Model will not predict any function calls. Model behavior is same // as when not passing any function declarations. Mode string `json:"mode,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedFunctionNames") to @@ -11080,7 +11192,9 @@ func (s GoogleCloudAiplatformV1GenerateContentResponsePromptFeedback) MarshalJSO type GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata struct { // CandidatesTokenCount: Number of tokens in the response(s). CandidatesTokenCount int64 `json:"candidatesTokenCount,omitempty"` - // PromptTokenCount: Number of tokens in the request. + // PromptTokenCount: Number of tokens in the request. When `cached_content` is + // set, this is still the total effective prompt size meaning this includes the + // number of tokens in the cached content. PromptTokenCount int64 `json:"promptTokenCount,omitempty"` TotalTokenCount int64 `json:"totalTokenCount,omitempty"` // ForceSendFields is a list of field names (e.g. "CandidatesTokenCount") to @@ -11127,6 +11241,8 @@ type GoogleCloudAiplatformV1GenerationConfig struct { ResponseSchema *GoogleCloudAiplatformV1Schema `json:"responseSchema,omitempty"` // RoutingConfig: Optional. Routing configuration. RoutingConfig *GoogleCloudAiplatformV1GenerationConfigRoutingConfig `json:"routingConfig,omitempty"` + // Seed: Optional. Seed. + Seed int64 `json:"seed,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. @@ -11175,7 +11291,8 @@ func (s *GoogleCloudAiplatformV1GenerationConfig) UnmarshalJSON(data []byte) err return nil } -// GoogleCloudAiplatformV1GenerationConfigRoutingConfig: Routing config. +// GoogleCloudAiplatformV1GenerationConfigRoutingConfig: The configuration for +// routing the request to a specific model. type GoogleCloudAiplatformV1GenerationConfigRoutingConfig struct { // AutoMode: Automated routing. AutoMode *GoogleCloudAiplatformV1GenerationConfigRoutingConfigAutoRoutingMode `json:"autoMode,omitempty"` @@ -11233,7 +11350,7 @@ func (s GoogleCloudAiplatformV1GenerationConfigRoutingConfigAutoRoutingMode) Mar // manual routing is set, the specified model will be used directly. type GoogleCloudAiplatformV1GenerationConfigRoutingConfigManualRoutingMode struct { // ModelName: The model name to use. Only the public LLM models are accepted. - // e.g. gemini-1.5-pro-001. + // e.g. 'gemini-1.5-pro-001'. ModelName string `json:"modelName,omitempty"` // ForceSendFields is a list of field names (e.g. "ModelName") to // unconditionally include in API requests. By default, fields with empty or @@ -12034,6 +12151,10 @@ type GoogleCloudAiplatformV1Index struct { MetadataSchemaUri string `json:"metadataSchemaUri,omitempty"` // Name: Output only. The resource name of the Index. Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // UpdateTime: Output only. Timestamp when this Index was most recently // updated. This also includes any update to the contents of the Index. Note // that Operations working on this Index may have their @@ -12329,6 +12450,10 @@ type GoogleCloudAiplatformV1IndexEndpoint struct { // PublicEndpointEnabled: Optional. If true, the deployed index will be // accessible through public endpoint. PublicEndpointEnabled bool `json:"publicEndpointEnabled,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // UpdateTime: Output only. Timestamp when this IndexEndpoint was last updated. // This timestamp is not updated when the endpoint's DeployedIndexes are // updated, e.g. due to updates of the original Indexes they are the @@ -15354,6 +15479,10 @@ type GoogleCloudAiplatformV1ModelDeploymentMonitoringJob struct { // ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we // will generate predict schema from collected predict requests. SamplePredictInstance interface{} `json:"samplePredictInstance,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // ScheduleState: Output only. Schedule state when the monitoring job is in // Running state. // @@ -16912,12 +17041,11 @@ func (s *GoogleCloudAiplatformV1NearestNeighborQueryEmbedding) UnmarshalJSON(dat // GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter: Numeric filter is // used to search a subset of the entities by using boolean rules on numeric -// columns. For example: Database Point 0: {name: “a” value_int: 42} {name: -// “b” value_float: 1.0} Database Point 1: {name: “a” value_int: 10} -// {name: “b” value_float: 2.0} Database Point 2: {name: “a” value_int: -// -1} {name: “b” value_float: 3.0} Query: {name: “a” value_int: 12 -// operator: LESS} // Matches Point 1, 2 {name: “b” value_float: 2.0 -// operator: EQUAL} // Matches Point 1 +// columns. For example: Database Point 0: {name: "a" value_int: 42} {name: "b" +// value_float: 1.0} Database Point 1: {name: "a" value_int: 10} {name: "b" +// value_float: 2.0} Database Point 2: {name: "a" value_int: -1} {name: "b" +// value_float: 3.0} Query: {name: "a" value_int: 12 operator: LESS} // Matches +// Point 1, 2 {name: "b" value_float: 2.0 operator: EQUAL} // Matches Point 1 type GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter struct { // Name: Required. Column name in BigQuery that used as filters. Name string `json:"name,omitempty"` @@ -17384,8 +17512,8 @@ type GoogleCloudAiplatformV1NotebookExecutionJob struct { // up to 128 characters long and can consist of any UTF-8 characters. DisplayName string `json:"displayName,omitempty"` // EncryptionSpec: Customer-managed encryption key spec for the notebook - // execution job. This field is auto-populated if the NotebookRuntimeTemplate - // has an encryption spec. + // execution job. This field is auto-populated if the + // NotebookService.NotebookRuntimeTemplate has an encryption spec. EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` // ExecutionTimeout: Max running time of the execution job in seconds (default // 86400s / 24 hrs). @@ -17810,6 +17938,108 @@ func (s GoogleCloudAiplatformV1NotebookRuntimeTemplateRef) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PairwiseMetricInput: Input for pairwise metric. +type GoogleCloudAiplatformV1PairwiseMetricInput struct { + // Instance: Required. Pairwise metric instance. + Instance *GoogleCloudAiplatformV1PairwiseMetricInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for pairwise metric. + MetricSpec *GoogleCloudAiplatformV1PairwiseMetricSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") 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. "Instance") 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 GoogleCloudAiplatformV1PairwiseMetricInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseMetricInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PairwiseMetricInstance: Pairwise metric instance. +// Usually one instance corresponds to one row in an evaluation dataset. +type GoogleCloudAiplatformV1PairwiseMetricInstance struct { + // JsonInstance: Instance specified as a json string. String key-value pairs + // are expected in the json_instance to render + // PairwiseMetricSpec.instance_prompt_template. + JsonInstance string `json:"jsonInstance,omitempty"` + // ForceSendFields is a list of field names (e.g. "JsonInstance") 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. "JsonInstance") 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 GoogleCloudAiplatformV1PairwiseMetricInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseMetricInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PairwiseMetricResult: Spec for pairwise metric +// result. +type GoogleCloudAiplatformV1PairwiseMetricResult struct { + // Explanation: Output only. Explanation for pairwise metric score. + Explanation string `json:"explanation,omitempty"` + // PairwiseChoice: Output only. Pairwise metric choice. + // + // Possible values: + // "PAIRWISE_CHOICE_UNSPECIFIED" - Unspecified prediction choice. + // "BASELINE" - Baseline prediction wins + // "CANDIDATE" - Candidate prediction wins + // "TIE" - Winner cannot be determined + PairwiseChoice string `json:"pairwiseChoice,omitempty"` + // ForceSendFields is a list of field names (e.g. "Explanation") 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. "Explanation") 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 GoogleCloudAiplatformV1PairwiseMetricResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseMetricResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PairwiseMetricSpec: Spec for pairwise metric. +type GoogleCloudAiplatformV1PairwiseMetricSpec struct { + // MetricPromptTemplate: Required. Metric prompt template for pairwise metric. + MetricPromptTemplate string `json:"metricPromptTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "MetricPromptTemplate") 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. "MetricPromptTemplate") 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 GoogleCloudAiplatformV1PairwiseMetricSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PairwiseMetricSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput: Input for // pairwise question answering quality metric. type GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput struct { @@ -18200,6 +18430,10 @@ type GoogleCloudAiplatformV1PersistentResource struct { // ResourceRuntimeSpec: Optional. Persistent Resource runtime spec. For // example, used for Ray cluster configuration. ResourceRuntimeSpec *GoogleCloudAiplatformV1ResourceRuntimeSpec `json:"resourceRuntimeSpec,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // StartTime: Output only. Time when the PersistentResource for the first time // entered the `RUNNING` state. StartTime string `json:"startTime,omitempty"` @@ -18725,6 +18959,116 @@ func (s GoogleCloudAiplatformV1PipelineTemplateMetadata) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PointwiseMetricInput: Input for pointwise metric. +type GoogleCloudAiplatformV1PointwiseMetricInput struct { + // Instance: Required. Pointwise metric instance. + Instance *GoogleCloudAiplatformV1PointwiseMetricInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for pointwise metric. + MetricSpec *GoogleCloudAiplatformV1PointwiseMetricSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") 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. "Instance") 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 GoogleCloudAiplatformV1PointwiseMetricInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PointwiseMetricInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PointwiseMetricInstance: Pointwise metric instance. +// Usually one instance corresponds to one row in an evaluation dataset. +type GoogleCloudAiplatformV1PointwiseMetricInstance struct { + // JsonInstance: Instance specified as a json string. String key-value pairs + // are expected in the json_instance to render + // PointwiseMetricSpec.instance_prompt_template. + JsonInstance string `json:"jsonInstance,omitempty"` + // ForceSendFields is a list of field names (e.g. "JsonInstance") 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. "JsonInstance") 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 GoogleCloudAiplatformV1PointwiseMetricInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PointwiseMetricInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1PointwiseMetricResult: Spec for pointwise metric +// result. +type GoogleCloudAiplatformV1PointwiseMetricResult struct { + // Explanation: Output only. Explanation for pointwise metric score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Pointwise metric score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Explanation") 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. "Explanation") 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 GoogleCloudAiplatformV1PointwiseMetricResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PointwiseMetricResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1PointwiseMetricResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1PointwiseMetricResult + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1PointwiseMetricSpec: Spec for pointwise metric. +type GoogleCloudAiplatformV1PointwiseMetricSpec struct { + // MetricPromptTemplate: Required. Metric prompt template for pointwise metric. + MetricPromptTemplate string `json:"metricPromptTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "MetricPromptTemplate") 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. "MetricPromptTemplate") 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 GoogleCloudAiplatformV1PointwiseMetricSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PointwiseMetricSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1Port: Represents a network port in a container. type GoogleCloudAiplatformV1Port struct { // ContainerPort: The number of the port to expose on the pod's IP address. @@ -19236,6 +19580,9 @@ type GoogleCloudAiplatformV1PublisherModelCallToAction struct { Deploy *GoogleCloudAiplatformV1PublisherModelCallToActionDeploy `json:"deploy,omitempty"` // DeployGke: Optional. Deploy PublisherModel to Google Kubernetes Engine. DeployGke *GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke `json:"deployGke,omitempty"` + // MultiDeployVertex: Optional. Multiple setups to deploy the PublisherModel to + // Vertex Endpoint. + MultiDeployVertex *GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex `json:"multiDeployVertex,omitempty"` // OpenEvaluationPipeline: Optional. Open evaluation pipeline of the // PublisherModel. OpenEvaluationPipeline *GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences `json:"openEvaluationPipeline,omitempty"` @@ -19380,6 +19727,29 @@ func (s GoogleCloudAiplatformV1PublisherModelCallToActionDeployGke) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex: Multiple +// setups to deploy the PublisherModel. +type GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex struct { + // MultiDeployVertex: Optional. One click deployment configurations. + MultiDeployVertex []*GoogleCloudAiplatformV1PublisherModelCallToActionDeploy `json:"multiDeployVertex,omitempty"` + // ForceSendFields is a list of field names (e.g. "MultiDeployVertex") 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. "MultiDeployVertex") 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 GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PublisherModelCallToActionDeployVertex + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines: // Open fine tuning pipelines. type GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines struct { @@ -21209,6 +21579,9 @@ type GoogleCloudAiplatformV1Retrieval struct { DisableAttribution bool `json:"disableAttribution,omitempty"` // VertexAiSearch: Set to use data source powered by Vertex AI Search. VertexAiSearch *GoogleCloudAiplatformV1VertexAISearch `json:"vertexAiSearch,omitempty"` + // VertexRagStore: Set to use data source powered by Vertex RAG store. User + // data is uploaded via the VertexRagDataService. + VertexRagStore *GoogleCloudAiplatformV1VertexRagStore `json:"vertexRagStore,omitempty"` // ForceSendFields is a list of field names (e.g. "DisableAttribution") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -21939,6 +22312,11 @@ type GoogleCloudAiplatformV1Scheduling struct { // errors after the job starts running. If true, overrides // `Scheduling.restart_job_on_worker_restart` to false. DisableRetries bool `json:"disableRetries,omitempty"` + // MaxWaitDuration: Optional. This is the maximum duration that a job will wait + // for the requested resources to be provisioned if the scheduling strategy is + // set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait + // indefinitely. The default is 24 hours. + MaxWaitDuration string `json:"maxWaitDuration,omitempty"` // RestartJobOnWorkerRestart: Restarts the entire CustomJob if a worker gets // restarted. This feature can be used by distributed training jobs that are // not resilient to workers leaving and joining a job. @@ -21948,11 +22326,14 @@ type GoogleCloudAiplatformV1Scheduling struct { // // Possible values: // "STRATEGY_UNSPECIFIED" - Strategy will default to STANDARD. - // "ON_DEMAND" - Regular on-demand provisioning strategy. - // "LOW_COST" - Low cost by making potential use of spot resources. + // "ON_DEMAND" - Deprecated. Regular on-demand provisioning strategy. + // "LOW_COST" - Deprecated. Low cost by making potential use of spot + // resources. // "STANDARD" - Standard provisioning strategy uses regular on-demand // resources. // "SPOT" - Spot provisioning strategy uses spot resources. + // "DWS_FLEX_START" - DWS Flex start strategy uses DWS to queue for + // resources. Strategy string `json:"strategy,omitempty"` // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` @@ -30406,9 +30787,15 @@ type GoogleCloudAiplatformV1SupervisedTuningDataStats struct { // TotalBillableTokenCount: Output only. Number of billable tokens in the // tuning dataset. TotalBillableTokenCount int64 `json:"totalBillableTokenCount,omitempty,string"` + // TotalTruncatedExampleCount: The number of examples in the dataset that have + // been truncated by any amount. + TotalTruncatedExampleCount int64 `json:"totalTruncatedExampleCount,omitempty,string"` // TotalTuningCharacterCount: Output only. Number of tuning characters in the // tuning dataset. TotalTuningCharacterCount int64 `json:"totalTuningCharacterCount,omitempty,string"` + // TruncatedExampleIndices: A partial sample of the indices (starting from 1) + // of the truncated examples. + TruncatedExampleIndices googleapi.Int64s `json:"truncatedExampleIndices,omitempty"` // TuningDatasetExampleCount: Output only. Number of examples in the tuning // dataset. TuningDatasetExampleCount int64 `json:"tuningDatasetExampleCount,omitempty,string"` @@ -32940,10 +33327,9 @@ func (s *GoogleCloudAiplatformV1Value) UnmarshalJSON(data []byte) error { } // GoogleCloudAiplatformV1VertexAISearch: Retrieve from Vertex AI Search -// datastore for grounding. See -// https://cloud.google.com/vertex-ai-search-and-conversation +// datastore for grounding. See https://cloud.google.com/products/agent-builder type GoogleCloudAiplatformV1VertexAISearch struct { - // Datastore: Required. Fully-qualified Vertex AI Search's datastore resource + // Datastore: Required. Fully-qualified Vertex AI Search data store resource // ID. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ // {dataStore}` @@ -32966,6 +33352,81 @@ func (s GoogleCloudAiplatformV1VertexAISearch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1VertexRagStore: Retrieve from Vertex RAG Store for +// grounding. +type GoogleCloudAiplatformV1VertexRagStore struct { + // RagCorpora: Optional. Deprecated. Please use rag_resources instead. + RagCorpora []string `json:"ragCorpora,omitempty"` + // RagResources: Optional. The representation of the rag source. It can be used + // to specify corpus only or ragfiles. Currently only support one corpus or + // multiple files from one corpus. In the future we may open up multiple + // corpora support. + RagResources []*GoogleCloudAiplatformV1VertexRagStoreRagResource `json:"ragResources,omitempty"` + // SimilarityTopK: Optional. Number of top k results to return from the + // selected corpora. + SimilarityTopK int64 `json:"similarityTopK,omitempty"` + // VectorDistanceThreshold: Optional. Only return results with vector distance + // smaller than the threshold. + VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpora") 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. "RagCorpora") 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 GoogleCloudAiplatformV1VertexRagStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexRagStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1VertexRagStore) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1VertexRagStore + var s1 struct { + VectorDistanceThreshold gensupport.JSONFloat64 `json:"vectorDistanceThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.VectorDistanceThreshold = float64(s1.VectorDistanceThreshold) + return nil +} + +// GoogleCloudAiplatformV1VertexRagStoreRagResource: The definition of the Rag +// resource. +type GoogleCloudAiplatformV1VertexRagStoreRagResource struct { + // RagCorpus: Optional. RagCorpora resource name. Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + RagCorpus string `json:"ragCorpus,omitempty"` + // RagFileIds: Optional. rag_file_id. The files should be in the same + // rag_corpus set in rag_corpus field. + RagFileIds []string `json:"ragFileIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpus") 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. "RagCorpus") 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 GoogleCloudAiplatformV1VertexRagStoreRagResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexRagStoreRagResource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1VideoMetadata: Metadata describes the input video // content. type GoogleCloudAiplatformV1VideoMetadata struct { @@ -33874,78 +34335,175 @@ func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ProjectsLocationsEvaluateInstancesCall struct { - s *Service - location string - googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatasetsCreateCall struct { + s *Service + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EvaluateInstances: Evaluates instances based on a given metric. -// -// - location: The resource name of the Location to evaluate the instances. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { - c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest +// Create: Creates a Dataset. +func (r *DatasetsService) Create(googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsCreateCall { + c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// Parent sets the optional parameter "parent": Required. The resource name of +// the Location to create the Dataset in. Format: +// `projects/{project}/locations/{location}` +func (c *DatasetsCreateCall) Parent(parent string) *DatasetsCreateCall { + c.urlParams_.Set("parent", parent) 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 *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { +func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { +func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall { 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 *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { +func (c *DatasetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1evaluateinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.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 *DatasetsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Dataset. +// +// - name: The resource name of the Dataset to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { + c := &DatasetsDeleteCall{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 *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { + 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 *DatasetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.evaluateInstances" call. +// Do executes the "aiplatform.datasets.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1EvaluateInstancesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, error) { +func (c *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33964,7 +34522,7 @@ func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33977,7 +34535,7 @@ func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsGetCall struct { +type DatasetsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -33986,19 +34544,26 @@ type ProjectsLocationsGetCall struct { header_ http.Header } -// Get: Gets information about a location. +// Get: Gets a Dataset. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Dataset resource. +func (r *DatasetsService) Get(name string) *DatasetsGetCall { + c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsGetCall) ReadMask(readMask string) *DatasetsGetCall { + c.urlParams_.Set("readMask", readMask) + 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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34006,27 +34571,27 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { +func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { 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 *ProjectsLocationsGetCall) Header() http.Header { +func (c *DatasetsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -34047,13 +34612,13 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.get" call. +// Do executes the "aiplatform.datasets.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Dataset.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { +func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34072,7 +34637,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationLocation{ + ret := &GoogleCloudAiplatformV1Dataset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34085,52 +34650,73 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type ProjectsLocationsListCall struct { +type DatasetsListCall struct { s *Service - name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists information about the supported locations for this service. -// -// - name: The resource that owns the locations collection, if applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// List: Lists Datasets in a Location. +func (r *DatasetsService) List() *DatasetsListCall { + c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } -// Filter sets the optional parameter "filter": A filter to narrow down results -// to a preferred subset. The filtering language accepts strings like -// "displayName=tokyo", and is documented in more detail in AIP-160 -// (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `display_name`: supports = and != * `metadata_schema_uri`: +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" +func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` +func (c *DatasetsListCall) OrderBy(orderBy string) *DatasetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token received -// from the `next_page_token` field in the response. Send that page token to -// receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// Parent sets the optional parameter "parent": Required. The name of the +// Dataset's parent resource. Format: `projects/{project}/locations/{location}` +func (c *DatasetsListCall) Parent(parent string) *DatasetsListCall { + c.urlParams_.Set("parent", parent) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { + c.urlParams_.Set("readMask", readMask) + 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 *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34138,27 +34724,27 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { 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 *ProjectsLocationsListCall) Header() http.Header { +func (c *DatasetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -34166,26 +34752,23 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.list" call. +// Do executes the "aiplatform.datasets.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ListDatasetsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { +func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34204,7 +34787,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &GoogleCloudAiplatformV1ListDatasetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34220,7 +34803,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo // 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { +func (c *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -34238,69 +34821,69 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleClo } } -type ProjectsLocationsBatchPredictionJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatasetsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a BatchPredictionJob. Starts asynchronous cancellation on -// the BatchPredictionJob. The server makes the best effort to cancel the job, -// but success is not guaranteed. Clients can use -// JobService.GetBatchPredictionJob or other methods to check whether the -// cancellation succeeded or whether the job completed despite cancellation. On -// a successful cancellation, the BatchPredictionJob is not deleted;instead its -// BatchPredictionJob.state is set to `CANCELLED`. Any files already outputted -// by the job are not deleted. +// Patch: Updates a Dataset. // -// - name: The name of the BatchPredictionJob to cancel. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Cancel(name string, googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest) *ProjectsLocationsBatchPredictionJobsCancelCall { - c := &ProjectsLocationsBatchPredictionJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Identifier. The resource name of the Dataset. +func (r *DatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsPatchCall { + c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1cancelbatchpredictionjobrequest = googlecloudaiplatformv1cancelbatchpredictionjobrequest + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` * +// `description` * `labels` +func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall { + 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 *ProjectsLocationsBatchPredictionJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCancelCall { +func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCancelCall { +func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { 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 *ProjectsLocationsBatchPredictionJobsCancelCall) Header() http.Header { +func (c *DatasetsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelbatchpredictionjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -34311,13 +34894,13 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.cancel" call. +// Do executes the "aiplatform.datasets.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.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 *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1Dataset.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 *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34336,7 +34919,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1Dataset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34349,60 +34932,59 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatasetsDatasetVersionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a BatchPredictionJob. A BatchPredictionJob once created will -// right away be attempted to start. +// Create: Create a version from a Dataset. // -// - parent: The resource name of the Location to create the BatchPredictionJob -// in. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Create(parent string, googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob) *ProjectsLocationsBatchPredictionJobsCreateCall { - c := &ProjectsLocationsBatchPredictionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsCreateCall { + c := &DatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1batchpredictionjob = googlecloudaiplatformv1batchpredictionjob + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion 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 *ProjectsLocationsBatchPredictionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCreateCall { +func (c *DatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCreateCall { +func (c *DatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *DatasetsDatasetVersionsCreateCall { 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 *ProjectsLocationsBatchPredictionJobsCreateCall) Header() http.Header { +func (c *DatasetsDatasetVersionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchpredictionjob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34415,13 +34997,13 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.create" call. +// Do executes the "aiplatform.datasets.datasetVersions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1BatchPredictionJob.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { +func (c *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34440,7 +35022,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1BatchPredictionJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34453,7 +35035,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsDeleteCall struct { +type DatasetsDatasetVersionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34461,14 +35043,13 @@ type ProjectsLocationsBatchPredictionJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a BatchPredictionJob. Can only be called on jobs that -// already finished. +// Delete: Deletes a Dataset version. // -// - name: The name of the BatchPredictionJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *ProjectsLocationsBatchPredictionJobsDeleteCall { - c := &ProjectsLocationsBatchPredictionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVersionsDeleteCall { + c := &DatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -34476,27 +35057,27 @@ func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsDeleteCall { +func (c *DatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsDeleteCall { +func (c *DatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *DatasetsDatasetVersionsDeleteCall { 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 *ProjectsLocationsBatchPredictionJobsDeleteCall) Header() http.Header { +func (c *DatasetsDatasetVersionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -34514,13 +35095,1612 @@ func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.delete" call. +// Do executes the "aiplatform.datasets.datasetVersions.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 *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *DatasetsDatasetVersionsDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Get(name string) *DatasetsDatasetVersionsGetCall { + c := &DatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsGetCall) ReadMask(readMask string) *DatasetsDatasetVersionsGetCall { + c.urlParams_.Set("readMask", readMask) + 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 *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsGetCall { + 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 *DatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsGetCall) Context(ctx context.Context) *DatasetsDatasetVersionsGetCall { + 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 *DatasetsDatasetVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1DatasetVersion.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 *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, 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 := &GoogleCloudAiplatformV1DatasetVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DatasetVersions in a Dataset. +// +// - parent: The resource name of the Dataset to list DatasetVersions from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) List(parent string) *DatasetsDatasetVersionsListCall { + c := &DatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *DatasetsDatasetVersionsListCall) Filter(filter string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *DatasetsDatasetVersionsListCall) OrderBy(orderBy string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsDatasetVersionsListCall) PageSize(pageSize int64) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsDatasetVersionsListCall) PageToken(pageToken string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsListCall) ReadMask(readMask string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("readMask", readMask) + 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 *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsListCall { + 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 *DatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsListCall) Context(ctx context.Context) *DatasetsDatasetVersionsListCall { + 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 *DatasetsDatasetVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.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 *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, 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 := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) 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 DatasetsDatasetVersionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DatasetVersion. +// +// - name: Output only. Identifier. The resource name of the DatasetVersion. +func (r *DatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsPatchCall { + c := &DatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` +func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *DatasetsDatasetVersionsPatchCall { + 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 *DatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *DatasetsDatasetVersionsPatchCall { + 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 *DatasetsDatasetVersionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1DatasetVersion.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 *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, 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 := &GoogleCloudAiplatformV1DatasetVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsRestoreCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a dataset version. +// +// - name: The name of the DatasetVersion resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Restore(name string) *DatasetsDatasetVersionsRestoreCall { + c := &DatasetsDatasetVersionsRestoreCall{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 *DatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsRestoreCall { + 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 *DatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsRestoreCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *DatasetsDatasetVersionsRestoreCall { + 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 *DatasetsDatasetVersionsRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.restore" 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 *DatasetsDatasetVersionsRestoreCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *EndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *EndpointsComputeTokensCall { + c := &EndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + 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 *EndpointsComputeTokensCall) Fields(s ...googleapi.Field) *EndpointsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsComputeTokensCall) Context(ctx context.Context) *EndpointsComputeTokensCall { + 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 *EndpointsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ComputeTokensResponse.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 *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *EndpointsCountTokensCall { + c := &EndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest + 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 *EndpointsCountTokensCall) Fields(s ...googleapi.Field) *EndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsCountTokensCall) Context(ctx context.Context) *EndpointsCountTokensCall { + 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 *EndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.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 *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, 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 := &GoogleCloudAiplatformV1CountTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsGenerateContentCall { + c := &EndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + 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 *EndpointsGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsGenerateContentCall) Context(ctx context.Context) *EndpointsGenerateContentCall { + 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 *EndpointsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsStreamGenerateContentCall { + c := &EndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + 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 *EndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsStreamGenerateContentCall) Context(ctx context.Context) *EndpointsStreamGenerateContentCall { + 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 *EndpointsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsEvaluateInstancesCall struct { + s *Service + location string + googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EvaluateInstances: Evaluates instances based on a given metric. +// +// - location: The resource name of the Location to evaluate the instances. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { + c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest + 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 *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { + 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 *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1evaluateinstancesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.evaluateInstances" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1EvaluateInstancesResponse.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 *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, 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 := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, 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 := &GoogleCloudLocationLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this service. +// +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the `next_page_token` field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, 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 := &GoogleCloudLocationListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) 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 ProjectsLocationsBatchPredictionJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels a BatchPredictionJob. Starts asynchronous cancellation on +// the BatchPredictionJob. The server makes the best effort to cancel the job, +// but success is not guaranteed. Clients can use +// JobService.GetBatchPredictionJob or other methods to check whether the +// cancellation succeeded or whether the job completed despite cancellation. On +// a successful cancellation, the BatchPredictionJob is not deleted;instead its +// BatchPredictionJob.state is set to `CANCELLED`. Any files already outputted +// by the job are not deleted. +// +// - name: The name of the BatchPredictionJob to cancel. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Cancel(name string, googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest) *ProjectsLocationsBatchPredictionJobsCancelCall { + c := &ProjectsLocationsBatchPredictionJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1cancelbatchpredictionjobrequest = googlecloudaiplatformv1cancelbatchpredictionjobrequest + 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 *ProjectsLocationsBatchPredictionJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCancelCall { + 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 *ProjectsLocationsBatchPredictionJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelbatchpredictionjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsBatchPredictionJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a BatchPredictionJob. A BatchPredictionJob once created will +// right away be attempted to start. +// +// - parent: The resource name of the Location to create the BatchPredictionJob +// in. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Create(parent string, googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob) *ProjectsLocationsBatchPredictionJobsCreateCall { + c := &ProjectsLocationsBatchPredictionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchpredictionjob = googlecloudaiplatformv1batchpredictionjob + 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 *ProjectsLocationsBatchPredictionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCreateCall { + 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 *ProjectsLocationsBatchPredictionJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchpredictionjob) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1BatchPredictionJob.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 *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, 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 := &GoogleCloudAiplatformV1BatchPredictionJob{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsBatchPredictionJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a BatchPredictionJob. Can only be called on jobs that +// already finished. +// +// - name: The name of the BatchPredictionJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *ProjectsLocationsBatchPredictionJobsDeleteCall { + c := &ProjectsLocationsBatchPredictionJobsDeleteCall{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 *ProjectsLocationsBatchPredictionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsDeleteCall { + 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 *ProjectsLocationsBatchPredictionJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.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 *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44654,8 +46834,11 @@ type ProjectsLocationsEndpointsGenerateContentCall struct { // GenerateContent: Generate content with multimodal inputs. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsGenerateContentCall { c := &ProjectsLocationsEndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -45573,8 +47756,11 @@ type ProjectsLocationsEndpointsStreamGenerateContentCall struct { // StreamGenerateContent: Generate content with multimodal inputs with // streaming support. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -81278,8 +83464,11 @@ type ProjectsLocationsPublishersModelsGenerateContentCall struct { // GenerateContent: Generate content with multimodal inputs. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -81696,8 +83885,11 @@ type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { // StreamGenerateContent: Generate content with multimodal inputs with // streaming support. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -95112,6 +97304,318 @@ func (c *ProjectsLocationsTuningJobsOperationsListCall) Pages(ctx context.Contex } } +type PublishersModelsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *PublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *PublishersModelsComputeTokensCall { + c := &PublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + 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 *PublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *PublishersModelsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsComputeTokensCall) Context(ctx context.Context) *PublishersModelsComputeTokensCall { + 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 *PublishersModelsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ComputeTokensResponse.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 *PublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type PublishersModelsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *PublishersModelsCountTokensCall { + c := &PublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest + 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 *PublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *PublishersModelsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsCountTokensCall) Context(ctx context.Context) *PublishersModelsCountTokensCall { + 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 *PublishersModelsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.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 *PublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, 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 := &GoogleCloudAiplatformV1CountTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type PublishersModelsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *PublishersModelsGenerateContentCall { + c := &PublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + 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 *PublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *PublishersModelsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsGenerateContentCall) Context(ctx context.Context) *PublishersModelsGenerateContentCall { + 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 *PublishersModelsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *PublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type PublishersModelsGetCall struct { s *Service name string @@ -95131,6 +97635,13 @@ func (r *PublishersModelsService) Get(name string) *PublishersModelsGetCall { return c } +// HuggingFaceToken sets the optional parameter "huggingFaceToken": Token used +// to access Hugging Face gated models. +func (c *PublishersModelsGetCall) HuggingFaceToken(huggingFaceToken string) *PublishersModelsGetCall { + c.urlParams_.Set("huggingFaceToken", huggingFaceToken) + return c +} + // IsHuggingFaceModel sets the optional parameter "isHuggingFaceModel": Boolean // indicates whether the requested model is a Hugging Face model. func (c *PublishersModelsGetCall) IsHuggingFaceModel(isHuggingFaceModel bool) *PublishersModelsGetCall { @@ -95257,3 +97768,110 @@ func (c *PublishersModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloud } return ret, nil } + +type PublishersModelsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *PublishersModelsStreamGenerateContentCall { + c := &PublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + 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 *PublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *PublishersModelsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *PublishersModelsStreamGenerateContentCall { + 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 *PublishersModelsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.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 *PublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 429f83057ce..712436009e2 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -305,6 +305,492 @@ }, "protocol": "rest", "resources": { + "datasets": { + "methods": { + "create": { + "description": "Creates a Dataset.", + "flatPath": "v1beta1/datasets", + "httpMethod": "POST", + "id": "aiplatform.datasets.create", + "parameterOrder": [], + "parameters": { + "parent": { + "description": "Required. The resource name of the Location to create the Dataset in. Format: `projects/{project}/locations/{location}`", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/datasets", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1Dataset" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}", + "httpMethod": "DELETE", + "id": "aiplatform.datasets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}", + "httpMethod": "GET", + "id": "aiplatform.datasets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Dataset resource.", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Datasets in a Location.", + "flatPath": "v1beta1/datasets", + "httpMethod": "GET", + "id": "aiplatform.datasets.list", + "parameterOrder": [], + "parameters": { + "filter": { + "description": "An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `display_name`: supports = and != * `metadata_schema_uri`: supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. Some examples: * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"`", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `display_name` * `create_time` * `update_time`", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the Dataset's parent resource. Format: `projects/{project}/locations/{location}`", + "location": "query", + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/datasets", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ListDatasetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}", + "httpMethod": "PATCH", + "id": "aiplatform.datasets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the Dataset.", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see google.protobuf.FieldMask. Updatable fields: * `display_name` * `description` * `labels`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1Dataset" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1Dataset" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "datasetVersions": { + "methods": { + "create": { + "description": "Create a version from a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions", + "httpMethod": "POST", + "id": "aiplatform.datasets.datasetVersions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the Dataset resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/datasetVersions", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetVersion" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Dataset version.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "DELETE", + "id": "aiplatform.datasets.datasetVersions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset version to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Dataset version.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Dataset version to delete. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists DatasetVersions in a Dataset.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The standard list filter.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The standard list page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Dataset to list DatasetVersions from. Format: `projects/{project}/locations/{location}/datasets/{dataset}`", + "location": "path", + "pattern": "^datasets/[^/]+$", + "required": true, + "type": "string" + }, + "readMask": { + "description": "Optional. Mask specifying which fields to read.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/datasetVersions", + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a DatasetVersion.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}", + "httpMethod": "PATCH", + "id": "aiplatform.datasets.datasetVersions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. Identifier. The resource name of the DatasetVersion.", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see google.protobuf.FieldMask. Updatable fields: * `display_name`", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetVersion" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1DatasetVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a dataset version.", + "flatPath": "v1beta1/datasets/{datasetsId}/datasetVersions/{datasetVersionsId}:restore", + "httpMethod": "GET", + "id": "aiplatform.datasets.datasetVersions.restore", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the DatasetVersion resource. Format: `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`", + "location": "path", + "pattern": "^datasets/[^/]+/datasetVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:restore", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "endpoints": { + "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1beta1/endpoints/{endpointsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.endpoints.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1beta1/endpoints/{endpointsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.endpoints.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "generateContent": { + "description": "Generate content with multimodal inputs.", + "flatPath": "v1beta1/endpoints/{endpointsId}:generateContent", + "httpMethod": "POST", + "id": "aiplatform.endpoints.generateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:generateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1beta1/endpoints/{endpointsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.endpoints.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + } + } + }, "media": { "methods": { "upload": { @@ -4033,7 +4519,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -4342,7 +4828,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -4463,7 +4949,7 @@ ], "parameters": { "endpoint": { - "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/openapi`", + "description": "Required. The name of the endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", "required": true, @@ -15688,7 +16174,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", "required": true, @@ -15835,7 +16321,7 @@ ], "parameters": { "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$", "required": true, @@ -20327,6 +20813,92 @@ "resources": { "models": { "methods": { + "computeTokens": { + "description": "Return a list of tokens based on the input text.", + "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}:computeTokens", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.computeTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to get lists of tokens and token ids.", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:computeTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1ComputeTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "countTokens": { + "description": "Perform a token counting.", + "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}:countTokens", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.countTokens", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}:countTokens", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1CountTokensRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1CountTokensResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "generateContent": { + "description": "Generate content with multimodal inputs.", + "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}:generateContent", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.generateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:generateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, "get": { "description": "Gets a Model Garden publisher model.", "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}", @@ -20336,6 +20908,11 @@ "name" ], "parameters": { + "huggingFaceToken": { + "description": "Optional. Token used to access Hugging Face gated models.", + "location": "query", + "type": "string" + }, "isHuggingFaceModel": { "description": "Optional. Boolean indicates whether the requested model is a Hugging Face model.", "location": "query", @@ -20446,13 +21023,42 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamGenerateContent": { + "description": "Generate content with multimodal inputs with streaming support.", + "flatPath": "v1beta1/publishers/{publishersId}/models/{modelsId}:streamGenerateContent", + "httpMethod": "POST", + "id": "aiplatform.publishers.models.streamGenerateContent", + "parameterOrder": [ + "model" + ], + "parameters": { + "model": { + "description": "Required. The fully qualified name of the publisher model or tuned model endpoint to use. Publisher model format: `projects/{project}/locations/{location}/publishers/*/models/*` Tuned model endpoint format: `projects/{project}/locations/{location}/endpoints/{endpoint}`", + "location": "path", + "pattern": "^publishers/[^/]+/models/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+model}:streamGenerateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] } } } } } }, - "revision": "20240727", + "revision": "20240816", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -22304,6 +22910,12 @@ "description": "A response candidate generated from the model.", "id": "GoogleCloudAiplatformV1beta1Candidate", "properties": { + "avgLogprobs": { + "description": "Output only. Average log probability score of the candidate.", + "format": "double", + "readOnly": true, + "type": "number" + }, "citationMetadata": { "$ref": "GoogleCloudAiplatformV1beta1CitationMetadata", "description": "Output only. Source attribution of the generated content.", @@ -22337,7 +22949,7 @@ "The finish reason is unspecified.", "Token generation reached a natural stopping point or a configured stop sequence.", "Token generation reached the configured maximum output tokens.", - "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, Candidate.content is empty if content filters blocks the output.", + "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, content is empty if content filters blocks the output.", "Token generation stopped because the content potentially contains copyright violations.", "All other reasons that stopped the token generation.", "Token generation stopped because the content contains forbidden terms.", @@ -24770,6 +25382,16 @@ "format": "int32", "type": "integer" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "updateTime": { "description": "Output only. Timestamp when this EntityType was most recently updated.", "format": "google-datetime", @@ -24878,6 +25500,10 @@ "$ref": "GoogleCloudAiplatformV1beta1GroundednessInput", "description": "Input for groundedness metric." }, + "pairwiseMetricInput": { + "$ref": "GoogleCloudAiplatformV1beta1PairwiseMetricInput", + "description": "Input for pairwise metric." + }, "pairwiseQuestionAnsweringQualityInput": { "$ref": "GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityInput", "description": "Input for pairwise question answering quality metric." @@ -24886,6 +25512,10 @@ "$ref": "GoogleCloudAiplatformV1beta1PairwiseSummarizationQualityInput", "description": "Input for pairwise summarization quality metric." }, + "pointwiseMetricInput": { + "$ref": "GoogleCloudAiplatformV1beta1PointwiseMetricInput", + "description": "Input for pointwise metric." + }, "questionAnsweringCorrectnessInput": { "$ref": "GoogleCloudAiplatformV1beta1QuestionAnsweringCorrectnessInput", "description": "Input for question answering correctness metric." @@ -24969,6 +25599,10 @@ "$ref": "GoogleCloudAiplatformV1beta1GroundednessResult", "description": "Result for groundedness metric." }, + "pairwiseMetricResult": { + "$ref": "GoogleCloudAiplatformV1beta1PairwiseMetricResult", + "description": "Result for pairwise metric." + }, "pairwiseQuestionAnsweringQualityResult": { "$ref": "GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityResult", "description": "Result for pairwise question answering quality metric." @@ -24977,6 +25611,10 @@ "$ref": "GoogleCloudAiplatformV1beta1PairwiseSummarizationQualityResult", "description": "Result for pairwise summarization quality metric." }, + "pointwiseMetricResult": { + "$ref": "GoogleCloudAiplatformV1beta1PointwiseMetricResult", + "description": "Generic metrics. Result for pointwise metric." + }, "questionAnsweringCorrectnessResult": { "$ref": "GoogleCloudAiplatformV1beta1QuestionAnsweringCorrectnessResult", "description": "Result for question answering correctness metric." @@ -26454,6 +27092,20 @@ "type": "string" }, "type": "array" + }, + "timeSeries": { + "$ref": "GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries", + "description": "Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureView ) will treat time-series sources. If not set, will treat the source as a time-series source with `feature_timestamp` as timestamp column and no scan boundary." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries": { + "id": "GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries", + "properties": { + "timestampColumn": { + "description": "Optional. Column hosting timestamp values for a time-series source. Will be used to determine the latest `feature_values` for each entity. Optional. If not provided, column named `feature_timestamp` of type `TIMESTAMP` will be used.", + "type": "string" } }, "type": "object" @@ -26561,6 +27213,16 @@ "$ref": "GoogleCloudAiplatformV1beta1FeatureOnlineStoreOptimized", "description": "Contains settings for the Optimized store that will be created to serve featureValues for all FeatureViews under this FeatureOnlineStore. When choose Optimized storage type, need to set PrivateServiceConnectConfig.enable_private_service_connect to use private endpoint. Otherwise will use public endpoint by default." }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. State of the featureOnlineStore.", "enum": [ @@ -26842,6 +27504,16 @@ "description": "Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "serviceAccountEmail": { "description": "Output only. A Service Account unique to this FeatureView. The role bigquery.dataViewer should be granted to this service account to allow Vertex AI Feature Store to sync data to the online store.", "readOnly": true, @@ -27055,6 +27727,16 @@ "description": "Output only. Time when this FeatureViewSync is finished.", "readOnly": true }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "syncSummary": { "$ref": "GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary", "description": "Output only. Summary of the sync job.", @@ -27084,6 +27766,11 @@ "readOnly": true, "type": "string" }, + "systemWatermarkTime": { + "description": "Lower bound of the system time watermark for the sync job. This is only set for continuously syncing feature views.", + "format": "google-datetime", + "type": "string" + }, "totalSlot": { "description": "Output only. BigQuery slot milliseconds consumed for the sync job.", "format": "int64", @@ -27200,6 +27887,16 @@ "format": "int32", "type": "integer" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. State of the featurestore.", "enum": [ @@ -27806,9 +28503,9 @@ ], "enumDescriptions": [ "Unspecified function calling mode. This value should not be used.", - "Default model behavior, model decides to predict either a function call or a natural language repspose.", - "Model is constrained to always predicting a function call only. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\".", - "Model will not predict any function call. Model behavior is same as when not passing any function declarations." + "Default model behavior, model decides to predict either function calls or natural language response.", + "Model is constrained to always predicting function calls only. If \"allowed_function_names\" are set, the predicted function calls will be limited to any one of \"allowed_function_names\", else the predicted function calls will be any one of the provided \"function_declarations\".", + "Model will not predict any function calls. Model behavior is same as when not passing any function declarations." ], "type": "string" } @@ -28034,7 +28731,7 @@ "type": "integer" }, "promptTokenCount": { - "description": "Number of tokens in the request.", + "description": "Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content.", "format": "int32", "type": "integer" }, @@ -28107,6 +28804,11 @@ "$ref": "GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig", "description": "Optional. Routing configuration." }, + "seed": { + "description": "Optional. Seed.", + "format": "int32", + "type": "integer" + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -28133,7 +28835,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig": { - "description": "Routing config.", + "description": "The configuration for routing the request to a specific model.", "id": "GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig", "properties": { "autoMode": { @@ -28175,7 +28877,7 @@ "id": "GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode", "properties": { "modelName": { - "description": "The model name to use. Only the public LLM models are accepted. e.g. gemini-1.5-pro-001.", + "description": "The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'.", "type": "string" } }, @@ -28829,6 +29531,10 @@ "$ref": "GoogleCloudAiplatformV1beta1RagFileChunkingConfig", "description": "Specifies the size and overlap of chunks after importing RagFiles." }, + "ragFileParsingConfig": { + "$ref": "GoogleCloudAiplatformV1beta1RagFileParsingConfig", + "description": "Specifies the parsing config for RagFiles." + }, "slackSource": { "$ref": "GoogleCloudAiplatformV1beta1SlackSource", "description": "Slack channels with their corresponding access tokens." @@ -28920,6 +29626,16 @@ "readOnly": true, "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "updateTime": { "description": "Output only. Timestamp when this Index was most recently updated. This also includes any update to the contents of the Index. Note that Operations working on this Index may have their Operations.metadata.generic_metadata.update_time a little after the value of this timestamp, yet that does not mean their results are not already reflected in the Index. Result of any successfully completed Operation on the Index is reflected in it.", "format": "google-datetime", @@ -29145,6 +29861,16 @@ "description": "Optional. If true, the deployed index will be accessible through public endpoint.", "type": "boolean" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "updateTime": { "description": "Output only. Timestamp when this IndexEndpoint was last updated. This timestamp is not updated when the endpoint's DeployedIndexes are updated, e.g. due to updates of the original Indexes they are the deployments of.", "format": "google-datetime", @@ -29311,7 +30037,8 @@ "EUC_AGENT_API_STATE", "IDLE_SHUTDOWN_AGENT_STATE", "PROXY_AGENT_STATE", - "GCR_DNS_STATE" + "GCR_DNS_STATE", + "GUEST_ATTRIBUTE_STATE" ], "enumDescriptions": [ "Service name unknown.", @@ -29324,7 +30051,8 @@ "Represents the EUC agent server API endpoint.", "Represents the idle shutdown agent sidecar container.", "Represents the proxy agent sidecar container.", - "Represents resolving DNS for the gcr.io endpoint." + "Represents resolving DNS for the gcr.io endpoint.", + "Represents if the guest attribute service is enabled." ], "type": "string" }, @@ -31366,6 +32094,16 @@ "description": "Sample Predict instance, same format as PredictRequest.instances, this can be set as a replacement of ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we will generate predict schema from collected predict requests.", "type": "any" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "scheduleState": { "description": "Output only. Schedule state when the monitoring job is in Running state.", "enum": [ @@ -33312,7 +34050,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter": { - "description": "Numeric filter is used to search a subset of the entities by using boolean rules on numeric columns. For example: Database Point 0: {name: “a” value_int: 42} {name: “b” value_float: 1.0} Database Point 1: {name: “a” value_int: 10} {name: “b” value_float: 2.0} Database Point 2: {name: “a” value_int: -1} {name: “b” value_float: 3.0} Query: {name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 {name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1", + "description": "Numeric filter is used to search a subset of the entities by using boolean rules on numeric columns. For example: Database Point 0: {name: \"a\" value_int: 42} {name: \"b\" value_float: 1.0} Database Point 1: {name: \"a\" value_int: 10} {name: \"b\" value_float: 2.0} Database Point 2: {name: \"a\" value_int: -1} {name: \"b\" value_float: 3.0} Query: {name: \"a\" value_int: 12 operator: LESS} // Matches Point 1, 2 {name: \"b\" value_float: 2.0 operator: EQUAL} // Matches Point 1", "id": "GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter", "properties": { "name": { @@ -33653,7 +34391,7 @@ }, "encryptionSpec": { "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", - "description": "Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookRuntimeTemplate has an encryption spec." + "description": "Customer-managed encryption key spec for the notebook execution job. This field is auto-populated if the NotebookService.NotebookRuntimeTemplate has an encryption spec." }, "executionTimeout": { "description": "Max running time of the execution job in seconds (default 86400s / 24 hrs).", @@ -34069,6 +34807,72 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PairwiseMetricInput": { + "description": "Input for pairwise metric.", + "id": "GoogleCloudAiplatformV1beta1PairwiseMetricInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1beta1PairwiseMetricInstance", + "description": "Required. Pairwise metric instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1PairwiseMetricSpec", + "description": "Required. Spec for pairwise metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PairwiseMetricInstance": { + "description": "Pairwise metric instance. Usually one instance corresponds to one row in an evaluation dataset.", + "id": "GoogleCloudAiplatformV1beta1PairwiseMetricInstance", + "properties": { + "jsonInstance": { + "description": "Instance specified as a json string. String key-value pairs are expected in the json_instance to render PairwiseMetricSpec.instance_prompt_template.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PairwiseMetricResult": { + "description": "Spec for pairwise metric result.", + "id": "GoogleCloudAiplatformV1beta1PairwiseMetricResult", + "properties": { + "explanation": { + "description": "Output only. Explanation for pairwise metric score.", + "readOnly": true, + "type": "string" + }, + "pairwiseChoice": { + "description": "Output only. Pairwise metric choice.", + "enum": [ + "PAIRWISE_CHOICE_UNSPECIFIED", + "BASELINE", + "CANDIDATE", + "TIE" + ], + "enumDescriptions": [ + "Unspecified prediction choice.", + "Baseline prediction wins", + "Candidate prediction wins", + "Winner cannot be determined" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PairwiseMetricSpec": { + "description": "Spec for pairwise metric.", + "id": "GoogleCloudAiplatformV1beta1PairwiseMetricSpec", + "properties": { + "metricPromptTemplate": { + "description": "Required. Metric prompt template for pairwise metric.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityInput": { "description": "Input for pairwise question answering quality metric.", "id": "GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityInput", @@ -34379,6 +35183,16 @@ "$ref": "GoogleCloudAiplatformV1beta1ResourceRuntimeSpec", "description": "Optional. Persistent Resource runtime spec. For example, used for Ray cluster configuration." }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "startTime": { "description": "Output only. Time when the PersistentResource for the first time entered the `RUNNING` state.", "format": "google-datetime", @@ -34896,6 +35710,61 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PointwiseMetricInput": { + "description": "Input for pointwise metric.", + "id": "GoogleCloudAiplatformV1beta1PointwiseMetricInput", + "properties": { + "instance": { + "$ref": "GoogleCloudAiplatformV1beta1PointwiseMetricInstance", + "description": "Required. Pointwise metric instance." + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1PointwiseMetricSpec", + "description": "Required. Spec for pointwise metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PointwiseMetricInstance": { + "description": "Pointwise metric instance. Usually one instance corresponds to one row in an evaluation dataset.", + "id": "GoogleCloudAiplatformV1beta1PointwiseMetricInstance", + "properties": { + "jsonInstance": { + "description": "Instance specified as a json string. String key-value pairs are expected in the json_instance to render PointwiseMetricSpec.instance_prompt_template.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PointwiseMetricResult": { + "description": "Spec for pointwise metric result.", + "id": "GoogleCloudAiplatformV1beta1PointwiseMetricResult", + "properties": { + "explanation": { + "description": "Output only. Explanation for pointwise metric score.", + "readOnly": true, + "type": "string" + }, + "score": { + "description": "Output only. Pointwise metric score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PointwiseMetricSpec": { + "description": "Spec for pointwise metric.", + "id": "GoogleCloudAiplatformV1beta1PointwiseMetricSpec", + "properties": { + "metricPromptTemplate": { + "description": "Required. Metric prompt template for pointwise metric.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Port": { "description": "Represents a network port in a container.", "id": "GoogleCloudAiplatformV1beta1Port", @@ -35290,6 +36159,10 @@ "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke", "description": "Optional. Deploy PublisherModel to Google Kubernetes Engine." }, + "multiDeployVertex": { + "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex", + "description": "Optional. Multiple setups to deploy the PublisherModel to Vertex Endpoint." + }, "openEvaluationPipeline": { "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences", "description": "Optional. Open evaluation pipeline of the PublisherModel." @@ -35416,6 +36289,20 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex": { + "description": "Multiple setups to deploy the PublisherModel.", + "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex", + "properties": { + "multiDeployVertex": { + "description": "Optional. One click deployment configurations.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines": { "description": "Open fine tuning pipelines.", "id": "GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines", @@ -36375,10 +37262,25 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RagFileParsingConfig": { + "description": "Specifies the parsing config for RagFiles.", + "id": "GoogleCloudAiplatformV1beta1RagFileParsingConfig", + "properties": { + "useAdvancedPdfParsing": { + "description": "Whether to use advanced PDF parsing.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RagQuery": { "description": "A query to retrieve relevant contexts.", "id": "GoogleCloudAiplatformV1beta1RagQuery", "properties": { + "ranking": { + "$ref": "GoogleCloudAiplatformV1beta1RagQueryRanking", + "description": "Optional. Configurations for hybrid search results ranking." + }, "similarityTopK": { "description": "Optional. The number of contexts to retrieve.", "format": "int32", @@ -36391,6 +37293,18 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RagQueryRanking": { + "description": "Configurations for hybrid search results ranking.", + "id": "GoogleCloudAiplatformV1beta1RagQueryRanking", + "properties": { + "alpha": { + "description": "Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RawPredictRequest": { "description": "Request message for PredictionService.RawPredict.", "id": "GoogleCloudAiplatformV1beta1RawPredictRequest", @@ -37115,10 +38029,6 @@ }, "type": "array" }, - "ranking": { - "$ref": "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking", - "description": "Optional. Configurations for hybrid search results ranking." - }, "vectorDistanceThreshold": { "description": "Optional. Only return contexts with vector distance smaller than the threshold.", "format": "double", @@ -37145,18 +38055,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking": { - "description": "Configurations for hybrid search results ranking.", - "id": "GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking", - "properties": { - "alpha": { - "description": "Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1RetrieveContextsResponse": { "description": "Response message for VertexRagService.RetrieveContexts.", "id": "GoogleCloudAiplatformV1beta1RetrieveContextsResponse", @@ -37773,6 +38671,11 @@ "description": "Optional. Indicates if the job should retry for internal errors after the job starts running. If true, overrides `Scheduling.restart_job_on_worker_restart` to false.", "type": "boolean" }, + "maxWaitDuration": { + "description": "Optional. This is the maximum duration that a job will wait for the requested resources to be provisioned if the scheduling strategy is set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait indefinitely. The default is 24 hours.", + "format": "google-duration", + "type": "string" + }, "restartJobOnWorkerRestart": { "description": "Restarts the entire CustomJob if a worker gets restarted. This feature can be used by distributed training jobs that are not resilient to workers leaving and joining a job.", "type": "boolean" @@ -37784,21 +38687,24 @@ "ON_DEMAND", "LOW_COST", "STANDARD", - "SPOT" + "SPOT", + "DWS_FLEX_START" ], "enumDeprecated": [ false, true, true, false, + false, false ], "enumDescriptions": [ "Strategy will default to STANDARD.", - "Regular on-demand provisioning strategy.", - "Low cost by making potential use of spot resources.", + "Deprecated. Regular on-demand provisioning strategy.", + "Deprecated. Low cost by making potential use of spot resources.", "Standard provisioning strategy uses regular on-demand resources.", - "Spot provisioning strategy uses spot resources." + "Spot provisioning strategy uses spot resources.", + "DWS Flex start strategy uses DWS to queue for resources." ], "type": "string" }, @@ -43205,12 +44111,25 @@ "readOnly": true, "type": "string" }, + "totalTruncatedExampleCount": { + "description": "The number of examples in the dataset that have been truncated by any amount.", + "format": "int64", + "type": "string" + }, "totalTuningCharacterCount": { "description": "Output only. Number of tuning characters in the tuning dataset.", "format": "int64", "readOnly": true, "type": "string" }, + "truncatedExampleIndices": { + "description": "A partial sample of the indices (starting from 1) of the truncated examples.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, "tuningDatasetExampleCount": { "description": "Output only. Number of examples in the tuning dataset.", "format": "int64", @@ -45170,11 +46089,11 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1VertexAISearch": { - "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation", + "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder", "id": "GoogleCloudAiplatformV1beta1VertexAISearch", "properties": { "datastore": { - "description": "Required. Fully-qualified Vertex AI Search's datastore resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", + "description": "Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", "type": "string" } }, diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 8c972b68413..1c6a0879bf3 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -145,6 +145,8 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.Datasets = NewDatasetsService(s) + s.Endpoints = NewEndpointsService(s) s.Media = NewMediaService(s) s.Projects = NewProjectsService(s) s.Publishers = NewPublishersService(s) @@ -156,6 +158,10 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + Datasets *DatasetsService + + Endpoints *EndpointsService + Media *MediaService Projects *ProjectsService @@ -170,6 +176,36 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewDatasetsService(s *Service) *DatasetsService { + rs := &DatasetsService{s: s} + rs.DatasetVersions = NewDatasetsDatasetVersionsService(s) + return rs +} + +type DatasetsService struct { + s *Service + + DatasetVersions *DatasetsDatasetVersionsService +} + +func NewDatasetsDatasetVersionsService(s *Service) *DatasetsDatasetVersionsService { + rs := &DatasetsDatasetVersionsService{s: s} + return rs +} + +type DatasetsDatasetVersionsService struct { + s *Service +} + +func NewEndpointsService(s *Service) *EndpointsService { + rs := &EndpointsService{s: s} + return rs +} + +type EndpointsService struct { + s *Service +} + func NewMediaService(s *Service) *MediaService { rs := &MediaService{s: s} return rs @@ -4383,6 +4419,8 @@ type GoogleCloudAiplatformV1beta1CancelTuningJobRequest struct { // GoogleCloudAiplatformV1beta1Candidate: A response candidate generated from // the model. type GoogleCloudAiplatformV1beta1Candidate struct { + // AvgLogprobs: Output only. Average log probability score of the candidate. + AvgLogprobs float64 `json:"avgLogprobs,omitempty"` // CitationMetadata: Output only. Source attribution of the generated content. CitationMetadata *GoogleCloudAiplatformV1beta1CitationMetadata `json:"citationMetadata,omitempty"` // Content: Output only. Content parts of the candidate. @@ -4400,8 +4438,8 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // "MAX_TOKENS" - Token generation reached the configured maximum output // tokens. // "SAFETY" - Token generation stopped because the content potentially - // contains safety violations. NOTE: When streaming, Candidate.content is empty - // if content filters blocks the output. + // contains safety violations. NOTE: When streaming, content is empty if + // content filters blocks the output. // "RECITATION" - Token generation stopped because the content potentially // contains copyright violations. // "OTHER" - All other reasons that stopped the token generation. @@ -4422,15 +4460,15 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // SafetyRatings: Output only. List of ratings for the safety of a response // candidate. There is at most one rating per category. SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` - // ForceSendFields is a list of field names (e.g. "CitationMetadata") to + // ForceSendFields is a list of field names (e.g. "AvgLogprobs") 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. "CitationMetadata") 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. "AvgLogprobs") 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:"-"` } @@ -4440,6 +4478,20 @@ func (s GoogleCloudAiplatformV1beta1Candidate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudAiplatformV1beta1Candidate) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1Candidate + var s1 struct { + AvgLogprobs gensupport.JSONFloat64 `json:"avgLogprobs"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.AvgLogprobs = float64(s1.AvgLogprobs) + return nil +} + // GoogleCloudAiplatformV1beta1CheckTrialEarlyStoppingStateMetatdata: This // message will be placed in the metadata field of a // google.longrunning.Operation associated with a CheckTrialEarlyStoppingState @@ -7904,6 +7956,10 @@ type GoogleCloudAiplatformV1beta1EntityType struct { // generation time. If unset (or explicitly set to 0), default to 4000 days // TTL. OfflineStorageTtlDays int64 `json:"offlineStorageTtlDays,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // UpdateTime: Output only. Timestamp when this EntityType was most recently // updated. UpdateTime string `json:"updateTime,omitempty"` @@ -8074,12 +8130,16 @@ type GoogleCloudAiplatformV1beta1EvaluateInstancesRequest struct { FulfillmentInput *GoogleCloudAiplatformV1beta1FulfillmentInput `json:"fulfillmentInput,omitempty"` // GroundednessInput: Input for groundedness metric. GroundednessInput *GoogleCloudAiplatformV1beta1GroundednessInput `json:"groundednessInput,omitempty"` + // PairwiseMetricInput: Input for pairwise metric. + PairwiseMetricInput *GoogleCloudAiplatformV1beta1PairwiseMetricInput `json:"pairwiseMetricInput,omitempty"` // PairwiseQuestionAnsweringQualityInput: Input for pairwise question answering // quality metric. PairwiseQuestionAnsweringQualityInput *GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityInput `json:"pairwiseQuestionAnsweringQualityInput,omitempty"` // PairwiseSummarizationQualityInput: Input for pairwise summarization quality // metric. PairwiseSummarizationQualityInput *GoogleCloudAiplatformV1beta1PairwiseSummarizationQualityInput `json:"pairwiseSummarizationQualityInput,omitempty"` + // PointwiseMetricInput: Input for pointwise metric. + PointwiseMetricInput *GoogleCloudAiplatformV1beta1PointwiseMetricInput `json:"pointwiseMetricInput,omitempty"` // QuestionAnsweringCorrectnessInput: Input for question answering correctness // metric. QuestionAnsweringCorrectnessInput *GoogleCloudAiplatformV1beta1QuestionAnsweringCorrectnessInput `json:"questionAnsweringCorrectnessInput,omitempty"` @@ -8145,12 +8205,16 @@ type GoogleCloudAiplatformV1beta1EvaluateInstancesResponse struct { FulfillmentResult *GoogleCloudAiplatformV1beta1FulfillmentResult `json:"fulfillmentResult,omitempty"` // GroundednessResult: Result for groundedness metric. GroundednessResult *GoogleCloudAiplatformV1beta1GroundednessResult `json:"groundednessResult,omitempty"` + // PairwiseMetricResult: Result for pairwise metric. + PairwiseMetricResult *GoogleCloudAiplatformV1beta1PairwiseMetricResult `json:"pairwiseMetricResult,omitempty"` // PairwiseQuestionAnsweringQualityResult: Result for pairwise question // answering quality metric. PairwiseQuestionAnsweringQualityResult *GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityResult `json:"pairwiseQuestionAnsweringQualityResult,omitempty"` // PairwiseSummarizationQualityResult: Result for pairwise summarization // quality metric. PairwiseSummarizationQualityResult *GoogleCloudAiplatformV1beta1PairwiseSummarizationQualityResult `json:"pairwiseSummarizationQualityResult,omitempty"` + // PointwiseMetricResult: Generic metrics. Result for pointwise metric. + PointwiseMetricResult *GoogleCloudAiplatformV1beta1PointwiseMetricResult `json:"pointwiseMetricResult,omitempty"` // QuestionAnsweringCorrectnessResult: Result for question answering // correctness metric. QuestionAnsweringCorrectnessResult *GoogleCloudAiplatformV1beta1QuestionAnsweringCorrectnessResult `json:"questionAnsweringCorrectnessResult,omitempty"` @@ -10202,6 +10266,11 @@ type GoogleCloudAiplatformV1beta1FeatureGroupBigQuery struct { // EntityIdColumns: Optional. Columns to construct entity_id / row keys. If not // provided defaults to `entity_id`. EntityIdColumns []string `json:"entityIdColumns,omitempty"` + // TimeSeries: Optional. If the source is a time-series source, this can be set + // to control how downstream sources (ex: FeatureView ) will treat time-series + // sources. If not set, will treat the source as a time-series source with + // `feature_timestamp` as timestamp column and no scan boundary. + TimeSeries *GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries `json:"timeSeries,omitempty"` // ForceSendFields is a list of field names (e.g. "BigQuerySource") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -10220,6 +10289,30 @@ func (s GoogleCloudAiplatformV1beta1FeatureGroupBigQuery) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries struct { + // TimestampColumn: Optional. Column hosting timestamp values for a time-series + // source. Will be used to determine the latest `feature_values` for each + // entity. Optional. If not provided, column named `feature_timestamp` of type + // `TIMESTAMP` will be used. + TimestampColumn string `json:"timestampColumn,omitempty"` + // ForceSendFields is a list of field names (e.g. "TimestampColumn") 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. "TimestampColumn") 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 GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1FeatureGroupBigQueryTimeSeries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1FeatureMonitoringStatsAnomaly: A list of // historical SnapshotAnalysis or ImportFeaturesAnalysis stats requested by // user, sorted by FeatureStatsAnomaly.start_time descending. @@ -10366,6 +10459,10 @@ type GoogleCloudAiplatformV1beta1FeatureOnlineStore struct { // PrivateServiceConnectConfig.enable_private_service_connect to use private // endpoint. Otherwise will use public endpoint by default. Optimized *GoogleCloudAiplatformV1beta1FeatureOnlineStoreOptimized `json:"optimized,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. State of the featureOnlineStore. // // Possible values: @@ -10802,6 +10899,10 @@ type GoogleCloudAiplatformV1beta1FeatureView struct { // `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_ // store}/featureViews/{feature_view}` Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // ServiceAccountEmail: Output only. A Service Account unique to this // FeatureView. The role bigquery.dataViewer should be granted to this service // account to allow Vertex AI Feature Store to sync data to the online store. @@ -11088,6 +11189,10 @@ type GoogleCloudAiplatformV1beta1FeatureViewSync struct { Name string `json:"name,omitempty"` // RunTime: Output only. Time when this FeatureViewSync is finished. RunTime *GoogleTypeInterval `json:"runTime,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // SyncSummary: Output only. Summary of the sync job. SyncSummary *GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary `json:"syncSummary,omitempty"` @@ -11145,6 +11250,9 @@ func (s GoogleCloudAiplatformV1beta1FeatureViewSyncConfig) MarshalJSON() ([]byte type GoogleCloudAiplatformV1beta1FeatureViewSyncSyncSummary struct { // RowSynced: Output only. Total number of rows synced. RowSynced int64 `json:"rowSynced,omitempty,string"` + // SystemWatermarkTime: Lower bound of the system time watermark for the sync + // job. This is only set for continuously syncing feature views. + SystemWatermarkTime string `json:"systemWatermarkTime,omitempty"` // TotalSlot: Output only. BigQuery slot milliseconds consumed for the sync // job. TotalSlot int64 `json:"totalSlot,omitempty,string"` @@ -11290,6 +11398,10 @@ type GoogleCloudAiplatformV1beta1Featurestore struct { // `offline_storage_ttl_days` for each EntityType under a featurestore. If not // set, default to 4000 days OnlineStorageTtlDays int64 `json:"onlineStorageTtlDays,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // State: Output only. State of the featurestore. // // Possible values: @@ -12320,13 +12432,13 @@ type GoogleCloudAiplatformV1beta1FunctionCallingConfig struct { // Possible values: // "MODE_UNSPECIFIED" - Unspecified function calling mode. This value should // not be used. - // "AUTO" - Default model behavior, model decides to predict either a - // function call or a natural language repspose. - // "ANY" - Model is constrained to always predicting a function call only. If - // "allowed_function_names" are set, the predicted function call will be + // "AUTO" - Default model behavior, model decides to predict either function + // calls or natural language response. + // "ANY" - Model is constrained to always predicting function calls only. If + // "allowed_function_names" are set, the predicted function calls will be // limited to any one of "allowed_function_names", else the predicted function - // call will be any one of the provided "function_declarations". - // "NONE" - Model will not predict any function call. Model behavior is same + // calls will be any one of the provided "function_declarations". + // "NONE" - Model will not predict any function calls. Model behavior is same // as when not passing any function declarations. Mode string `json:"mode,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedFunctionNames") to @@ -12654,7 +12766,9 @@ func (s GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback) Marsh type GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata struct { // CandidatesTokenCount: Number of tokens in the response(s). CandidatesTokenCount int64 `json:"candidatesTokenCount,omitempty"` - // PromptTokenCount: Number of tokens in the request. + // PromptTokenCount: Number of tokens in the request. When `cached_content` is + // set, this is still the total effective prompt size meaning this includes the + // number of tokens in the cached content. PromptTokenCount int64 `json:"promptTokenCount,omitempty"` TotalTokenCount int64 `json:"totalTokenCount,omitempty"` // ForceSendFields is a list of field names (e.g. "CandidatesTokenCount") to @@ -12728,6 +12842,8 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { ResponseSchema *GoogleCloudAiplatformV1beta1Schema `json:"responseSchema,omitempty"` // RoutingConfig: Optional. Routing configuration. RoutingConfig *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig `json:"routingConfig,omitempty"` + // Seed: Optional. Seed. + Seed int64 `json:"seed,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. @@ -12776,7 +12892,8 @@ func (s *GoogleCloudAiplatformV1beta1GenerationConfig) UnmarshalJSON(data []byte return nil } -// GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig: Routing config. +// GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig: The configuration +// for routing the request to a specific model. type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig struct { // AutoMode: Automated routing. AutoMode *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode `json:"autoMode,omitempty"` @@ -12834,7 +12951,7 @@ func (s GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode // When manual routing is set, the specified model will be used directly. type GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode struct { // ModelName: The model name to use. Only the public LLM models are accepted. - // e.g. gemini-1.5-pro-001. + // e.g. 'gemini-1.5-pro-001'. ModelName string `json:"modelName,omitempty"` // ForceSendFields is a list of field names (e.g. "ModelName") to // unconditionally include in API requests. By default, fields with empty or @@ -13683,6 +13800,8 @@ type GoogleCloudAiplatformV1beta1ImportRagFilesConfig struct { // RagFileChunkingConfig: Specifies the size and overlap of chunks after // importing RagFiles. RagFileChunkingConfig *GoogleCloudAiplatformV1beta1RagFileChunkingConfig `json:"ragFileChunkingConfig,omitempty"` + // RagFileParsingConfig: Specifies the parsing config for RagFiles. + RagFileParsingConfig *GoogleCloudAiplatformV1beta1RagFileParsingConfig `json:"ragFileParsingConfig,omitempty"` // SlackSource: Slack channels with their corresponding access tokens. SlackSource *GoogleCloudAiplatformV1beta1SlackSource `json:"slackSource,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsSource") to @@ -13782,6 +13901,10 @@ type GoogleCloudAiplatformV1beta1Index struct { MetadataSchemaUri string `json:"metadataSchemaUri,omitempty"` // Name: Output only. The resource name of the Index. Name string `json:"name,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // UpdateTime: Output only. Timestamp when this Index was most recently // updated. This also includes any update to the contents of the Index. Note // that Operations working on this Index may have their @@ -14078,6 +14201,10 @@ type GoogleCloudAiplatformV1beta1IndexEndpoint struct { // PublicEndpointEnabled: Optional. If true, the deployed index will be // accessible through public endpoint. PublicEndpointEnabled bool `json:"publicEndpointEnabled,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // UpdateTime: Output only. Timestamp when this IndexEndpoint was last updated. // This timestamp is not updated when the endpoint's DeployedIndexes are // updated, e.g. due to updates of the original Indexes they are the @@ -14345,6 +14472,8 @@ type GoogleCloudAiplatformV1beta1InternalOsServiceStateInstance struct { // container. // "PROXY_AGENT_STATE" - Represents the proxy agent sidecar container. // "GCR_DNS_STATE" - Represents resolving DNS for the gcr.io endpoint. + // "GUEST_ATTRIBUTE_STATE" - Represents if the guest attribute service is + // enabled. ServiceName string `json:"serviceName,omitempty"` // ServiceState: Required. internal service state. // @@ -17397,6 +17526,10 @@ type GoogleCloudAiplatformV1beta1ModelDeploymentMonitoringJob struct { // ModelDeploymentMonitoringJob.predict_instance_schema_uri. If not set, we // will generate predict schema from collected predict requests. SamplePredictInstance interface{} `json:"samplePredictInstance,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // ScheduleState: Output only. Schedule state when the monitoring job is in // Running state. // @@ -20136,12 +20269,12 @@ func (s *GoogleCloudAiplatformV1beta1NearestNeighborQueryEmbedding) UnmarshalJSO // GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter: Numeric // filter is used to search a subset of the entities by using boolean rules on -// numeric columns. For example: Database Point 0: {name: “a” value_int: -// 42} {name: “b” value_float: 1.0} Database Point 1: {name: “a” -// value_int: 10} {name: “b” value_float: 2.0} Database Point 2: {name: -// “a” value_int: -1} {name: “b” value_float: 3.0} Query: {name: -// “a” value_int: 12 operator: LESS} // Matches Point 1, 2 {name: “b” -// value_float: 2.0 operator: EQUAL} // Matches Point 1 +// numeric columns. For example: Database Point 0: {name: "a" value_int: 42} +// {name: "b" value_float: 1.0} Database Point 1: {name: "a" value_int: 10} +// {name: "b" value_float: 2.0} Database Point 2: {name: "a" value_int: -1} +// {name: "b" value_float: 3.0} Query: {name: "a" value_int: 12 operator: LESS} +// // Matches Point 1, 2 {name: "b" value_float: 2.0 operator: EQUAL} // +// Matches Point 1 type GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter struct { // Name: Required. Column name in BigQuery that used as filters. Name string `json:"name,omitempty"` @@ -20610,8 +20743,8 @@ type GoogleCloudAiplatformV1beta1NotebookExecutionJob struct { // up to 128 characters long and can consist of any UTF-8 characters. DisplayName string `json:"displayName,omitempty"` // EncryptionSpec: Customer-managed encryption key spec for the notebook - // execution job. This field is auto-populated if the NotebookRuntimeTemplate - // has an encryption spec. + // execution job. This field is auto-populated if the + // NotebookService.NotebookRuntimeTemplate has an encryption spec. EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` // ExecutionTimeout: Max running time of the execution job in seconds (default // 86400s / 24 hrs). @@ -21036,6 +21169,109 @@ func (s GoogleCloudAiplatformV1beta1NotebookRuntimeTemplateRef) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PairwiseMetricInput: Input for pairwise metric. +type GoogleCloudAiplatformV1beta1PairwiseMetricInput struct { + // Instance: Required. Pairwise metric instance. + Instance *GoogleCloudAiplatformV1beta1PairwiseMetricInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for pairwise metric. + MetricSpec *GoogleCloudAiplatformV1beta1PairwiseMetricSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") 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. "Instance") 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 GoogleCloudAiplatformV1beta1PairwiseMetricInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PairwiseMetricInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PairwiseMetricInstance: Pairwise metric +// instance. Usually one instance corresponds to one row in an evaluation +// dataset. +type GoogleCloudAiplatformV1beta1PairwiseMetricInstance struct { + // JsonInstance: Instance specified as a json string. String key-value pairs + // are expected in the json_instance to render + // PairwiseMetricSpec.instance_prompt_template. + JsonInstance string `json:"jsonInstance,omitempty"` + // ForceSendFields is a list of field names (e.g. "JsonInstance") 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. "JsonInstance") 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 GoogleCloudAiplatformV1beta1PairwiseMetricInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PairwiseMetricInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PairwiseMetricResult: Spec for pairwise metric +// result. +type GoogleCloudAiplatformV1beta1PairwiseMetricResult struct { + // Explanation: Output only. Explanation for pairwise metric score. + Explanation string `json:"explanation,omitempty"` + // PairwiseChoice: Output only. Pairwise metric choice. + // + // Possible values: + // "PAIRWISE_CHOICE_UNSPECIFIED" - Unspecified prediction choice. + // "BASELINE" - Baseline prediction wins + // "CANDIDATE" - Candidate prediction wins + // "TIE" - Winner cannot be determined + PairwiseChoice string `json:"pairwiseChoice,omitempty"` + // ForceSendFields is a list of field names (e.g. "Explanation") 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. "Explanation") 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 GoogleCloudAiplatformV1beta1PairwiseMetricResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PairwiseMetricResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PairwiseMetricSpec: Spec for pairwise metric. +type GoogleCloudAiplatformV1beta1PairwiseMetricSpec struct { + // MetricPromptTemplate: Required. Metric prompt template for pairwise metric. + MetricPromptTemplate string `json:"metricPromptTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "MetricPromptTemplate") 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. "MetricPromptTemplate") 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 GoogleCloudAiplatformV1beta1PairwiseMetricSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PairwiseMetricSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityInput: Input for // pairwise question answering quality metric. type GoogleCloudAiplatformV1beta1PairwiseQuestionAnsweringQualityInput struct { @@ -21429,6 +21665,10 @@ type GoogleCloudAiplatformV1beta1PersistentResource struct { // ResourceRuntimeSpec: Optional. Persistent Resource runtime spec. For // example, used for Ray cluster configuration. ResourceRuntimeSpec *GoogleCloudAiplatformV1beta1ResourceRuntimeSpec `json:"resourceRuntimeSpec,omitempty"` + // SatisfiesPzi: Output only. Reserved for future use. + SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` // StartTime: Output only. Time when the PersistentResource for the first time // entered the `RUNNING` state. StartTime string `json:"startTime,omitempty"` @@ -21959,6 +22199,118 @@ func (s GoogleCloudAiplatformV1beta1PipelineTemplateMetadata) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PointwiseMetricInput: Input for pointwise +// metric. +type GoogleCloudAiplatformV1beta1PointwiseMetricInput struct { + // Instance: Required. Pointwise metric instance. + Instance *GoogleCloudAiplatformV1beta1PointwiseMetricInstance `json:"instance,omitempty"` + // MetricSpec: Required. Spec for pointwise metric. + MetricSpec *GoogleCloudAiplatformV1beta1PointwiseMetricSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instance") 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. "Instance") 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 GoogleCloudAiplatformV1beta1PointwiseMetricInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PointwiseMetricInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PointwiseMetricInstance: Pointwise metric +// instance. Usually one instance corresponds to one row in an evaluation +// dataset. +type GoogleCloudAiplatformV1beta1PointwiseMetricInstance struct { + // JsonInstance: Instance specified as a json string. String key-value pairs + // are expected in the json_instance to render + // PointwiseMetricSpec.instance_prompt_template. + JsonInstance string `json:"jsonInstance,omitempty"` + // ForceSendFields is a list of field names (e.g. "JsonInstance") 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. "JsonInstance") 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 GoogleCloudAiplatformV1beta1PointwiseMetricInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PointwiseMetricInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PointwiseMetricResult: Spec for pointwise metric +// result. +type GoogleCloudAiplatformV1beta1PointwiseMetricResult struct { + // Explanation: Output only. Explanation for pointwise metric score. + Explanation string `json:"explanation,omitempty"` + // Score: Output only. Pointwise metric score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Explanation") 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. "Explanation") 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 GoogleCloudAiplatformV1beta1PointwiseMetricResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PointwiseMetricResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1PointwiseMetricResult) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1PointwiseMetricResult + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1PointwiseMetricSpec: Spec for pointwise metric. +type GoogleCloudAiplatformV1beta1PointwiseMetricSpec struct { + // MetricPromptTemplate: Required. Metric prompt template for pointwise metric. + MetricPromptTemplate string `json:"metricPromptTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "MetricPromptTemplate") 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. "MetricPromptTemplate") 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 GoogleCloudAiplatformV1beta1PointwiseMetricSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PointwiseMetricSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Port: Represents a network port in a container. type GoogleCloudAiplatformV1beta1Port struct { // ContainerPort: The number of the port to expose on the pod's IP address. @@ -22533,6 +22885,9 @@ type GoogleCloudAiplatformV1beta1PublisherModelCallToAction struct { Deploy *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy `json:"deploy,omitempty"` // DeployGke: Optional. Deploy PublisherModel to Google Kubernetes Engine. DeployGke *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke `json:"deployGke,omitempty"` + // MultiDeployVertex: Optional. Multiple setups to deploy the PublisherModel to + // Vertex Endpoint. + MultiDeployVertex *GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex `json:"multiDeployVertex,omitempty"` // OpenEvaluationPipeline: Optional. Open evaluation pipeline of the // PublisherModel. OpenEvaluationPipeline *GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences `json:"openEvaluationPipeline,omitempty"` @@ -22677,6 +23032,29 @@ func (s GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployGke) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex: Multiple +// setups to deploy the PublisherModel. +type GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex struct { + // MultiDeployVertex: Optional. One click deployment configurations. + MultiDeployVertex []*GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeploy `json:"multiDeployVertex,omitempty"` + // ForceSendFields is a list of field names (e.g. "MultiDeployVertex") 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. "MultiDeployVertex") 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 GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PublisherModelCallToActionDeployVertex + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines // : Open fine tuning pipelines. type GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines struct { @@ -24137,21 +24515,46 @@ func (s GoogleCloudAiplatformV1beta1RagFileChunkingConfig) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RagFileParsingConfig: Specifies the parsing +// config for RagFiles. +type GoogleCloudAiplatformV1beta1RagFileParsingConfig struct { + // UseAdvancedPdfParsing: Whether to use advanced PDF parsing. + UseAdvancedPdfParsing bool `json:"useAdvancedPdfParsing,omitempty"` + // ForceSendFields is a list of field names (e.g. "UseAdvancedPdfParsing") 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. "UseAdvancedPdfParsing") 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 GoogleCloudAiplatformV1beta1RagFileParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagFileParsingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RagQuery: A query to retrieve relevant contexts. type GoogleCloudAiplatformV1beta1RagQuery struct { + // Ranking: Optional. Configurations for hybrid search results ranking. + Ranking *GoogleCloudAiplatformV1beta1RagQueryRanking `json:"ranking,omitempty"` // SimilarityTopK: Optional. The number of contexts to retrieve. SimilarityTopK int64 `json:"similarityTopK,omitempty"` // Text: Optional. The query in text format to get relevant contexts. Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "SimilarityTopK") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "Ranking") 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. "SimilarityTopK") 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. "Ranking") 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:"-"` } @@ -24161,6 +24564,46 @@ func (s GoogleCloudAiplatformV1beta1RagQuery) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RagQueryRanking: Configurations for hybrid +// search results ranking. +type GoogleCloudAiplatformV1beta1RagQueryRanking struct { + // Alpha: Optional. Alpha value controls the weight between dense and sparse + // vector search results. The range is [0, 1], while 0 means sparse vector + // search only and 1 means dense vector search only. The default value is 0.5 + // which balances sparse and dense vector search equally. + Alpha float64 `json:"alpha,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alpha") 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. "Alpha") 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 GoogleCloudAiplatformV1beta1RagQueryRanking) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagQueryRanking + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1RagQueryRanking) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1RagQueryRanking + var s1 struct { + Alpha gensupport.JSONFloat64 `json:"alpha"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Alpha = float64(s1.Alpha) + return nil +} + // GoogleCloudAiplatformV1beta1RawPredictRequest: Request message for // PredictionService.RawPredict. type GoogleCloudAiplatformV1beta1RawPredictRequest struct { @@ -25288,8 +25731,6 @@ type GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStore struct { // multiple files from one corpus. In the future we may open up multiple // corpora support. RagResources []*GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRagResource `json:"ragResources,omitempty"` - // Ranking: Optional. Configurations for hybrid search results ranking. - Ranking *GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking `json:"ranking,omitempty"` // VectorDistanceThreshold: Optional. Only return contexts with vector distance // smaller than the threshold. VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` @@ -25353,46 +25794,6 @@ func (s GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRagReso return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking: -// Configurations for hybrid search results ranking. -type GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking struct { - // Alpha: Optional. Alpha value controls the weight between dense and sparse - // vector search results. The range is [0, 1], while 0 means sparse vector - // search only and 1 means dense vector search only. The default value is 0.5 - // which balances sparse and dense vector search equally. - Alpha float64 `json:"alpha,omitempty"` - // ForceSendFields is a list of field names (e.g. "Alpha") 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. "Alpha") 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 GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1beta1RetrieveContextsRequestVertexRagStoreRanking - var s1 struct { - Alpha gensupport.JSONFloat64 `json:"alpha"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Alpha = float64(s1.Alpha) - return nil -} - // GoogleCloudAiplatformV1beta1RetrieveContextsResponse: Response message for // VertexRagService.RetrieveContexts. type GoogleCloudAiplatformV1beta1RetrieveContextsResponse struct { @@ -26233,6 +26634,11 @@ type GoogleCloudAiplatformV1beta1Scheduling struct { // errors after the job starts running. If true, overrides // `Scheduling.restart_job_on_worker_restart` to false. DisableRetries bool `json:"disableRetries,omitempty"` + // MaxWaitDuration: Optional. This is the maximum duration that a job will wait + // for the requested resources to be provisioned if the scheduling strategy is + // set to [Strategy.DWS_FLEX_START]. If set to 0, the job will wait + // indefinitely. The default is 24 hours. + MaxWaitDuration string `json:"maxWaitDuration,omitempty"` // RestartJobOnWorkerRestart: Restarts the entire CustomJob if a worker gets // restarted. This feature can be used by distributed training jobs that are // not resilient to workers leaving and joining a job. @@ -26242,11 +26648,14 @@ type GoogleCloudAiplatformV1beta1Scheduling struct { // // Possible values: // "STRATEGY_UNSPECIFIED" - Strategy will default to STANDARD. - // "ON_DEMAND" - Regular on-demand provisioning strategy. - // "LOW_COST" - Low cost by making potential use of spot resources. + // "ON_DEMAND" - Deprecated. Regular on-demand provisioning strategy. + // "LOW_COST" - Deprecated. Low cost by making potential use of spot + // resources. // "STANDARD" - Standard provisioning strategy uses regular on-demand // resources. // "SPOT" - Spot provisioning strategy uses spot resources. + // "DWS_FLEX_START" - DWS Flex start strategy uses DWS to queue for + // resources. Strategy string `json:"strategy,omitempty"` // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` @@ -34980,9 +35389,15 @@ type GoogleCloudAiplatformV1beta1SupervisedTuningDataStats struct { // TotalBillableTokenCount: Output only. Number of billable tokens in the // tuning dataset. TotalBillableTokenCount int64 `json:"totalBillableTokenCount,omitempty,string"` + // TotalTruncatedExampleCount: The number of examples in the dataset that have + // been truncated by any amount. + TotalTruncatedExampleCount int64 `json:"totalTruncatedExampleCount,omitempty,string"` // TotalTuningCharacterCount: Output only. Number of tuning characters in the // tuning dataset. TotalTuningCharacterCount int64 `json:"totalTuningCharacterCount,omitempty,string"` + // TruncatedExampleIndices: A partial sample of the indices (starting from 1) + // of the truncated examples. + TruncatedExampleIndices googleapi.Int64s `json:"truncatedExampleIndices,omitempty"` // TuningDatasetExampleCount: Output only. Number of examples in the tuning // dataset. TuningDatasetExampleCount int64 `json:"tuningDatasetExampleCount,omitempty,string"` @@ -37714,10 +38129,9 @@ func (s *GoogleCloudAiplatformV1beta1Value) UnmarshalJSON(data []byte) error { } // GoogleCloudAiplatformV1beta1VertexAISearch: Retrieve from Vertex AI Search -// datastore for grounding. See -// https://cloud.google.com/vertex-ai-search-and-conversation +// datastore for grounding. See https://cloud.google.com/products/agent-builder type GoogleCloudAiplatformV1beta1VertexAISearch struct { - // Datastore: Required. Fully-qualified Vertex AI Search's datastore resource + // Datastore: Required. Fully-qualified Vertex AI Search data store resource // ID. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ // {dataStore}` @@ -38804,128 +39218,78 @@ func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type MediaUploadCall struct { - s *Service - parent string - googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest - urlParams_ gensupport.URLParams - mediaInfo_ *gensupport.MediaInfo - ctx_ context.Context - header_ http.Header -} - -// Upload: Upload a file into a RagCorpus. -// -// - parent: The name of the RagCorpus resource into which to upload the file. -// Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *MediaService) Upload(parent string, googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest) *MediaUploadCall { - c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1beta1uploadragfilerequest = googlecloudaiplatformv1beta1uploadragfilerequest - return c -} - -// Media specifies the media to upload in one or more chunks. The chunk size -// may be controlled by supplying a MediaOption generated by -// googleapi.ChunkSize. The chunk size defaults to -// googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload -// request will be determined by sniffing the contents of r, unless a -// MediaOption generated by googleapi.ContentType is supplied. -// At most one of Media and ResumableMedia may be set. -func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { - c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) - return c +type DatasetsCreateCall struct { + s *Service + googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResumableMedia specifies the media to upload in chunks and can be canceled -// with ctx. -// -// Deprecated: use Media instead. -// -// At most one of Media and ResumableMedia may be set. mediaType identifies the -// MIME media type of the upload, such as "image/png". If mediaType is "", it -// will be auto-detected. The provided ctx will supersede any context -// previously provided to the Context method. -func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { - c.ctx_ = ctx - c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) +// Create: Creates a Dataset. +func (r *DatasetsService) Create(googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset) *DatasetsCreateCall { + c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlecloudaiplatformv1beta1dataset = googlecloudaiplatformv1beta1dataset return c } -// ProgressUpdater provides a callback function that will be called after every -// chunk. It should be a low-latency function in order to not slow down the -// upload operation. This should only be called when using ResumableMedia (as -// opposed to Media). -func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { - c.mediaInfo_.SetProgressUpdater(pu) +// Parent sets the optional parameter "parent": Required. The resource name of +// the Location to create the Dataset in. Format: +// `projects/{project}/locations/{location}` +func (c *DatasetsCreateCall) Parent(parent string) *DatasetsCreateCall { + c.urlParams_.Set("parent", parent) 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 *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { +func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -// This context will supersede any context previously provided to the -// ResumableMedia method. -func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { +func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall { 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 *MediaUploadCall) Header() http.Header { +func (c *DatasetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1uploadragfilerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1dataset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/ragFiles:upload") - if c.mediaInfo_ != nil { - urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1beta1/{+parent}/ragFiles:upload") - c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) - } - if body == nil { - body = new(bytes.Buffer) - reqHeaders.Set("Content-Type", "application/json") - } - body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) - defer cleanup() + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/datasets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - req.GetBody = getBody - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.media.upload" call. +// Do executes the "aiplatform.datasets.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1UploadRagFileResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1UploadRagFileResponse, error) { +func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38944,24 +39308,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) - if rx != nil { - rx.Client = c.s.client - rx.UserAgent = c.s.userAgent() - ctx := c.ctx_ - if ctx == nil { - ctx = context.TODO() - } - res, err = rx.Upload(ctx) - if err != nil { - return nil, err - } - defer res.Body.Close() - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - } - ret := &GoogleCloudAiplatformV1beta1UploadRagFileResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38974,21 +39321,20 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo return ret, nil } -type ProjectsGetCacheConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetCacheConfig: Gets a GenAI cache config. +// Delete: Deletes a Dataset. // -// - name: Name of the cache config. Format: - -// `projects/{project}/cacheConfig`. -func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { - c := &ProjectsGetCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Dataset to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { + c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -38996,148 +39342,34 @@ func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { +func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { 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 *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { +func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { 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 *ProjectsGetCacheConfigCall) Header() http.Header { +func (c *DatasetsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.getCacheConfig" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1CacheConfig.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 *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CacheConfig, 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 := &GoogleCloudAiplatformV1beta1CacheConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsUpdateCacheConfigCall struct { - s *Service - name string - googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// UpdateCacheConfig: Updates a cache config. -// -// - name: Identifier. Name of the cache config. Format: - -// `projects/{project}/cacheConfig`. -func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig) *ProjectsUpdateCacheConfigCall { - c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1beta1cacheconfig = googlecloudaiplatformv1beta1cacheconfig - 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 *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { - 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 *ProjectsUpdateCacheConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1cacheconfig) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -39148,13 +39380,1914 @@ func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.updateCacheConfig" call. +// Do executes the "aiplatform.datasets.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 *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *DatasetsDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset. +// +// - name: The name of the Dataset resource. +func (r *DatasetsService) Get(name string) *DatasetsGetCall { + c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsGetCall) ReadMask(readMask string) *DatasetsGetCall { + c.urlParams_.Set("readMask", readMask) + 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 *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { + 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 *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { + 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 *DatasetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1Dataset.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 *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1Dataset, 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 := &GoogleCloudAiplatformV1beta1Dataset{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Datasets in a Location. +func (r *DatasetsService) List() *DatasetsListCall { + c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `display_name`: supports = and != * `metadata_schema_uri`: +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" +func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `display_name` * `create_time` * +// `update_time` +func (c *DatasetsListCall) OrderBy(orderBy string) *DatasetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Parent sets the optional parameter "parent": Required. The name of the +// Dataset's parent resource. Format: `projects/{project}/locations/{location}` +func (c *DatasetsListCall) Parent(parent string) *DatasetsListCall { + c.urlParams_.Set("parent", parent) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { + c.urlParams_.Set("readMask", readMask) + 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 *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { + 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 *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { + 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 *DatasetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/datasets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ListDatasetsResponse.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 *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListDatasetsResponse, 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 := &GoogleCloudAiplatformV1beta1ListDatasetsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListDatasetsResponse) 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 DatasetsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Dataset. +// +// - name: Output only. Identifier. The resource name of the Dataset. +func (r *DatasetsService) Patch(name string, googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset) *DatasetsPatchCall { + c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1dataset = googlecloudaiplatformv1beta1dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` * +// `description` * `labels` +func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall { + 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 *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { + 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 *DatasetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1dataset) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1Dataset.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 *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1Dataset, 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 := &GoogleCloudAiplatformV1beta1Dataset{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a version from a Dataset. +// +// - parent: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion) *DatasetsDatasetVersionsCreateCall { + c := &DatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1datasetversion = googlecloudaiplatformv1beta1datasetversion + 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 *DatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *DatasetsDatasetVersionsCreateCall { + 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 *DatasetsDatasetVersionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/datasetVersions") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.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 *DatasetsDatasetVersionsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVersionsDeleteCall { + c := &DatasetsDatasetVersionsDeleteCall{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 *DatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *DatasetsDatasetVersionsDeleteCall { + 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 *DatasetsDatasetVersionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.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 *DatasetsDatasetVersionsDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Get(name string) *DatasetsDatasetVersionsGetCall { + c := &DatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsGetCall) ReadMask(readMask string) *DatasetsDatasetVersionsGetCall { + c.urlParams_.Set("readMask", readMask) + 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 *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsGetCall { + 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 *DatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsGetCall) Context(ctx context.Context) *DatasetsDatasetVersionsGetCall { + 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 *DatasetsDatasetVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1DatasetVersion.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 *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1DatasetVersion, 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 := &GoogleCloudAiplatformV1beta1DatasetVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DatasetVersions in a Dataset. +// +// - parent: The resource name of the Dataset to list DatasetVersions from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) List(parent string) *DatasetsDatasetVersionsListCall { + c := &DatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *DatasetsDatasetVersionsListCall) Filter(filter string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *DatasetsDatasetVersionsListCall) OrderBy(orderBy string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsDatasetVersionsListCall) PageSize(pageSize int64) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsDatasetVersionsListCall) PageToken(pageToken string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsListCall) ReadMask(readMask string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("readMask", readMask) + 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 *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsListCall { + 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 *DatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsListCall) Context(ctx context.Context) *DatasetsDatasetVersionsListCall { + 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 *DatasetsDatasetVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/datasetVersions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse.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 *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse, 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 := &GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListDatasetVersionsResponse) 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 DatasetsDatasetVersionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DatasetVersion. +// +// - name: Output only. Identifier. The resource name of the DatasetVersion. +func (r *DatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion) *DatasetsDatasetVersionsPatchCall { + c := &DatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1datasetversion = googlecloudaiplatformv1beta1datasetversion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` +func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *DatasetsDatasetVersionsPatchCall { + 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 *DatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *DatasetsDatasetVersionsPatchCall { + 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 *DatasetsDatasetVersionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1DatasetVersion.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 *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1DatasetVersion, 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 := &GoogleCloudAiplatformV1beta1DatasetVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsRestoreCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a dataset version. +// +// - name: The name of the DatasetVersion resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Restore(name string) *DatasetsDatasetVersionsRestoreCall { + c := &DatasetsDatasetVersionsRestoreCall{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 *DatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsRestoreCall { + 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 *DatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsRestoreCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *DatasetsDatasetVersionsRestoreCall { + 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 *DatasetsDatasetVersionsRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:restore") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.restore" 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 *DatasetsDatasetVersionsRestoreCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *EndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest) *EndpointsComputeTokensCall { + c := &EndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1computetokensrequest = googlecloudaiplatformv1beta1computetokensrequest + 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 *EndpointsComputeTokensCall) Fields(s ...googleapi.Field) *EndpointsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsComputeTokensCall) Context(ctx context.Context) *EndpointsComputeTokensCall { + 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 *EndpointsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:computeTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ComputeTokensResponse.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 *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1beta1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest) *EndpointsCountTokensCall { + c := &EndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1counttokensrequest = googlecloudaiplatformv1beta1counttokensrequest + 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 *EndpointsCountTokensCall) Fields(s ...googleapi.Field) *EndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsCountTokensCall) Context(ctx context.Context) *EndpointsCountTokensCall { + 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 *EndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:countTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1CountTokensResponse.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 *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CountTokensResponse, 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 := &GoogleCloudAiplatformV1beta1CountTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *EndpointsGenerateContentCall { + c := &EndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + 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 *EndpointsGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsGenerateContentCall) Context(ctx context.Context) *EndpointsGenerateContentCall { + 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 *EndpointsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.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 *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *EndpointsStreamGenerateContentCall { + c := &EndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + 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 *EndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsStreamGenerateContentCall) Context(ctx context.Context) *EndpointsStreamGenerateContentCall { + 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 *EndpointsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.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 *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type MediaUploadCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header +} + +// Upload: Upload a file into a RagCorpus. +// +// - parent: The name of the RagCorpus resource into which to upload the file. +// Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. +func (r *MediaService) Upload(parent string, googlecloudaiplatformv1beta1uploadragfilerequest *GoogleCloudAiplatformV1beta1UploadRagFileRequest) *MediaUploadCall { + c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1uploadragfilerequest = googlecloudaiplatformv1beta1uploadragfilerequest + return c +} + +// Media specifies the media to upload in one or more chunks. The chunk size +// may be controlled by supplying a MediaOption generated by +// googleapi.ChunkSize. The chunk size defaults to +// googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload +// request will be determined by sniffing the contents of r, unless a +// MediaOption generated by googleapi.ContentType is supplied. +// At most one of Media and ResumableMedia may be set. +func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) + return c +} + +// ResumableMedia specifies the media to upload in chunks and can be canceled +// with ctx. +// +// Deprecated: use Media instead. +// +// At most one of Media and ResumableMedia may be set. mediaType identifies the +// MIME media type of the upload, such as "image/png". If mediaType is "", it +// will be auto-detected. The provided ctx will supersede any context +// previously provided to the Context method. +func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { + c.ctx_ = ctx + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) + return c +} + +// ProgressUpdater provides a callback function that will be called after every +// chunk. It should be a low-latency function in order to not slow down the +// upload operation. This should only be called when using ResumableMedia (as +// opposed to Media). +func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { + c.mediaInfo_.SetProgressUpdater(pu) + 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 *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +// This context will supersede any context previously provided to the +// ResumableMedia method. +func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { + 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 *MediaUploadCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1uploadragfilerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/ragFiles:upload") + if c.mediaInfo_ != nil { + urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1beta1/{+parent}/ragFiles:upload") + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) + } + if body == nil { + body = new(bytes.Buffer) + reqHeaders.Set("Content-Type", "application/json") + } + body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + req.GetBody = getBody + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.media.upload" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1UploadRagFileResponse.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 *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1UploadRagFileResponse, 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) + } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() + ctx := c.ctx_ + if ctx == nil { + ctx = context.TODO() + } + res, err = rx.Upload(ctx) + if err != nil { + return nil, err + } + defer res.Body.Close() + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + } + ret := &GoogleCloudAiplatformV1beta1UploadRagFileResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsGetCacheConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCacheConfig: Gets a GenAI cache config. +// +// - name: Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { + c := &ProjectsGetCacheConfigCall{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 *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { + 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 *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { + 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 *ProjectsGetCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.getCacheConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1CacheConfig.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 *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CacheConfig, 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 := &GoogleCloudAiplatformV1beta1CacheConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsUpdateCacheConfigCall struct { + s *Service + name string + googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCacheConfig: Updates a cache config. +// +// - name: Identifier. Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1beta1cacheconfig *GoogleCloudAiplatformV1beta1CacheConfig) *ProjectsUpdateCacheConfigCall { + c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1cacheconfig = googlecloudaiplatformv1beta1cacheconfig + 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 *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { + 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 *ProjectsUpdateCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1cacheconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.updateCacheConfig" 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 *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52363,8 +54496,11 @@ type ProjectsLocationsEndpointsGenerateContentCall struct { // GenerateContent: Generate content with multimodal inputs. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsEndpointsGenerateContentCall { c := &ProjectsLocationsEndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -53495,8 +55631,11 @@ type ProjectsLocationsEndpointsStreamGenerateContentCall struct { // StreamGenerateContent: Generate content with multimodal inputs with // streaming support. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -53919,8 +56058,8 @@ type ProjectsLocationsEndpointsChatCompletionsCall struct { // Completions: Exposes an OpenAI-compatible endpoint for chat completions. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/openapi`. +// - endpoint: The name of the endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsEndpointsChatService) Completions(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsChatCompletionsCall { c := &ProjectsLocationsEndpointsChatCompletionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.endpoint = endpoint @@ -95489,8 +97628,11 @@ type ProjectsLocationsPublishersModelsGenerateContentCall struct { // GenerateContent: Generate content with multimodal inputs. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -96023,8 +98165,11 @@ type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { // StreamGenerateContent: Generate content with multimodal inputs with // streaming support. // -// - model: The name of the publisher model requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/publishers/*/models/*`. +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.model = model @@ -112753,6 +114898,318 @@ func (c *ProjectsLocationsTuningJobsListCall) Pages(ctx context.Context, f func( } } +type PublishersModelsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *PublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1beta1computetokensrequest *GoogleCloudAiplatformV1beta1ComputeTokensRequest) *PublishersModelsComputeTokensCall { + c := &PublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1computetokensrequest = googlecloudaiplatformv1beta1computetokensrequest + 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 *PublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *PublishersModelsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsComputeTokensCall) Context(ctx context.Context) *PublishersModelsComputeTokensCall { + 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 *PublishersModelsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:computeTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ComputeTokensResponse.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 *PublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1beta1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type PublishersModelsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1beta1counttokensrequest *GoogleCloudAiplatformV1beta1CountTokensRequest) *PublishersModelsCountTokensCall { + c := &PublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1beta1counttokensrequest = googlecloudaiplatformv1beta1counttokensrequest + 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 *PublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *PublishersModelsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsCountTokensCall) Context(ctx context.Context) *PublishersModelsCountTokensCall { + 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 *PublishersModelsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}:countTokens") + 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{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1CountTokensResponse.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 *PublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CountTokensResponse, 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 := &GoogleCloudAiplatformV1beta1CountTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type PublishersModelsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *PublishersModelsGenerateContentCall { + c := &PublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + 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 *PublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *PublishersModelsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsGenerateContentCall) Context(ctx context.Context) *PublishersModelsGenerateContentCall { + 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 *PublishersModelsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+model}:generateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.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 *PublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type PublishersModelsGetCall struct { s *Service name string @@ -112772,6 +115229,13 @@ func (r *PublishersModelsService) Get(name string) *PublishersModelsGetCall { return c } +// HuggingFaceToken sets the optional parameter "huggingFaceToken": Token used +// to access Hugging Face gated models. +func (c *PublishersModelsGetCall) HuggingFaceToken(huggingFaceToken string) *PublishersModelsGetCall { + c.urlParams_.Set("huggingFaceToken", huggingFaceToken) + return c +} + // IsHuggingFaceModel sets the optional parameter "isHuggingFaceModel": Boolean // indicates whether the requested model is a Hugging Face model. func (c *PublishersModelsGetCall) IsHuggingFaceModel(isHuggingFaceModel bool) *PublishersModelsGetCall { @@ -113087,3 +115551,110 @@ func (c *PublishersModelsListCall) Pages(ctx context.Context, f func(*GoogleClou c.PageToken(x.NextPageToken) } } + +type PublishersModelsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *PublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1beta1generatecontentrequest *GoogleCloudAiplatformV1beta1GenerateContentRequest) *PublishersModelsStreamGenerateContentCall { + c := &PublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1beta1generatecontentrequest = googlecloudaiplatformv1beta1generatecontentrequest + 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 *PublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *PublishersModelsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *PublishersModelsStreamGenerateContentCall { + 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 *PublishersModelsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PublishersModelsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+model}:streamGenerateContent") + 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{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.publishers.models.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1GenerateContentResponse.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 *PublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1beta1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} diff --git a/alloydb/v1/alloydb-api.json b/alloydb/v1/alloydb-api.json index b793566b0e6..50c5b1b9eff 100644 --- a/alloydb/v1/alloydb-api.json +++ b/alloydb/v1/alloydb-api.json @@ -1489,7 +1489,7 @@ } } }, - "revision": "20240627", + "revision": "20240806", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -2001,6 +2001,83 @@ }, "type": "object" }, + "ClusterUpgradeDetails": { + "description": "Upgrade details of a cluster. This cluster can be primary or secondary.", + "id": "ClusterUpgradeDetails", + "properties": { + "clusterType": { + "description": "Cluster type which can either be primary or secondary.", + "enum": [ + "CLUSTER_TYPE_UNSPECIFIED", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the cluster is unknown.", + "Primary cluster that support read and write operations.", + "Secondary cluster that is replicating from another region. This only supports read." + ], + "type": "string" + }, + "databaseVersion": { + "description": "Database version of the cluster after the upgrade operation. This will be the target version if the upgrade was successful otherwise it remains the same as that before the upgrade operation.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15" + ], + "enumDeprecated": [ + false, + true, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15." + ], + "type": "string" + }, + "instanceUpgradeDetails": { + "description": "Upgrade details of the instances directly associated with this cluster.", + "items": { + "$ref": "InstanceUpgradeDetails" + }, + "type": "array" + }, + "name": { + "description": "Normalized name of the cluster", + "type": "string" + }, + "stageInfo": { + "description": "Array containing stage info associated with this cluster.", + "items": { + "$ref": "StageInfo" + }, + "type": "array" + }, + "upgradeStatus": { + "description": "Upgrade status of the cluster.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "ConnectionInfo": { "description": "ConnectionInfo singleton resource. https://google.aip.dev/156", "id": "ConnectionInfo", @@ -2483,6 +2560,49 @@ }, "type": "object" }, + "InstanceUpgradeDetails": { + "description": "Details regarding the upgrade of instaces associated with a cluster.", + "id": "InstanceUpgradeDetails", + "properties": { + "instanceType": { + "description": "Instance type.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_POOL", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the instance is unknown.", + "PRIMARY instances support read and write operations.", + "READ POOL instances support read operations only. Each read pool instance consists of one or more homogeneous nodes. * Read pool of size 1 can only have zonal availability. * Read pools with node count of 2 or more can have regional availability (nodes are present in 2 or more zones in a region).", + "SECONDARY instances support read operations only. SECONDARY instance is a cross-region read replica" + ], + "type": "string" + }, + "name": { + "description": "Normalized name of the instance.", + "type": "string" + }, + "upgradeStatus": { + "description": "Upgrade status of the instance.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "IntegerRestrictions": { "description": "Restrictions on INTEGER type values.", "id": "IntegerRestrictions", @@ -2997,6 +3117,13 @@ "RestartInstanceRequest": { "id": "RestartInstanceRequest", "properties": { + "nodeIds": { + "description": "Optional. Full name of the nodes as obtained from INSTANCE_VIEW_FULL to restart upon. Only applicable for read instances.", + "items": { + "type": "string" + }, + "type": "array" + }, "requestId": { "description": "Optional. 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. The server will guarantee that for at least 60 minutes after the first request. 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).", "type": "string" @@ -3097,6 +3224,51 @@ }, "type": "object" }, + "StageInfo": { + "description": "Stage information for different stages in the upgrade process.", + "id": "StageInfo", + "properties": { + "logsUrl": { + "description": "logs_url is the URL for the logs associated with a stage if that stage has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK, PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE.", + "type": "string" + }, + "stage": { + "description": "The stage.", + "enum": [ + "STAGE_UNSPECIFIED", + "ALLOYDB_PRECHECK", + "PG_UPGRADE_CHECK", + "PRIMARY_INSTANCE_UPGRADE", + "READ_POOL_UPGRADE" + ], + "enumDescriptions": [ + "Unspecified stage.", + "This stage is for the custom checks done before upgrade.", + "This stage is for `pg_upgrade --check` run before upgrade.", + "This stage is primary upgrade.", + "This stage is read pool upgrade." + ], + "type": "string" + }, + "status": { + "description": "Status of the stage.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -3229,43 +3401,19 @@ "type": "object" }, "StorageDatabasecenterPartnerapiV1mainCustomMetadataData": { - "description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", + "description": "Any custom metadata associated with the resource. e.g. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", "id": "StorageDatabasecenterPartnerapiV1mainCustomMetadataData", "properties": { - "databaseMetadata": { + "internalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration.", "items": { - "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata" + "$ref": "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata" }, "type": "array" } }, "type": "object" }, - "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata": { - "description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", - "id": "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata", - "properties": { - "backupConfiguration": { - "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", - "description": "Backup configuration for this database" - }, - "backupRun": { - "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", - "description": "Information about the last backup attempt for this database" - }, - "product": { - "$ref": "StorageDatabasecenterProtoCommonProduct" - }, - "resourceId": { - "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId" - }, - "resourceName": { - "description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", - "type": "string" - } - }, - "type": "object" - }, "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed": { "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed", @@ -3294,8 +3442,7 @@ "type": "string" }, "observabilityMetricData": { - "$ref": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData", - "description": "More feed data would be added in subsequent CLs" + "$ref": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData" }, "recommendationSignalData": { "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData" @@ -3404,6 +3551,24 @@ "description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", "type": "string" }, + "signalSeverity": { + "description": "The severity of the signal, such as if it's a HIGH or LOW severity.", + "enum": [ + "SIGNAL_SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "This value is used for findings when a source doesn't write a severity value.", + "A critical vulnerability is easily discoverable by an external actor, exploitable.", + "A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities.", + "A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually gain access and the ability to execute arbitrary code or exfiltrate data.", + "A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment." + ], + "type": "string" + }, "signalType": { "description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", "enum": [ @@ -3700,7 +3865,7 @@ "type": "string" }, "resourceType": { - "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", + "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance, spanner.googleapis.com/Database, firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", "type": "string" }, "uniqueId": { @@ -4198,6 +4363,31 @@ }, "type": "object" }, + "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration settings. Similarly bigtable can have multiple clusters within same bigtable instance.", + "id": "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata", + "properties": { + "backupConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "description": "Backup configuration for this database" + }, + "backupRun": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "description": "Information about the last backup attempt for this database" + }, + "product": { + "$ref": "StorageDatabasecenterProtoCommonProduct" + }, + "resourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId" + }, + "resourceName": { + "description": "Required. internal resource name for spanner this will be database name e.g.\"spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1\"", + "type": "string" + } + }, + "type": "object" + }, "StorageDatabasecenterPartnerapiV1mainMachineConfiguration": { "description": "MachineConfiguration describes the configuration of a machine specific to Database Resource.", "id": "StorageDatabasecenterPartnerapiV1mainMachineConfiguration", @@ -4371,7 +4561,9 @@ "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", "ENGINE_MEMORYSTORE_FOR_REDIS", "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", - "ENGINE_OTHER" + "ENGINE_OTHER", + "ENGINE_FIRESTORE_WITH_NATIVE_MODE", + "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" ], "enumDeprecated": [ false, @@ -4387,6 +4579,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -4403,7 +4597,9 @@ "Cloud Spanner with Google SQL dialect.", "Memorystore with Redis dialect.", "Memorystore with Redis cluster dialect.", - "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum.", + "Firestore with native mode.", + "Firestore with datastore mode." ], "type": "string" }, @@ -4420,7 +4616,8 @@ "ON_PREM", "PRODUCT_TYPE_MEMORYSTORE", "PRODUCT_TYPE_BIGTABLE", - "PRODUCT_TYPE_OTHER" + "PRODUCT_TYPE_OTHER", + "PRODUCT_TYPE_FIRESTORE" ], "enumDeprecated": [ false, @@ -4433,6 +4630,7 @@ true, false, false, + false, false ], "enumDescriptions": [ @@ -4446,7 +4644,8 @@ "On premises database product.", "Memorystore product area in GCP", "Bigtable product area in GCP", - "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum.", + "Firestore product area in GCP." ], "type": "string" }, @@ -4605,6 +4804,11 @@ "format": "google-datetime", "type": "string" }, + "graceEndTime": { + "description": "grace end time of the cluster.", + "format": "google-datetime", + "type": "string" + }, "startTime": { "description": "start time of the trial cluster.", "format": "google-datetime", @@ -4618,6 +4822,40 @@ }, "type": "object" }, + "UpgradeClusterResponse": { + "description": "UpgradeClusterResponse contains the response for upgrade cluster operation.", + "id": "UpgradeClusterResponse", + "properties": { + "clusterUpgradeDetails": { + "description": "Array of upgrade details for the current cluster and all the secondary clusters associated with this cluster.", + "items": { + "$ref": "ClusterUpgradeDetails" + }, + "type": "array" + }, + "message": { + "description": "A user friendly message summarising the upgrade operation details and the next steps for the user if there is any.", + "type": "string" + }, + "status": { + "description": "Status of upgrade operation.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "User": { "description": "Message describing User object.", "id": "User", diff --git a/alloydb/v1/alloydb-gen.go b/alloydb/v1/alloydb-gen.go index 3be98a7da1a..ba1c07d6bd3 100644 --- a/alloydb/v1/alloydb-gen.go +++ b/alloydb/v1/alloydb-gen.go @@ -689,6 +689,60 @@ func (s Cluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ClusterUpgradeDetails: Upgrade details of a cluster. This cluster can be +// primary or secondary. +type ClusterUpgradeDetails struct { + // ClusterType: Cluster type which can either be primary or secondary. + // + // Possible values: + // "CLUSTER_TYPE_UNSPECIFIED" - The type of the cluster is unknown. + // "PRIMARY" - Primary cluster that support read and write operations. + // "SECONDARY" - Secondary cluster that is replicating from another region. + // This only supports read. + ClusterType string `json:"clusterType,omitempty"` + // DatabaseVersion: Database version of the cluster after the upgrade + // operation. This will be the target version if the upgrade was successful + // otherwise it remains the same as that before the upgrade operation. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + DatabaseVersion string `json:"databaseVersion,omitempty"` + // InstanceUpgradeDetails: Upgrade details of the instances directly associated + // with this cluster. + InstanceUpgradeDetails []*InstanceUpgradeDetails `json:"instanceUpgradeDetails,omitempty"` + // Name: Normalized name of the cluster + Name string `json:"name,omitempty"` + // StageInfo: Array containing stage info associated with this cluster. + StageInfo []*StageInfo `json:"stageInfo,omitempty"` + // UpgradeStatus: Upgrade status of the cluster. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + UpgradeStatus string `json:"upgradeStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterType") 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. "ClusterType") 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 ClusterUpgradeDetails) MarshalJSON() ([]byte, error) { + type NoMethod ClusterUpgradeDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConnectionInfo: ConnectionInfo singleton resource. // https://google.aip.dev/156 type ConnectionInfo struct { @@ -1256,6 +1310,50 @@ func (s InstanceNetworkConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstanceUpgradeDetails: Details regarding the upgrade of instaces associated +// with a cluster. +type InstanceUpgradeDetails struct { + // InstanceType: Instance type. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" - The type of the instance is unknown. + // "PRIMARY" - PRIMARY instances support read and write operations. + // "READ_POOL" - READ POOL instances support read operations only. Each read + // pool instance consists of one or more homogeneous nodes. * Read pool of size + // 1 can only have zonal availability. * Read pools with node count of 2 or + // more can have regional availability (nodes are present in 2 or more zones in + // a region). + // "SECONDARY" - SECONDARY instances support read operations only. SECONDARY + // instance is a cross-region read replica + InstanceType string `json:"instanceType,omitempty"` + // Name: Normalized name of the instance. + Name string `json:"name,omitempty"` + // UpgradeStatus: Upgrade status of the instance. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + UpgradeStatus string `json:"upgradeStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "InstanceType") 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. "InstanceType") 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 InstanceUpgradeDetails) MarshalJSON() ([]byte, error) { + type NoMethod InstanceUpgradeDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // IntegerRestrictions: Restrictions on INTEGER type values. type IntegerRestrictions struct { // MaxValue: The maximum value that can be specified, if applicable. @@ -1982,6 +2080,9 @@ func (s ReadPoolConfig) MarshalJSON() ([]byte, error) { } type RestartInstanceRequest struct { + // NodeIds: Optional. Full name of the nodes as obtained from + // INSTANCE_VIEW_FULL to restart upon. Only applicable for read instances. + NodeIds []string `json:"nodeIds,omitempty"` // RequestId: Optional. 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. The server will @@ -1998,13 +2099,13 @@ type RestartInstanceRequest struct { // checks and any other type of validation), but do not actually execute the // restart. ValidateOnly bool `json:"validateOnly,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "NodeIds") 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. "RequestId") to include in API + // NullFields is a list of field names (e.g. "NodeIds") 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. @@ -2134,6 +2235,49 @@ func (s SslConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// StageInfo: Stage information for different stages in the upgrade process. +type StageInfo struct { + // LogsUrl: logs_url is the URL for the logs associated with a stage if that + // stage has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK, + // PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE. + LogsUrl string `json:"logsUrl,omitempty"` + // Stage: The stage. + // + // Possible values: + // "STAGE_UNSPECIFIED" - Unspecified stage. + // "ALLOYDB_PRECHECK" - This stage is for the custom checks done before + // upgrade. + // "PG_UPGRADE_CHECK" - This stage is for `pg_upgrade --check` run before + // upgrade. + // "PRIMARY_INSTANCE_UPGRADE" - This stage is primary upgrade. + // "READ_POOL_UPGRADE" - This stage is read pool upgrade. + Stage string `json:"stage,omitempty"` + // Status: Status of the stage. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "LogsUrl") 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. "LogsUrl") 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 StageInfo) MarshalJSON() ([]byte, error) { + type NoMethod StageInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is // used by gRPC (https://github.com/grpc). Each `Status` message contains three @@ -2297,20 +2441,23 @@ func (s StorageDatabasecenterPartnerapiV1mainCompliance) MarshalJSON() ([]byte, } // StorageDatabasecenterPartnerapiV1mainCustomMetadataData: Any custom metadata -// associated with the resource. i.e. A spanner instance can have multiple +// associated with the resource. e.g. A spanner instance can have multiple // databases with its own unique metadata. Information for these individual // databases can be captured in custom metadata data type StorageDatabasecenterPartnerapiV1mainCustomMetadataData struct { - DatabaseMetadata []*StorageDatabasecenterPartnerapiV1mainDatabaseMetadata `json:"databaseMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseMetadata") to - // unconditionally include in API requests. By default, fields with empty or + // InternalResourceMetadata: Metadata for individual internal resources in an + // instance. e.g. spanner instance can have multiple databases with unique + // configuration. + InternalResourceMetadata []*StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata `json:"internalResourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "InternalResourceMetadata") + // 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. "DatabaseMetadata") 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. "InternalResourceMetadata") 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:"-"` } @@ -2320,37 +2467,6 @@ func (s StorageDatabasecenterPartnerapiV1mainCustomMetadataData) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// StorageDatabasecenterPartnerapiV1mainDatabaseMetadata: Metadata for -// individual databases created in an instance. i.e. spanner instance can have -// multiple databases with unique configuration settings. -type StorageDatabasecenterPartnerapiV1mainDatabaseMetadata struct { - // BackupConfiguration: Backup configuration for this database - BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` - // BackupRun: Information about the last backup attempt for this database - BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` - Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` - ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` - // ResourceName: Required. Database name. Resource name to follow CAIS - // resource_name format as noted here go/condor-common-datamodel - ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 StorageDatabasecenterPartnerapiV1mainDatabaseMetadata) MarshalJSON() ([]byte, error) { - type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed: // DatabaseResourceFeed is the top level proto to be used to ingest different // database resource level events into Condor platform. @@ -2366,8 +2482,7 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed struct { // "SECURITY_FINDING_DATA" - Database resource security health signal data // "RECOMMENDATION_SIGNAL_DATA" - Database resource recommendation signal // data - FeedType string `json:"feedType,omitempty"` - // ObservabilityMetricData: More feed data would be added in subsequent CLs + FeedType string `json:"feedType,omitempty"` ObservabilityMetricData *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData `json:"observabilityMetricData,omitempty"` RecommendationSignalData *StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` ResourceHealthSignalData *StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData `json:"resourceHealthSignalData,omitempty"` @@ -2460,6 +2575,22 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // SignalId: Required. Unique identifier for the signal. This is an unique id // which would be mainatined by partner to identify a signal. SignalId string `json:"signalId,omitempty"` + // SignalSeverity: The severity of the signal, such as if it's a HIGH or LOW + // severity. + // + // Possible values: + // "SIGNAL_SEVERITY_UNSPECIFIED" - This value is used for findings when a + // source doesn't write a severity value. + // "CRITICAL" - A critical vulnerability is easily discoverable by an + // external actor, exploitable. + // "HIGH" - A high risk vulnerability can be easily discovered and exploited + // in combination with other vulnerabilities. + // "MEDIUM" - A medium risk vulnerability could be used by an actor to gain + // access to resources or privileges that enable them to eventually gain access + // and the ability to execute arbitrary code or exfiltrate data. + // "LOW" - A low risk vulnerability hampers a security organization's ability + // to detect vulnerabilities or active threats in their deployment. + SignalSeverity string `json:"signalSeverity,omitempty"` // SignalType: Required. Type of signal, for example, // `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. // @@ -2697,8 +2828,10 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceId struct { // ResourceType: Required. The type of resource this ID is identifying. Ex // redis.googleapis.com/Instance, redis.googleapis.com/Cluster, // alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, - // spanner.googleapis.com/Instance REQUIRED Please refer - // go/condor-common-datamodel + // spanner.googleapis.com/Instance, spanner.googleapis.com/Database, + // firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, + // bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance + // REQUIRED Please refer go/condor-common-datamodel ResourceType string `json:"resourceType,omitempty"` // UniqueId: Required. A service-local token that distinguishes this resource // from other resources within the same service. @@ -3113,6 +3246,39 @@ func (s StorageDatabasecenterPartnerapiV1mainEntitlement) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata: Metadata for +// individual internal resources in an instance. e.g. spanner instance can have +// multiple databases with unique configuration settings. Similarly bigtable +// can have multiple clusters within same bigtable instance. +type StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata struct { + // BackupConfiguration: Backup configuration for this database + BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Information about the last backup attempt for this database + BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` + Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` + ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` + // ResourceName: Required. internal resource name for spanner this will be + // database name + // e.g."spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1" + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // StorageDatabasecenterPartnerapiV1mainMachineConfiguration: // MachineConfiguration describes the configuration of a machine specific to // Database Resource. @@ -3310,6 +3476,8 @@ type StorageDatabasecenterProtoCommonProduct struct { // dialect. // "ENGINE_OTHER" - Other refers to rest of other database engine. This is to // be when engine is known, but it is not present in this enum. + // "ENGINE_FIRESTORE_WITH_NATIVE_MODE" - Firestore with native mode. + // "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" - Firestore with datastore mode. Engine string `json:"engine,omitempty"` // Type: Type of specific database product. It could be CloudSQL, AlloyDB etc.. // @@ -3327,6 +3495,7 @@ type StorageDatabasecenterProtoCommonProduct struct { // "PRODUCT_TYPE_BIGTABLE" - Bigtable product area in GCP // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. This is // to be when product type is known, but it is not present in this enum. + // "PRODUCT_TYPE_FIRESTORE" - Firestore product area in GCP. Type string `json:"type,omitempty"` // Version: Version of the underlying database engine. Example values: For // MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" @@ -3539,6 +3708,8 @@ func (s TimeBasedRetention) MarshalJSON() ([]byte, error) { type TrialMetadata struct { // EndTime: End time of the trial cluster. EndTime string `json:"endTime,omitempty"` + // GraceEndTime: grace end time of the cluster. + GraceEndTime string `json:"graceEndTime,omitempty"` // StartTime: start time of the trial cluster. StartTime string `json:"startTime,omitempty"` // UpgradeTime: Upgrade time of trial cluster to Standard cluster. @@ -3561,6 +3732,41 @@ func (s TrialMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// UpgradeClusterResponse: UpgradeClusterResponse contains the response for +// upgrade cluster operation. +type UpgradeClusterResponse struct { + // ClusterUpgradeDetails: Array of upgrade details for the current cluster and + // all the secondary clusters associated with this cluster. + ClusterUpgradeDetails []*ClusterUpgradeDetails `json:"clusterUpgradeDetails,omitempty"` + // Message: A user friendly message summarising the upgrade operation details + // and the next steps for the user if there is any. + Message string `json:"message,omitempty"` + // Status: Status of upgrade operation. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterUpgradeDetails") 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. "ClusterUpgradeDetails") 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 UpgradeClusterResponse) MarshalJSON() ([]byte, error) { + type NoMethod UpgradeClusterResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // User: Message describing User object. type User struct { // DatabaseRoles: Optional. List of database roles this user has. The database diff --git a/alloydb/v1alpha/alloydb-api.json b/alloydb/v1alpha/alloydb-api.json index bc946fdc407..d7366f0b98b 100644 --- a/alloydb/v1alpha/alloydb-api.json +++ b/alloydb/v1alpha/alloydb-api.json @@ -735,6 +735,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "upgrade": { + "description": "Upgrades a single Cluster. Imperative only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:upgrade", + "httpMethod": "PATCH", + "id": "alloydb.projects.locations.clusters.upgrade", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the cluster.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:upgrade", + "request": { + "$ref": "UpgradeClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -1489,7 +1517,7 @@ } } }, - "revision": "20240703", + "revision": "20240806", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -1786,6 +1814,26 @@ }, "type": "object" }, + "CloudSQLBackupRunSource": { + "description": "The source CloudSQL backup resource.", + "id": "CloudSQLBackupRunSource", + "properties": { + "backupRunId": { + "description": "Required. The CloudSQL backup run ID.", + "format": "int64", + "type": "string" + }, + "instanceId": { + "description": "Required. The CloudSQL instance ID.", + "type": "string" + }, + "project": { + "description": "The project ID of the source CloudSQL instance. This should be the same as the AlloyDB cluster's project.", + "type": "string" + } + }, + "type": "object" + }, "Cluster": { "description": "A cluster is a collection of regional AlloyDB resources. It can include a primary instance and one or more read pool instances. All cluster resources share a storage layer, which scales as needed.", "id": "Cluster", @@ -1806,6 +1854,11 @@ "description": "Output only. Cluster created from backup.", "readOnly": true }, + "cloudsqlBackupRunSource": { + "$ref": "CloudSQLBackupRunSource", + "description": "Output only. Cluster created from CloudSQL snapshot.", + "readOnly": true + }, "clusterType": { "description": "Output only. The type of the cluster. This is an output-only field and it's populated at the Cluster creation time or the Cluster promotion time. The cluster type is determined by which RPC was used to create the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`", "enum": [ @@ -2021,6 +2074,86 @@ }, "type": "object" }, + "ClusterUpgradeDetails": { + "description": "Upgrade details of a cluster. This cluster can be primary or secondary.", + "id": "ClusterUpgradeDetails", + "properties": { + "clusterType": { + "description": "Cluster type which can either be primary or secondary.", + "enum": [ + "CLUSTER_TYPE_UNSPECIFIED", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the cluster is unknown.", + "Primary cluster that support read and write operations.", + "Secondary cluster that is replicating from another region. This only supports read." + ], + "type": "string" + }, + "databaseVersion": { + "description": "Database version of the cluster after the upgrade operation. This will be the target version if the upgrade was successful otherwise it remains the same as that before the upgrade operation.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15", + "POSTGRES_16" + ], + "enumDeprecated": [ + false, + true, + false, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15.", + "The database version is Postgres 16." + ], + "type": "string" + }, + "instanceUpgradeDetails": { + "description": "Upgrade details of the instances directly associated with this cluster.", + "items": { + "$ref": "InstanceUpgradeDetails" + }, + "type": "array" + }, + "name": { + "description": "Normalized name of the cluster", + "type": "string" + }, + "stageInfo": { + "description": "Array containing stage info associated with this cluster.", + "items": { + "$ref": "StageInfo" + }, + "type": "array" + }, + "upgradeStatus": { + "description": "Upgrade status of the cluster.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "ConnectionInfo": { "description": "ConnectionInfo singleton resource. https://google.aip.dev/156", "id": "ConnectionInfo", @@ -2570,6 +2703,49 @@ }, "type": "object" }, + "InstanceUpgradeDetails": { + "description": "Details regarding the upgrade of instaces associated with a cluster.", + "id": "InstanceUpgradeDetails", + "properties": { + "instanceType": { + "description": "Instance type.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_POOL", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the instance is unknown.", + "PRIMARY instances support read and write operations.", + "READ POOL instances support read operations only. Each read pool instance consists of one or more homogeneous nodes. * Read pool of size 1 can only have zonal availability. * Read pools with node count of 2 or more can have regional availability (nodes are present in 2 or more zones in a region).", + "SECONDARY instances support read operations only. SECONDARY instance is a cross-region read replica" + ], + "type": "string" + }, + "name": { + "description": "Normalized name of the instance.", + "type": "string" + }, + "upgradeStatus": { + "description": "Upgrade status of the instance.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "IntegerRestrictions": { "description": "Restrictions on INTEGER type values.", "id": "IntegerRestrictions", @@ -2895,6 +3071,10 @@ "description": "Track actively running queries on the instance. If not set, this flag is \"off\" by default.", "type": "boolean" }, + "trackClientAddress": { + "description": "Track client address for an instance. If not set, default value is \"off\".", + "type": "boolean" + }, "trackWaitEventTypes": { "description": "Output only. Track wait event types during query execution for an instance. This flag is turned \"on\" by default but tracking is enabled only after observability enabled flag is also turned on. This is read-only flag and only modifiable by producer API.", "readOnly": true, @@ -3126,6 +3306,13 @@ "RestartInstanceRequest": { "id": "RestartInstanceRequest", "properties": { + "nodeIds": { + "description": "Optional. Full name of the nodes as obtained from INSTANCE_VIEW_FULL to restart upon. Only applicable for read instances.", + "items": { + "type": "string" + }, + "type": "array" + }, "requestId": { "description": "Optional. 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. The server will guarantee that for at least 60 minutes after the first request. 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).", "type": "string" @@ -3226,6 +3413,51 @@ }, "type": "object" }, + "StageInfo": { + "description": "Stage information for different stages in the upgrade process.", + "id": "StageInfo", + "properties": { + "logsUrl": { + "description": "logs_url is the URL for the logs associated with a stage if that stage has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK, PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE.", + "type": "string" + }, + "stage": { + "description": "The stage.", + "enum": [ + "STAGE_UNSPECIFIED", + "ALLOYDB_PRECHECK", + "PG_UPGRADE_CHECK", + "PRIMARY_INSTANCE_UPGRADE", + "READ_POOL_UPGRADE" + ], + "enumDescriptions": [ + "Unspecified stage.", + "This stage is for the custom checks done before upgrade.", + "This stage is for `pg_upgrade --check` run before upgrade.", + "This stage is primary upgrade.", + "This stage is read pool upgrade." + ], + "type": "string" + }, + "status": { + "description": "Status of the stage.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -3358,43 +3590,19 @@ "type": "object" }, "StorageDatabasecenterPartnerapiV1mainCustomMetadataData": { - "description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", + "description": "Any custom metadata associated with the resource. e.g. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", "id": "StorageDatabasecenterPartnerapiV1mainCustomMetadataData", "properties": { - "databaseMetadata": { + "internalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration.", "items": { - "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata" + "$ref": "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata" }, "type": "array" } }, "type": "object" }, - "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata": { - "description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", - "id": "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata", - "properties": { - "backupConfiguration": { - "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", - "description": "Backup configuration for this database" - }, - "backupRun": { - "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", - "description": "Information about the last backup attempt for this database" - }, - "product": { - "$ref": "StorageDatabasecenterProtoCommonProduct" - }, - "resourceId": { - "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId" - }, - "resourceName": { - "description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", - "type": "string" - } - }, - "type": "object" - }, "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed": { "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed", @@ -3423,8 +3631,7 @@ "type": "string" }, "observabilityMetricData": { - "$ref": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData", - "description": "More feed data would be added in subsequent CLs" + "$ref": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData" }, "recommendationSignalData": { "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData" @@ -3533,6 +3740,24 @@ "description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", "type": "string" }, + "signalSeverity": { + "description": "The severity of the signal, such as if it's a HIGH or LOW severity.", + "enum": [ + "SIGNAL_SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "This value is used for findings when a source doesn't write a severity value.", + "A critical vulnerability is easily discoverable by an external actor, exploitable.", + "A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities.", + "A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually gain access and the ability to execute arbitrary code or exfiltrate data.", + "A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment." + ], + "type": "string" + }, "signalType": { "description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", "enum": [ @@ -3829,7 +4054,7 @@ "type": "string" }, "resourceType": { - "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", + "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance, spanner.googleapis.com/Database, firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", "type": "string" }, "uniqueId": { @@ -4327,6 +4552,31 @@ }, "type": "object" }, + "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration settings. Similarly bigtable can have multiple clusters within same bigtable instance.", + "id": "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata", + "properties": { + "backupConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "description": "Backup configuration for this database" + }, + "backupRun": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "description": "Information about the last backup attempt for this database" + }, + "product": { + "$ref": "StorageDatabasecenterProtoCommonProduct" + }, + "resourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId" + }, + "resourceName": { + "description": "Required. internal resource name for spanner this will be database name e.g.\"spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1\"", + "type": "string" + } + }, + "type": "object" + }, "StorageDatabasecenterPartnerapiV1mainMachineConfiguration": { "description": "MachineConfiguration describes the configuration of a machine specific to Database Resource.", "id": "StorageDatabasecenterPartnerapiV1mainMachineConfiguration", @@ -4500,7 +4750,9 @@ "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", "ENGINE_MEMORYSTORE_FOR_REDIS", "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", - "ENGINE_OTHER" + "ENGINE_OTHER", + "ENGINE_FIRESTORE_WITH_NATIVE_MODE", + "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" ], "enumDeprecated": [ false, @@ -4516,6 +4768,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -4532,7 +4786,9 @@ "Cloud Spanner with Google SQL dialect.", "Memorystore with Redis dialect.", "Memorystore with Redis cluster dialect.", - "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum.", + "Firestore with native mode.", + "Firestore with datastore mode." ], "type": "string" }, @@ -4549,7 +4805,8 @@ "ON_PREM", "PRODUCT_TYPE_MEMORYSTORE", "PRODUCT_TYPE_BIGTABLE", - "PRODUCT_TYPE_OTHER" + "PRODUCT_TYPE_OTHER", + "PRODUCT_TYPE_FIRESTORE" ], "enumDeprecated": [ false, @@ -4562,6 +4819,7 @@ true, false, false, + false, false ], "enumDescriptions": [ @@ -4575,7 +4833,8 @@ "On premises database product.", "Memorystore product area in GCP", "Bigtable product area in GCP", - "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum.", + "Firestore product area in GCP." ], "type": "string" }, @@ -4737,6 +4996,11 @@ "format": "google-datetime", "type": "string" }, + "graceEndTime": { + "description": "grace end time of the cluster.", + "format": "google-datetime", + "type": "string" + }, "startTime": { "description": "start time of the trial cluster.", "format": "google-datetime", @@ -4771,6 +5035,84 @@ }, "type": "object" }, + "UpgradeClusterRequest": { + "description": "Upgrades a cluster.", + "id": "UpgradeClusterRequest", + "properties": { + "etag": { + "description": "Optional. The current etag of the Cluster. If an etag is provided and does not match the current etag of the Cluster, upgrade will be blocked and an ABORTED error will be returned.", + "type": "string" + }, + "requestId": { + "description": "Optional. 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. The server will guarantee that for at least 60 minutes after the first request. 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).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, performs request validation (e.g. permission checks and any other type of validation), but does not actually execute the upgrade.", + "type": "boolean" + }, + "version": { + "description": "Required. The version the cluster is going to be upgraded to.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15", + "POSTGRES_16" + ], + "enumDeprecated": [ + false, + true, + false, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15.", + "The database version is Postgres 16." + ], + "type": "string" + } + }, + "type": "object" + }, + "UpgradeClusterResponse": { + "description": "UpgradeClusterResponse contains the response for upgrade cluster operation.", + "id": "UpgradeClusterResponse", + "properties": { + "clusterUpgradeDetails": { + "description": "Array of upgrade details for the current cluster and all the secondary clusters associated with this cluster.", + "items": { + "$ref": "ClusterUpgradeDetails" + }, + "type": "array" + }, + "message": { + "description": "A user friendly message summarising the upgrade operation details and the next steps for the user if there is any.", + "type": "string" + }, + "status": { + "description": "Status of upgrade operation.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "User": { "description": "Message describing User object.", "id": "User", diff --git a/alloydb/v1alpha/alloydb-gen.go b/alloydb/v1alpha/alloydb-gen.go index 1b9ef48663c..7a4b36514a6 100644 --- a/alloydb/v1alpha/alloydb-gen.go +++ b/alloydb/v1alpha/alloydb-gen.go @@ -526,6 +526,33 @@ func (s CloudControl2SharedOperationsReconciliationOperationMetadata) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CloudSQLBackupRunSource: The source CloudSQL backup resource. +type CloudSQLBackupRunSource struct { + // BackupRunId: Required. The CloudSQL backup run ID. + BackupRunId int64 `json:"backupRunId,omitempty,string"` + // InstanceId: Required. The CloudSQL instance ID. + InstanceId string `json:"instanceId,omitempty"` + // Project: The project ID of the source CloudSQL instance. This should be the + // same as the AlloyDB cluster's project. + Project string `json:"project,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupRunId") 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. "BackupRunId") 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 CloudSQLBackupRunSource) MarshalJSON() ([]byte, error) { + type NoMethod CloudSQLBackupRunSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Cluster: A cluster is a collection of regional AlloyDB resources. It can // include a primary instance and one or more read pool instances. All cluster // resources share a storage layer, which scales as needed. @@ -541,6 +568,9 @@ type Cluster struct { AutomatedBackupPolicy *AutomatedBackupPolicy `json:"automatedBackupPolicy,omitempty"` // BackupSource: Output only. Cluster created from backup. BackupSource *BackupSource `json:"backupSource,omitempty"` + // CloudsqlBackupRunSource: Output only. Cluster created from CloudSQL + // snapshot. + CloudsqlBackupRunSource *CloudSQLBackupRunSource `json:"cloudsqlBackupRunSource,omitempty"` // ClusterType: Output only. The type of the cluster. This is an output-only // field and it's populated at the Cluster creation time or the Cluster // promotion time. The cluster type is determined by which RPC was used to @@ -698,6 +728,61 @@ func (s Cluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ClusterUpgradeDetails: Upgrade details of a cluster. This cluster can be +// primary or secondary. +type ClusterUpgradeDetails struct { + // ClusterType: Cluster type which can either be primary or secondary. + // + // Possible values: + // "CLUSTER_TYPE_UNSPECIFIED" - The type of the cluster is unknown. + // "PRIMARY" - Primary cluster that support read and write operations. + // "SECONDARY" - Secondary cluster that is replicating from another region. + // This only supports read. + ClusterType string `json:"clusterType,omitempty"` + // DatabaseVersion: Database version of the cluster after the upgrade + // operation. This will be the target version if the upgrade was successful + // otherwise it remains the same as that before the upgrade operation. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + // "POSTGRES_16" - The database version is Postgres 16. + DatabaseVersion string `json:"databaseVersion,omitempty"` + // InstanceUpgradeDetails: Upgrade details of the instances directly associated + // with this cluster. + InstanceUpgradeDetails []*InstanceUpgradeDetails `json:"instanceUpgradeDetails,omitempty"` + // Name: Normalized name of the cluster + Name string `json:"name,omitempty"` + // StageInfo: Array containing stage info associated with this cluster. + StageInfo []*StageInfo `json:"stageInfo,omitempty"` + // UpgradeStatus: Upgrade status of the cluster. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + UpgradeStatus string `json:"upgradeStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterType") 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. "ClusterType") 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 ClusterUpgradeDetails) MarshalJSON() ([]byte, error) { + type NoMethod ClusterUpgradeDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConnectionInfo: ConnectionInfo singleton resource. // https://google.aip.dev/156 type ConnectionInfo struct { @@ -1341,6 +1426,50 @@ func (s InstanceNetworkConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstanceUpgradeDetails: Details regarding the upgrade of instaces associated +// with a cluster. +type InstanceUpgradeDetails struct { + // InstanceType: Instance type. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" - The type of the instance is unknown. + // "PRIMARY" - PRIMARY instances support read and write operations. + // "READ_POOL" - READ POOL instances support read operations only. Each read + // pool instance consists of one or more homogeneous nodes. * Read pool of size + // 1 can only have zonal availability. * Read pools with node count of 2 or + // more can have regional availability (nodes are present in 2 or more zones in + // a region). + // "SECONDARY" - SECONDARY instances support read operations only. SECONDARY + // instance is a cross-region read replica + InstanceType string `json:"instanceType,omitempty"` + // Name: Normalized name of the instance. + Name string `json:"name,omitempty"` + // UpgradeStatus: Upgrade status of the instance. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + UpgradeStatus string `json:"upgradeStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "InstanceType") 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. "InstanceType") 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 InstanceUpgradeDetails) MarshalJSON() ([]byte, error) { + type NoMethod InstanceUpgradeDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // IntegerRestrictions: Restrictions on INTEGER type values. type IntegerRestrictions struct { // MaxValue: The maximum value that can be specified, if applicable. @@ -1770,6 +1899,9 @@ type ObservabilityInstanceConfig struct { // TrackActiveQueries: Track actively running queries on the instance. If not // set, this flag is "off" by default. TrackActiveQueries bool `json:"trackActiveQueries,omitempty"` + // TrackClientAddress: Track client address for an instance. If not set, + // default value is "off". + TrackClientAddress bool `json:"trackClientAddress,omitempty"` // TrackWaitEventTypes: Output only. Track wait event types during query // execution for an instance. This flag is turned "on" by default but tracking // is enabled only after observability enabled flag is also turned on. This is @@ -2114,6 +2246,9 @@ func (s ReadPoolConfig) MarshalJSON() ([]byte, error) { } type RestartInstanceRequest struct { + // NodeIds: Optional. Full name of the nodes as obtained from + // INSTANCE_VIEW_FULL to restart upon. Only applicable for read instances. + NodeIds []string `json:"nodeIds,omitempty"` // RequestId: Optional. 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. The server will @@ -2130,13 +2265,13 @@ type RestartInstanceRequest struct { // checks and any other type of validation), but do not actually execute the // restart. ValidateOnly bool `json:"validateOnly,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "NodeIds") 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. "RequestId") to include in API + // NullFields is a list of field names (e.g. "NodeIds") 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. @@ -2266,6 +2401,49 @@ func (s SslConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// StageInfo: Stage information for different stages in the upgrade process. +type StageInfo struct { + // LogsUrl: logs_url is the URL for the logs associated with a stage if that + // stage has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK, + // PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE. + LogsUrl string `json:"logsUrl,omitempty"` + // Stage: The stage. + // + // Possible values: + // "STAGE_UNSPECIFIED" - Unspecified stage. + // "ALLOYDB_PRECHECK" - This stage is for the custom checks done before + // upgrade. + // "PG_UPGRADE_CHECK" - This stage is for `pg_upgrade --check` run before + // upgrade. + // "PRIMARY_INSTANCE_UPGRADE" - This stage is primary upgrade. + // "READ_POOL_UPGRADE" - This stage is read pool upgrade. + Stage string `json:"stage,omitempty"` + // Status: Status of the stage. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "LogsUrl") 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. "LogsUrl") 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 StageInfo) MarshalJSON() ([]byte, error) { + type NoMethod StageInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is // used by gRPC (https://github.com/grpc). Each `Status` message contains three @@ -2429,20 +2607,23 @@ func (s StorageDatabasecenterPartnerapiV1mainCompliance) MarshalJSON() ([]byte, } // StorageDatabasecenterPartnerapiV1mainCustomMetadataData: Any custom metadata -// associated with the resource. i.e. A spanner instance can have multiple +// associated with the resource. e.g. A spanner instance can have multiple // databases with its own unique metadata. Information for these individual // databases can be captured in custom metadata data type StorageDatabasecenterPartnerapiV1mainCustomMetadataData struct { - DatabaseMetadata []*StorageDatabasecenterPartnerapiV1mainDatabaseMetadata `json:"databaseMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseMetadata") to - // unconditionally include in API requests. By default, fields with empty or + // InternalResourceMetadata: Metadata for individual internal resources in an + // instance. e.g. spanner instance can have multiple databases with unique + // configuration. + InternalResourceMetadata []*StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata `json:"internalResourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "InternalResourceMetadata") + // 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. "DatabaseMetadata") 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. "InternalResourceMetadata") 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:"-"` } @@ -2452,37 +2633,6 @@ func (s StorageDatabasecenterPartnerapiV1mainCustomMetadataData) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// StorageDatabasecenterPartnerapiV1mainDatabaseMetadata: Metadata for -// individual databases created in an instance. i.e. spanner instance can have -// multiple databases with unique configuration settings. -type StorageDatabasecenterPartnerapiV1mainDatabaseMetadata struct { - // BackupConfiguration: Backup configuration for this database - BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` - // BackupRun: Information about the last backup attempt for this database - BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` - Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` - ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` - // ResourceName: Required. Database name. Resource name to follow CAIS - // resource_name format as noted here go/condor-common-datamodel - ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 StorageDatabasecenterPartnerapiV1mainDatabaseMetadata) MarshalJSON() ([]byte, error) { - type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed: // DatabaseResourceFeed is the top level proto to be used to ingest different // database resource level events into Condor platform. @@ -2498,8 +2648,7 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed struct { // "SECURITY_FINDING_DATA" - Database resource security health signal data // "RECOMMENDATION_SIGNAL_DATA" - Database resource recommendation signal // data - FeedType string `json:"feedType,omitempty"` - // ObservabilityMetricData: More feed data would be added in subsequent CLs + FeedType string `json:"feedType,omitempty"` ObservabilityMetricData *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData `json:"observabilityMetricData,omitempty"` RecommendationSignalData *StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` ResourceHealthSignalData *StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData `json:"resourceHealthSignalData,omitempty"` @@ -2592,6 +2741,22 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // SignalId: Required. Unique identifier for the signal. This is an unique id // which would be mainatined by partner to identify a signal. SignalId string `json:"signalId,omitempty"` + // SignalSeverity: The severity of the signal, such as if it's a HIGH or LOW + // severity. + // + // Possible values: + // "SIGNAL_SEVERITY_UNSPECIFIED" - This value is used for findings when a + // source doesn't write a severity value. + // "CRITICAL" - A critical vulnerability is easily discoverable by an + // external actor, exploitable. + // "HIGH" - A high risk vulnerability can be easily discovered and exploited + // in combination with other vulnerabilities. + // "MEDIUM" - A medium risk vulnerability could be used by an actor to gain + // access to resources or privileges that enable them to eventually gain access + // and the ability to execute arbitrary code or exfiltrate data. + // "LOW" - A low risk vulnerability hampers a security organization's ability + // to detect vulnerabilities or active threats in their deployment. + SignalSeverity string `json:"signalSeverity,omitempty"` // SignalType: Required. Type of signal, for example, // `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. // @@ -2829,8 +2994,10 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceId struct { // ResourceType: Required. The type of resource this ID is identifying. Ex // redis.googleapis.com/Instance, redis.googleapis.com/Cluster, // alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, - // spanner.googleapis.com/Instance REQUIRED Please refer - // go/condor-common-datamodel + // spanner.googleapis.com/Instance, spanner.googleapis.com/Database, + // firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, + // bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance + // REQUIRED Please refer go/condor-common-datamodel ResourceType string `json:"resourceType,omitempty"` // UniqueId: Required. A service-local token that distinguishes this resource // from other resources within the same service. @@ -3245,6 +3412,39 @@ func (s StorageDatabasecenterPartnerapiV1mainEntitlement) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata: Metadata for +// individual internal resources in an instance. e.g. spanner instance can have +// multiple databases with unique configuration settings. Similarly bigtable +// can have multiple clusters within same bigtable instance. +type StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata struct { + // BackupConfiguration: Backup configuration for this database + BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Information about the last backup attempt for this database + BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` + Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` + ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` + // ResourceName: Required. internal resource name for spanner this will be + // database name + // e.g."spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1" + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // StorageDatabasecenterPartnerapiV1mainMachineConfiguration: // MachineConfiguration describes the configuration of a machine specific to // Database Resource. @@ -3442,6 +3642,8 @@ type StorageDatabasecenterProtoCommonProduct struct { // dialect. // "ENGINE_OTHER" - Other refers to rest of other database engine. This is to // be when engine is known, but it is not present in this enum. + // "ENGINE_FIRESTORE_WITH_NATIVE_MODE" - Firestore with native mode. + // "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" - Firestore with datastore mode. Engine string `json:"engine,omitempty"` // Type: Type of specific database product. It could be CloudSQL, AlloyDB etc.. // @@ -3459,6 +3661,7 @@ type StorageDatabasecenterProtoCommonProduct struct { // "PRODUCT_TYPE_BIGTABLE" - Bigtable product area in GCP // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. This is // to be when product type is known, but it is not present in this enum. + // "PRODUCT_TYPE_FIRESTORE" - Firestore product area in GCP. Type string `json:"type,omitempty"` // Version: Version of the underlying database engine. Example values: For // MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" @@ -3672,6 +3875,8 @@ func (s TimeBasedRetention) MarshalJSON() ([]byte, error) { type TrialMetadata struct { // EndTime: End time of the trial cluster. EndTime string `json:"endTime,omitempty"` + // GraceEndTime: grace end time of the cluster. + GraceEndTime string `json:"graceEndTime,omitempty"` // StartTime: start time of the trial cluster. StartTime string `json:"startTime,omitempty"` // UpgradeTime: Upgrade time of trial cluster to Standard cluster. @@ -3722,6 +3927,90 @@ func (s UpdatePolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// UpgradeClusterRequest: Upgrades a cluster. +type UpgradeClusterRequest struct { + // Etag: Optional. The current etag of the Cluster. If an etag is provided and + // does not match the current etag of the Cluster, upgrade will be blocked and + // an ABORTED error will be returned. + Etag string `json:"etag,omitempty"` + // RequestId: Optional. 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. The server will + // guarantee that for at least 60 minutes after the first request. 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). + RequestId string `json:"requestId,omitempty"` + // ValidateOnly: Optional. If set, performs request validation (e.g. permission + // checks and any other type of validation), but does not actually execute the + // upgrade. + ValidateOnly bool `json:"validateOnly,omitempty"` + // Version: Required. The version the cluster is going to be upgraded to. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + // "POSTGRES_16" - The database version is Postgres 16. + Version string `json:"version,omitempty"` + // 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 UpgradeClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod UpgradeClusterRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// UpgradeClusterResponse: UpgradeClusterResponse contains the response for +// upgrade cluster operation. +type UpgradeClusterResponse struct { + // ClusterUpgradeDetails: Array of upgrade details for the current cluster and + // all the secondary clusters associated with this cluster. + ClusterUpgradeDetails []*ClusterUpgradeDetails `json:"clusterUpgradeDetails,omitempty"` + // Message: A user friendly message summarising the upgrade operation details + // and the next steps for the user if there is any. + Message string `json:"message,omitempty"` + // Status: Status of upgrade operation. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterUpgradeDetails") 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. "ClusterUpgradeDetails") 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 UpgradeClusterResponse) MarshalJSON() ([]byte, error) { + type NoMethod UpgradeClusterResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // User: Message describing User object. type User struct { // DatabaseRoles: Optional. List of database roles this user has. The database @@ -5915,6 +6204,107 @@ func (c *ProjectsLocationsClustersSwitchoverCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsClustersUpgradeCall struct { + s *Service + name string + upgradeclusterrequest *UpgradeClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Upgrade: Upgrades a single Cluster. Imperative only. +// +// - name: The resource name of the cluster. +func (r *ProjectsLocationsClustersService) Upgrade(name string, upgradeclusterrequest *UpgradeClusterRequest) *ProjectsLocationsClustersUpgradeCall { + c := &ProjectsLocationsClustersUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.upgradeclusterrequest = upgradeclusterrequest + 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 *ProjectsLocationsClustersUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersUpgradeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersUpgradeCall) Context(ctx context.Context) *ProjectsLocationsClustersUpgradeCall { + 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 *ProjectsLocationsClustersUpgradeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersUpgradeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.upgradeclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:upgrade") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "alloydb.projects.locations.clusters.upgrade" 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 *ProjectsLocationsClustersUpgradeCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsClustersInstancesCreateCall struct { s *Service parent string diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json index 67be97a0eab..94061ecd229 100644 --- a/alloydb/v1beta/alloydb-api.json +++ b/alloydb/v1beta/alloydb-api.json @@ -1486,7 +1486,7 @@ } } }, - "revision": "20240703", + "revision": "20240806", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -1772,6 +1772,26 @@ }, "type": "object" }, + "CloudSQLBackupRunSource": { + "description": "The source CloudSQL backup resource.", + "id": "CloudSQLBackupRunSource", + "properties": { + "backupRunId": { + "description": "Required. The CloudSQL backup run ID.", + "format": "int64", + "type": "string" + }, + "instanceId": { + "description": "Required. The CloudSQL instance ID.", + "type": "string" + }, + "project": { + "description": "The project ID of the source CloudSQL instance. This should be the same as the AlloyDB cluster's project.", + "type": "string" + } + }, + "type": "object" + }, "Cluster": { "description": "A cluster is a collection of regional AlloyDB resources. It can include a primary instance and one or more read pool instances. All cluster resources share a storage layer, which scales as needed.", "id": "Cluster", @@ -1792,6 +1812,11 @@ "description": "Output only. Cluster created from backup.", "readOnly": true }, + "cloudsqlBackupRunSource": { + "$ref": "CloudSQLBackupRunSource", + "description": "Output only. Cluster created from CloudSQL snapshot.", + "readOnly": true + }, "clusterType": { "description": "Output only. The type of the cluster. This is an output-only field and it's populated at the Cluster creation time or the Cluster promotion time. The cluster type is determined by which RPC was used to create the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`", "enum": [ @@ -2002,6 +2027,86 @@ }, "type": "object" }, + "ClusterUpgradeDetails": { + "description": "Upgrade details of a cluster. This cluster can be primary or secondary.", + "id": "ClusterUpgradeDetails", + "properties": { + "clusterType": { + "description": "Cluster type which can either be primary or secondary.", + "enum": [ + "CLUSTER_TYPE_UNSPECIFIED", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the cluster is unknown.", + "Primary cluster that support read and write operations.", + "Secondary cluster that is replicating from another region. This only supports read." + ], + "type": "string" + }, + "databaseVersion": { + "description": "Database version of the cluster after the upgrade operation. This will be the target version if the upgrade was successful otherwise it remains the same as that before the upgrade operation.", + "enum": [ + "DATABASE_VERSION_UNSPECIFIED", + "POSTGRES_13", + "POSTGRES_14", + "POSTGRES_15", + "POSTGRES_16" + ], + "enumDeprecated": [ + false, + true, + false, + false, + false + ], + "enumDescriptions": [ + "This is an unknown database version.", + "DEPRECATED - The database version is Postgres 13.", + "The database version is Postgres 14.", + "The database version is Postgres 15.", + "The database version is Postgres 16." + ], + "type": "string" + }, + "instanceUpgradeDetails": { + "description": "Upgrade details of the instances directly associated with this cluster.", + "items": { + "$ref": "InstanceUpgradeDetails" + }, + "type": "array" + }, + "name": { + "description": "Normalized name of the cluster", + "type": "string" + }, + "stageInfo": { + "description": "Array containing stage info associated with this cluster.", + "items": { + "$ref": "StageInfo" + }, + "type": "array" + }, + "upgradeStatus": { + "description": "Upgrade status of the cluster.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "ConnectionInfo": { "description": "ConnectionInfo singleton resource. https://google.aip.dev/156", "id": "ConnectionInfo", @@ -2546,6 +2651,49 @@ }, "type": "object" }, + "InstanceUpgradeDetails": { + "description": "Details regarding the upgrade of instaces associated with a cluster.", + "id": "InstanceUpgradeDetails", + "properties": { + "instanceType": { + "description": "Instance type.", + "enum": [ + "INSTANCE_TYPE_UNSPECIFIED", + "PRIMARY", + "READ_POOL", + "SECONDARY" + ], + "enumDescriptions": [ + "The type of the instance is unknown.", + "PRIMARY instances support read and write operations.", + "READ POOL instances support read operations only. Each read pool instance consists of one or more homogeneous nodes. * Read pool of size 1 can only have zonal availability. * Read pools with node count of 2 or more can have regional availability (nodes are present in 2 or more zones in a region).", + "SECONDARY instances support read operations only. SECONDARY instance is a cross-region read replica" + ], + "type": "string" + }, + "name": { + "description": "Normalized name of the instance.", + "type": "string" + }, + "upgradeStatus": { + "description": "Upgrade status of the instance.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "IntegerRestrictions": { "description": "Restrictions on INTEGER type values.", "id": "IntegerRestrictions", @@ -2871,6 +3019,10 @@ "description": "Track actively running queries on the instance. If not set, this flag is \"off\" by default.", "type": "boolean" }, + "trackClientAddress": { + "description": "Track client address for an instance. If not set, default value is \"off\".", + "type": "boolean" + }, "trackWaitEventTypes": { "description": "Output only. Track wait event types during query execution for an instance. This flag is turned \"on\" by default but tracking is enabled only after observability enabled flag is also turned on. This is read-only flag and only modifiable by producer API.", "readOnly": true, @@ -3102,6 +3254,13 @@ "RestartInstanceRequest": { "id": "RestartInstanceRequest", "properties": { + "nodeIds": { + "description": "Optional. Full name of the nodes as obtained from INSTANCE_VIEW_FULL to restart upon. Only applicable for read instances.", + "items": { + "type": "string" + }, + "type": "array" + }, "requestId": { "description": "Optional. 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. The server will guarantee that for at least 60 minutes after the first request. 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).", "type": "string" @@ -3202,6 +3361,51 @@ }, "type": "object" }, + "StageInfo": { + "description": "Stage information for different stages in the upgrade process.", + "id": "StageInfo", + "properties": { + "logsUrl": { + "description": "logs_url is the URL for the logs associated with a stage if that stage has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK, PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE.", + "type": "string" + }, + "stage": { + "description": "The stage.", + "enum": [ + "STAGE_UNSPECIFIED", + "ALLOYDB_PRECHECK", + "PG_UPGRADE_CHECK", + "PRIMARY_INSTANCE_UPGRADE", + "READ_POOL_UPGRADE" + ], + "enumDescriptions": [ + "Unspecified stage.", + "This stage is for the custom checks done before upgrade.", + "This stage is for `pg_upgrade --check` run before upgrade.", + "This stage is primary upgrade.", + "This stage is read pool upgrade." + ], + "type": "string" + }, + "status": { + "description": "Status of the stage.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -3334,43 +3538,19 @@ "type": "object" }, "StorageDatabasecenterPartnerapiV1mainCustomMetadataData": { - "description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", + "description": "Any custom metadata associated with the resource. e.g. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", "id": "StorageDatabasecenterPartnerapiV1mainCustomMetadataData", "properties": { - "databaseMetadata": { + "internalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration.", "items": { - "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata" + "$ref": "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata" }, "type": "array" } }, "type": "object" }, - "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata": { - "description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", - "id": "StorageDatabasecenterPartnerapiV1mainDatabaseMetadata", - "properties": { - "backupConfiguration": { - "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", - "description": "Backup configuration for this database" - }, - "backupRun": { - "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", - "description": "Information about the last backup attempt for this database" - }, - "product": { - "$ref": "StorageDatabasecenterProtoCommonProduct" - }, - "resourceId": { - "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId" - }, - "resourceName": { - "description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", - "type": "string" - } - }, - "type": "object" - }, "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed": { "description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", "id": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed", @@ -3399,8 +3579,7 @@ "type": "string" }, "observabilityMetricData": { - "$ref": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData", - "description": "More feed data would be added in subsequent CLs" + "$ref": "StorageDatabasecenterPartnerapiV1mainObservabilityMetricData" }, "recommendationSignalData": { "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData" @@ -3509,6 +3688,24 @@ "description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", "type": "string" }, + "signalSeverity": { + "description": "The severity of the signal, such as if it's a HIGH or LOW severity.", + "enum": [ + "SIGNAL_SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "This value is used for findings when a source doesn't write a severity value.", + "A critical vulnerability is easily discoverable by an external actor, exploitable.", + "A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities.", + "A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually gain access and the ability to execute arbitrary code or exfiltrate data.", + "A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment." + ], + "type": "string" + }, "signalType": { "description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", "enum": [ @@ -3805,7 +4002,7 @@ "type": "string" }, "resourceType": { - "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", + "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance, spanner.googleapis.com/Database, firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", "type": "string" }, "uniqueId": { @@ -4303,6 +4500,31 @@ }, "type": "object" }, + "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration settings. Similarly bigtable can have multiple clusters within same bigtable instance.", + "id": "StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata", + "properties": { + "backupConfiguration": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupConfiguration", + "description": "Backup configuration for this database" + }, + "backupRun": { + "$ref": "StorageDatabasecenterPartnerapiV1mainBackupRun", + "description": "Information about the last backup attempt for this database" + }, + "product": { + "$ref": "StorageDatabasecenterProtoCommonProduct" + }, + "resourceId": { + "$ref": "StorageDatabasecenterPartnerapiV1mainDatabaseResourceId" + }, + "resourceName": { + "description": "Required. internal resource name for spanner this will be database name e.g.\"spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1\"", + "type": "string" + } + }, + "type": "object" + }, "StorageDatabasecenterPartnerapiV1mainMachineConfiguration": { "description": "MachineConfiguration describes the configuration of a machine specific to Database Resource.", "id": "StorageDatabasecenterPartnerapiV1mainMachineConfiguration", @@ -4476,7 +4698,9 @@ "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", "ENGINE_MEMORYSTORE_FOR_REDIS", "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", - "ENGINE_OTHER" + "ENGINE_OTHER", + "ENGINE_FIRESTORE_WITH_NATIVE_MODE", + "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" ], "enumDeprecated": [ false, @@ -4492,6 +4716,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -4508,7 +4734,9 @@ "Cloud Spanner with Google SQL dialect.", "Memorystore with Redis dialect.", "Memorystore with Redis cluster dialect.", - "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum.", + "Firestore with native mode.", + "Firestore with datastore mode." ], "type": "string" }, @@ -4525,7 +4753,8 @@ "ON_PREM", "PRODUCT_TYPE_MEMORYSTORE", "PRODUCT_TYPE_BIGTABLE", - "PRODUCT_TYPE_OTHER" + "PRODUCT_TYPE_OTHER", + "PRODUCT_TYPE_FIRESTORE" ], "enumDeprecated": [ false, @@ -4538,6 +4767,7 @@ true, false, false, + false, false ], "enumDescriptions": [ @@ -4551,7 +4781,8 @@ "On premises database product.", "Memorystore product area in GCP", "Bigtable product area in GCP", - "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum.", + "Firestore product area in GCP." ], "type": "string" }, @@ -4713,6 +4944,11 @@ "format": "google-datetime", "type": "string" }, + "graceEndTime": { + "description": "grace end time of the cluster.", + "format": "google-datetime", + "type": "string" + }, "startTime": { "description": "start time of the trial cluster.", "format": "google-datetime", @@ -4747,6 +4983,40 @@ }, "type": "object" }, + "UpgradeClusterResponse": { + "description": "UpgradeClusterResponse contains the response for upgrade cluster operation.", + "id": "UpgradeClusterResponse", + "properties": { + "clusterUpgradeDetails": { + "description": "Array of upgrade details for the current cluster and all the secondary clusters associated with this cluster.", + "items": { + "$ref": "ClusterUpgradeDetails" + }, + "type": "array" + }, + "message": { + "description": "A user friendly message summarising the upgrade operation details and the next steps for the user if there is any.", + "type": "string" + }, + "status": { + "description": "Status of upgrade operation.", + "enum": [ + "STATUS_UNSPECIFIED", + "SUCCESS", + "FAILED", + "PARTIAL_SUCCESS" + ], + "enumDescriptions": [ + "Unspecified status.", + "Operation succeeded.", + "Operation failed.", + "Operation partially succeeded." + ], + "type": "string" + } + }, + "type": "object" + }, "User": { "description": "Message describing User object.", "id": "User", diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go index 01b50b3bcb5..5a3e3d5d6d3 100644 --- a/alloydb/v1beta/alloydb-gen.go +++ b/alloydb/v1beta/alloydb-gen.go @@ -520,6 +520,33 @@ func (s CloudControl2SharedOperationsReconciliationOperationMetadata) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CloudSQLBackupRunSource: The source CloudSQL backup resource. +type CloudSQLBackupRunSource struct { + // BackupRunId: Required. The CloudSQL backup run ID. + BackupRunId int64 `json:"backupRunId,omitempty,string"` + // InstanceId: Required. The CloudSQL instance ID. + InstanceId string `json:"instanceId,omitempty"` + // Project: The project ID of the source CloudSQL instance. This should be the + // same as the AlloyDB cluster's project. + Project string `json:"project,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupRunId") 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. "BackupRunId") 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 CloudSQLBackupRunSource) MarshalJSON() ([]byte, error) { + type NoMethod CloudSQLBackupRunSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Cluster: A cluster is a collection of regional AlloyDB resources. It can // include a primary instance and one or more read pool instances. All cluster // resources share a storage layer, which scales as needed. @@ -535,6 +562,9 @@ type Cluster struct { AutomatedBackupPolicy *AutomatedBackupPolicy `json:"automatedBackupPolicy,omitempty"` // BackupSource: Output only. Cluster created from backup. BackupSource *BackupSource `json:"backupSource,omitempty"` + // CloudsqlBackupRunSource: Output only. Cluster created from CloudSQL + // snapshot. + CloudsqlBackupRunSource *CloudSQLBackupRunSource `json:"cloudsqlBackupRunSource,omitempty"` // ClusterType: Output only. The type of the cluster. This is an output-only // field and it's populated at the Cluster creation time or the Cluster // promotion time. The cluster type is determined by which RPC was used to @@ -690,6 +720,61 @@ func (s Cluster) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ClusterUpgradeDetails: Upgrade details of a cluster. This cluster can be +// primary or secondary. +type ClusterUpgradeDetails struct { + // ClusterType: Cluster type which can either be primary or secondary. + // + // Possible values: + // "CLUSTER_TYPE_UNSPECIFIED" - The type of the cluster is unknown. + // "PRIMARY" - Primary cluster that support read and write operations. + // "SECONDARY" - Secondary cluster that is replicating from another region. + // This only supports read. + ClusterType string `json:"clusterType,omitempty"` + // DatabaseVersion: Database version of the cluster after the upgrade + // operation. This will be the target version if the upgrade was successful + // otherwise it remains the same as that before the upgrade operation. + // + // Possible values: + // "DATABASE_VERSION_UNSPECIFIED" - This is an unknown database version. + // "POSTGRES_13" - DEPRECATED - The database version is Postgres 13. + // "POSTGRES_14" - The database version is Postgres 14. + // "POSTGRES_15" - The database version is Postgres 15. + // "POSTGRES_16" - The database version is Postgres 16. + DatabaseVersion string `json:"databaseVersion,omitempty"` + // InstanceUpgradeDetails: Upgrade details of the instances directly associated + // with this cluster. + InstanceUpgradeDetails []*InstanceUpgradeDetails `json:"instanceUpgradeDetails,omitempty"` + // Name: Normalized name of the cluster + Name string `json:"name,omitempty"` + // StageInfo: Array containing stage info associated with this cluster. + StageInfo []*StageInfo `json:"stageInfo,omitempty"` + // UpgradeStatus: Upgrade status of the cluster. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + UpgradeStatus string `json:"upgradeStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterType") 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. "ClusterType") 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 ClusterUpgradeDetails) MarshalJSON() ([]byte, error) { + type NoMethod ClusterUpgradeDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConnectionInfo: ConnectionInfo singleton resource. // https://google.aip.dev/156 type ConnectionInfo struct { @@ -1331,6 +1416,50 @@ func (s InstanceNetworkConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InstanceUpgradeDetails: Details regarding the upgrade of instaces associated +// with a cluster. +type InstanceUpgradeDetails struct { + // InstanceType: Instance type. + // + // Possible values: + // "INSTANCE_TYPE_UNSPECIFIED" - The type of the instance is unknown. + // "PRIMARY" - PRIMARY instances support read and write operations. + // "READ_POOL" - READ POOL instances support read operations only. Each read + // pool instance consists of one or more homogeneous nodes. * Read pool of size + // 1 can only have zonal availability. * Read pools with node count of 2 or + // more can have regional availability (nodes are present in 2 or more zones in + // a region). + // "SECONDARY" - SECONDARY instances support read operations only. SECONDARY + // instance is a cross-region read replica + InstanceType string `json:"instanceType,omitempty"` + // Name: Normalized name of the instance. + Name string `json:"name,omitempty"` + // UpgradeStatus: Upgrade status of the instance. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + UpgradeStatus string `json:"upgradeStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "InstanceType") 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. "InstanceType") 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 InstanceUpgradeDetails) MarshalJSON() ([]byte, error) { + type NoMethod InstanceUpgradeDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // IntegerRestrictions: Restrictions on INTEGER type values. type IntegerRestrictions struct { // MaxValue: The maximum value that can be specified, if applicable. @@ -1760,6 +1889,9 @@ type ObservabilityInstanceConfig struct { // TrackActiveQueries: Track actively running queries on the instance. If not // set, this flag is "off" by default. TrackActiveQueries bool `json:"trackActiveQueries,omitempty"` + // TrackClientAddress: Track client address for an instance. If not set, + // default value is "off". + TrackClientAddress bool `json:"trackClientAddress,omitempty"` // TrackWaitEventTypes: Output only. Track wait event types during query // execution for an instance. This flag is turned "on" by default but tracking // is enabled only after observability enabled flag is also turned on. This is @@ -2104,6 +2236,9 @@ func (s ReadPoolConfig) MarshalJSON() ([]byte, error) { } type RestartInstanceRequest struct { + // NodeIds: Optional. Full name of the nodes as obtained from + // INSTANCE_VIEW_FULL to restart upon. Only applicable for read instances. + NodeIds []string `json:"nodeIds,omitempty"` // RequestId: Optional. 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. The server will @@ -2120,13 +2255,13 @@ type RestartInstanceRequest struct { // checks and any other type of validation), but do not actually execute the // restart. ValidateOnly bool `json:"validateOnly,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "NodeIds") 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. "RequestId") to include in API + // NullFields is a list of field names (e.g. "NodeIds") 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. @@ -2256,6 +2391,49 @@ func (s SslConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// StageInfo: Stage information for different stages in the upgrade process. +type StageInfo struct { + // LogsUrl: logs_url is the URL for the logs associated with a stage if that + // stage has logs. Right now, only three stages have logs: ALLOYDB_PRECHECK, + // PG_UPGRADE_CHECK, PRIMARY_INSTANCE_UPGRADE. + LogsUrl string `json:"logsUrl,omitempty"` + // Stage: The stage. + // + // Possible values: + // "STAGE_UNSPECIFIED" - Unspecified stage. + // "ALLOYDB_PRECHECK" - This stage is for the custom checks done before + // upgrade. + // "PG_UPGRADE_CHECK" - This stage is for `pg_upgrade --check` run before + // upgrade. + // "PRIMARY_INSTANCE_UPGRADE" - This stage is primary upgrade. + // "READ_POOL_UPGRADE" - This stage is read pool upgrade. + Stage string `json:"stage,omitempty"` + // Status: Status of the stage. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "LogsUrl") 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. "LogsUrl") 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 StageInfo) MarshalJSON() ([]byte, error) { + type NoMethod StageInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Status: The `Status` type defines a logical error model that is suitable for // different programming environments, including REST APIs and RPC APIs. It is // used by gRPC (https://github.com/grpc). Each `Status` message contains three @@ -2419,20 +2597,23 @@ func (s StorageDatabasecenterPartnerapiV1mainCompliance) MarshalJSON() ([]byte, } // StorageDatabasecenterPartnerapiV1mainCustomMetadataData: Any custom metadata -// associated with the resource. i.e. A spanner instance can have multiple +// associated with the resource. e.g. A spanner instance can have multiple // databases with its own unique metadata. Information for these individual // databases can be captured in custom metadata data type StorageDatabasecenterPartnerapiV1mainCustomMetadataData struct { - DatabaseMetadata []*StorageDatabasecenterPartnerapiV1mainDatabaseMetadata `json:"databaseMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseMetadata") to - // unconditionally include in API requests. By default, fields with empty or + // InternalResourceMetadata: Metadata for individual internal resources in an + // instance. e.g. spanner instance can have multiple databases with unique + // configuration. + InternalResourceMetadata []*StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata `json:"internalResourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "InternalResourceMetadata") + // 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. "DatabaseMetadata") 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. "InternalResourceMetadata") 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:"-"` } @@ -2442,37 +2623,6 @@ func (s StorageDatabasecenterPartnerapiV1mainCustomMetadataData) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// StorageDatabasecenterPartnerapiV1mainDatabaseMetadata: Metadata for -// individual databases created in an instance. i.e. spanner instance can have -// multiple databases with unique configuration settings. -type StorageDatabasecenterPartnerapiV1mainDatabaseMetadata struct { - // BackupConfiguration: Backup configuration for this database - BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` - // BackupRun: Information about the last backup attempt for this database - BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` - Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` - ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` - // ResourceName: Required. Database name. Resource name to follow CAIS - // resource_name format as noted here go/condor-common-datamodel - ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 StorageDatabasecenterPartnerapiV1mainDatabaseMetadata) MarshalJSON() ([]byte, error) { - type NoMethod StorageDatabasecenterPartnerapiV1mainDatabaseMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed: // DatabaseResourceFeed is the top level proto to be used to ingest different // database resource level events into Condor platform. @@ -2488,8 +2638,7 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceFeed struct { // "SECURITY_FINDING_DATA" - Database resource security health signal data // "RECOMMENDATION_SIGNAL_DATA" - Database resource recommendation signal // data - FeedType string `json:"feedType,omitempty"` - // ObservabilityMetricData: More feed data would be added in subsequent CLs + FeedType string `json:"feedType,omitempty"` ObservabilityMetricData *StorageDatabasecenterPartnerapiV1mainObservabilityMetricData `json:"observabilityMetricData,omitempty"` RecommendationSignalData *StorageDatabasecenterPartnerapiV1mainDatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` ResourceHealthSignalData *StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData `json:"resourceHealthSignalData,omitempty"` @@ -2582,6 +2731,22 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceHealthSignalData struc // SignalId: Required. Unique identifier for the signal. This is an unique id // which would be mainatined by partner to identify a signal. SignalId string `json:"signalId,omitempty"` + // SignalSeverity: The severity of the signal, such as if it's a HIGH or LOW + // severity. + // + // Possible values: + // "SIGNAL_SEVERITY_UNSPECIFIED" - This value is used for findings when a + // source doesn't write a severity value. + // "CRITICAL" - A critical vulnerability is easily discoverable by an + // external actor, exploitable. + // "HIGH" - A high risk vulnerability can be easily discovered and exploited + // in combination with other vulnerabilities. + // "MEDIUM" - A medium risk vulnerability could be used by an actor to gain + // access to resources or privileges that enable them to eventually gain access + // and the ability to execute arbitrary code or exfiltrate data. + // "LOW" - A low risk vulnerability hampers a security organization's ability + // to detect vulnerabilities or active threats in their deployment. + SignalSeverity string `json:"signalSeverity,omitempty"` // SignalType: Required. Type of signal, for example, // `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. // @@ -2819,8 +2984,10 @@ type StorageDatabasecenterPartnerapiV1mainDatabaseResourceId struct { // ResourceType: Required. The type of resource this ID is identifying. Ex // redis.googleapis.com/Instance, redis.googleapis.com/Cluster, // alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, - // spanner.googleapis.com/Instance REQUIRED Please refer - // go/condor-common-datamodel + // spanner.googleapis.com/Instance, spanner.googleapis.com/Database, + // firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, + // bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance + // REQUIRED Please refer go/condor-common-datamodel ResourceType string `json:"resourceType,omitempty"` // UniqueId: Required. A service-local token that distinguishes this resource // from other resources within the same service. @@ -3235,6 +3402,39 @@ func (s StorageDatabasecenterPartnerapiV1mainEntitlement) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata: Metadata for +// individual internal resources in an instance. e.g. spanner instance can have +// multiple databases with unique configuration settings. Similarly bigtable +// can have multiple clusters within same bigtable instance. +type StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata struct { + // BackupConfiguration: Backup configuration for this database + BackupConfiguration *StorageDatabasecenterPartnerapiV1mainBackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Information about the last backup attempt for this database + BackupRun *StorageDatabasecenterPartnerapiV1mainBackupRun `json:"backupRun,omitempty"` + Product *StorageDatabasecenterProtoCommonProduct `json:"product,omitempty"` + ResourceId *StorageDatabasecenterPartnerapiV1mainDatabaseResourceId `json:"resourceId,omitempty"` + // ResourceName: Required. internal resource name for spanner this will be + // database name + // e.g."spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1" + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod StorageDatabasecenterPartnerapiV1mainInternalResourceMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // StorageDatabasecenterPartnerapiV1mainMachineConfiguration: // MachineConfiguration describes the configuration of a machine specific to // Database Resource. @@ -3432,6 +3632,8 @@ type StorageDatabasecenterProtoCommonProduct struct { // dialect. // "ENGINE_OTHER" - Other refers to rest of other database engine. This is to // be when engine is known, but it is not present in this enum. + // "ENGINE_FIRESTORE_WITH_NATIVE_MODE" - Firestore with native mode. + // "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" - Firestore with datastore mode. Engine string `json:"engine,omitempty"` // Type: Type of specific database product. It could be CloudSQL, AlloyDB etc.. // @@ -3449,6 +3651,7 @@ type StorageDatabasecenterProtoCommonProduct struct { // "PRODUCT_TYPE_BIGTABLE" - Bigtable product area in GCP // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. This is // to be when product type is known, but it is not present in this enum. + // "PRODUCT_TYPE_FIRESTORE" - Firestore product area in GCP. Type string `json:"type,omitempty"` // Version: Version of the underlying database engine. Example values: For // MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" @@ -3662,6 +3865,8 @@ func (s TimeBasedRetention) MarshalJSON() ([]byte, error) { type TrialMetadata struct { // EndTime: End time of the trial cluster. EndTime string `json:"endTime,omitempty"` + // GraceEndTime: grace end time of the cluster. + GraceEndTime string `json:"graceEndTime,omitempty"` // StartTime: start time of the trial cluster. StartTime string `json:"startTime,omitempty"` // UpgradeTime: Upgrade time of trial cluster to Standard cluster. @@ -3712,6 +3917,41 @@ func (s UpdatePolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// UpgradeClusterResponse: UpgradeClusterResponse contains the response for +// upgrade cluster operation. +type UpgradeClusterResponse struct { + // ClusterUpgradeDetails: Array of upgrade details for the current cluster and + // all the secondary clusters associated with this cluster. + ClusterUpgradeDetails []*ClusterUpgradeDetails `json:"clusterUpgradeDetails,omitempty"` + // Message: A user friendly message summarising the upgrade operation details + // and the next steps for the user if there is any. + Message string `json:"message,omitempty"` + // Status: Status of upgrade operation. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Unspecified status. + // "SUCCESS" - Operation succeeded. + // "FAILED" - Operation failed. + // "PARTIAL_SUCCESS" - Operation partially succeeded. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterUpgradeDetails") 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. "ClusterUpgradeDetails") 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 UpgradeClusterResponse) MarshalJSON() ([]byte, error) { + type NoMethod UpgradeClusterResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // User: Message describing User object. type User struct { // DatabaseRoles: Optional. List of database roles this user has. The database diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 50bb4e031d3..842121015cd 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -226,7 +226,7 @@ ] }, "list": { - "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", + "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", "flatPath": "v1alpha/accounts", "httpMethod": "GET", "id": "analyticsadmin.accounts.list", @@ -311,7 +311,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1alpha/accounts/{accountsId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.accounts.runAccessReport", @@ -320,7 +320,7 @@ ], "parameters": { "entity": { - "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", + "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your Google Analytics Account ID.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -666,7 +666,7 @@ ] }, "create": { - "description": "Creates an \"GA4\" property with the specified location and attributes.", + "description": "Creates a Google Analytics property with the specified location and attributes.", "flatPath": "v1alpha/properties", "httpMethod": "POST", "id": "analyticsadmin.properties.create", @@ -720,7 +720,7 @@ ] }, "delete": { - "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", + "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", "flatPath": "v1alpha/properties/{propertiesId}", "httpMethod": "DELETE", "id": "analyticsadmin.properties.delete", @@ -804,7 +804,7 @@ ] }, "get": { - "description": "Lookup for a single \"GA4\" Property.", + "description": "Lookup for a single GA Property.", "flatPath": "v1alpha/properties/{propertiesId}", "httpMethod": "GET", "id": "analyticsadmin.properties.get", @@ -908,7 +908,7 @@ ] }, "list": { - "description": "Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", + "description": "Returns child Properties under the specified parent Account. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", "flatPath": "v1alpha/properties", "httpMethod": "GET", "id": "analyticsadmin.properties.list", @@ -1017,7 +1017,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1alpha/properties/{propertiesId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.properties.runAccessReport", @@ -1026,7 +1026,7 @@ ], "parameters": { "entity": { - "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", + "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your Google Analytics Account ID.", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -3341,7 +3341,7 @@ ] }, "get": { - "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", + "description": "Lookup for a single MeasurementProtocolSecret.", "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", "httpMethod": "GET", "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get", @@ -4886,7 +4886,7 @@ } } }, - "revision": "20240731", + "revision": "20240823", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -5323,7 +5323,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaAccountSummary": { - "description": "A virtual resource representing an overview of an account and all its child GA4 properties.", + "description": "A virtual resource representing an overview of an account and all its child Google Analytics properties.", "id": "GoogleAnalyticsAdminV1alphaAccountSummary", "properties": { "account": { @@ -5366,11 +5366,11 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaAdSenseLink": { - "description": "A link between a GA4 Property and an AdSense for Content ad client.", + "description": "A link between a Google Analytics property and an AdSense for Content ad client.", "id": "GoogleAnalyticsAdminV1alphaAdSenseLink", "properties": { "adClientCode": { - "description": "Immutable. The AdSense ad client code that the GA4 property is linked to. Example format: \"ca-pub-1234567890\"", + "description": "Immutable. The AdSense ad client code that the Google Analytics property is linked to. Example format: \"ca-pub-1234567890\"", "type": "string" }, "name": { @@ -5491,7 +5491,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaAudience": { - "description": "A resource message representing a GA4 Audience.", + "description": "A resource message representing an Audience.", "id": "GoogleAnalyticsAdminV1alphaAudience", "properties": { "adsPersonalizationEnabled": { @@ -5992,7 +5992,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaBigQueryLink": { - "description": "A link between a GA4 Property and BigQuery project.", + "description": "A link between a Google Analytics property and BigQuery project.", "id": "GoogleAnalyticsAdminV1alphaBigQueryLink", "properties": { "createTime": { @@ -6037,7 +6037,7 @@ "type": "string" }, "project": { - "description": "Immutable. The linked Google Cloud project. When creating a BigQueryLink, you may provide this resource name using either a project number or project ID. Once this resource has been created, the returned project will always have a project that contains a project number. Format: 'projects/{project number}' Example: 'projects/1234'", + "description": "Immutable. The linked Google Cloud project resource name. Currently, this API always uses a project number, but may use project IDs in the future. Format: 'projects/{project number}' Example: 'projects/1234'", "type": "string" }, "streamingExportEnabled": { @@ -7017,7 +7017,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink": { - "description": "A link between a GA4 property and a Display \u0026 Video 360 advertiser.", + "description": "A link between a Google Analytics property and a Display \u0026 Video 360 advertiser.", "id": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink", "properties": { "adsPersonalizationEnabled": { @@ -7034,11 +7034,11 @@ "type": "string" }, "campaignDataSharingEnabled": { - "description": "Immutable. Enables the import of campaign data from Display \u0026 Video 360 into the GA4 property. After link creation, this can only be updated from the Display \u0026 Video 360 product. If this field is not set on create, it will be defaulted to true.", + "description": "Immutable. Enables the import of campaign data from Display \u0026 Video 360 into the Google Analytics property. After link creation, this can only be updated from the Display \u0026 Video 360 product. If this field is not set on create, it will be defaulted to true.", "type": "boolean" }, "costDataSharingEnabled": { - "description": "Immutable. Enables the import of cost data from Display \u0026 Video 360 into the GA4 property. This can only be enabled if campaign_data_sharing_enabled is enabled. After link creation, this can only be updated from the Display \u0026 Video 360 product. If this field is not set on create, it will be defaulted to true.", + "description": "Immutable. Enables the import of cost data from Display \u0026 Video 360 into the Google Analytics property. This can only be enabled if `campaign_data_sharing_enabled` is true. After link creation, this can only be updated from the Display \u0026 Video 360 product. If this field is not set on create, it will be defaulted to true.", "type": "boolean" }, "name": { @@ -7050,7 +7050,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal": { - "description": "A proposal for a link between a GA4 property and a Display \u0026 Video 360 advertiser. A proposal is converted to a DisplayVideo360AdvertiserLink once approved. Google Analytics admins approve inbound proposals while Display \u0026 Video 360 admins approve outbound proposals.", + "description": "A proposal for a link between a Google Analytics property and a Display \u0026 Video 360 advertiser. A proposal is converted to a DisplayVideo360AdvertiserLink once approved. Google Analytics admins approve inbound proposals while Display \u0026 Video 360 admins approve outbound proposals.", "id": "GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal", "properties": { "adsPersonalizationEnabled": { @@ -7217,7 +7217,7 @@ "id": "GoogleAnalyticsAdminV1alphaEventMapping", "properties": { "eventName": { - "description": "Required. Name of the GA4 event. It must always be set. The max allowed display name length is 40 UTF-16 code units.", + "description": "Required. Name of the Google Analytics event. It must always be set. The max allowed display name length is 40 UTF-16 code units.", "type": "string" }, "maxEventCount": { @@ -7244,7 +7244,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaExpandedDataSet": { - "description": "A resource message representing a GA4 ExpandedDataSet.", + "description": "A resource message representing an `ExpandedDataSet`.", "id": "GoogleAnalyticsAdminV1alphaExpandedDataSet", "properties": { "dataCollectionStartTime": { @@ -7420,7 +7420,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaFirebaseLink": { - "description": "A link between a GA4 property and a Firebase project.", + "description": "A link between a Google Analytics property and a Firebase project.", "id": "GoogleAnalyticsAdminV1alphaFirebaseLink", "properties": { "createTime": { @@ -7458,7 +7458,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaGoogleAdsLink": { - "description": "A link between a GA4 property and a Google Ads account.", + "description": "A link between a Google Analytics property and a Google Ads account.", "id": "GoogleAnalyticsAdminV1alphaGoogleAdsLink", "properties": { "adsPersonalizationEnabled": { @@ -8293,7 +8293,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaProperty": { - "description": "A resource message representing a Google Analytics GA4 property.", + "description": "A resource message representing a Google Analytics property.", "id": "GoogleAnalyticsAdminV1alphaProperty", "properties": { "account": { @@ -8407,9 +8407,9 @@ ], "enumDescriptions": [ "Unknown or unspecified property type", - "Ordinary GA4 property", - "GA4 subproperty", - "GA4 rollup property" + "Ordinary Google Analytics property", + "Google Analytics subproperty", + "Google Analytics rollup property" ], "type": "string" }, @@ -8442,7 +8442,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaPropertySummary": { - "description": "A virtual resource representing metadata for a GA4 property.", + "description": "A virtual resource representing metadata for a Google Analytics property.", "id": "GoogleAnalyticsAdminV1alphaPropertySummary", "properties": { "displayName": { @@ -8467,9 +8467,9 @@ ], "enumDescriptions": [ "Unknown or unspecified property type", - "Ordinary GA4 property", - "GA4 subproperty", - "GA4 rollup property" + "Ordinary Google Analytics property", + "Google Analytics subproperty", + "Google Analytics rollup property" ], "type": "string" } @@ -8697,7 +8697,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaSearchAds360Link": { - "description": "A link between a GA4 property and a Search Ads 360 entity.", + "description": "A link between a Google Analytics property and a Search Ads 360 entity.", "id": "GoogleAnalyticsAdminV1alphaSearchAds360Link", "properties": { "adsPersonalizationEnabled": { @@ -8714,11 +8714,11 @@ "type": "string" }, "campaignDataSharingEnabled": { - "description": "Immutable. Enables the import of campaign data from Search Ads 360 into the GA4 property. After link creation, this can only be updated from the Search Ads 360 product. If this field is not set on create, it will be defaulted to true.", + "description": "Immutable. Enables the import of campaign data from Search Ads 360 into the Google Analytics property. After link creation, this can only be updated from the Search Ads 360 product. If this field is not set on create, it will be defaulted to true.", "type": "boolean" }, "costDataSharingEnabled": { - "description": "Immutable. Enables the import of cost data from Search Ads 360 to the GA4 property. This can only be enabled if campaign_data_sharing_enabled is enabled. After link creation, this can only be updated from the Search Ads 360 product. If this field is not set on create, it will be defaulted to true.", + "description": "Immutable. Enables the import of cost data from Search Ads 360 to the Google Analytics property. This can only be enabled if campaign_data_sharing_enabled is enabled. After link creation, this can only be updated from the Search Ads 360 product. If this field is not set on create, it will be defaulted to true.", "type": "boolean" }, "name": { @@ -8892,7 +8892,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter": { - "description": "A resource message representing a GA4 Subproperty event filter.", + "description": "A resource message representing a Google Analytics subproperty event filter.", "id": "GoogleAnalyticsAdminV1alphaSubpropertyEventFilter", "properties": { "applyToProperty": { diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index bd79cbb1d8e..4ee9c5f8801 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -1144,7 +1144,7 @@ func (s GoogleAnalyticsAdminV1alphaAccount) MarshalJSON() ([]byte, error) { } // GoogleAnalyticsAdminV1alphaAccountSummary: A virtual resource representing -// an overview of an account and all its child GA4 properties. +// an overview of an account and all its child Google Analytics properties. type GoogleAnalyticsAdminV1alphaAccountSummary struct { // Account: Resource name of account referred to by this account summary // Format: accounts/{account_id} Example: "accounts/1000" @@ -1210,11 +1210,11 @@ type GoogleAnalyticsAdminV1alphaAcknowledgeUserDataCollectionResponse struct { googleapi.ServerResponse `json:"-"` } -// GoogleAnalyticsAdminV1alphaAdSenseLink: A link between a GA4 Property and an -// AdSense for Content ad client. +// GoogleAnalyticsAdminV1alphaAdSenseLink: A link between a Google Analytics +// property and an AdSense for Content ad client. type GoogleAnalyticsAdminV1alphaAdSenseLink struct { - // AdClientCode: Immutable. The AdSense ad client code that the GA4 property is - // linked to. Example format: "ca-pub-1234567890" + // AdClientCode: Immutable. The AdSense ad client code that the Google + // Analytics property is linked to. Example format: "ca-pub-1234567890" AdClientCode string `json:"adClientCode,omitempty"` // Name: Output only. The resource name for this AdSense Link resource. Format: // properties/{propertyId}/adSenseLinks/{linkId} Example: @@ -1378,7 +1378,7 @@ func (s GoogleAnalyticsAdminV1alphaAttributionSettings) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaAudience: A resource message representing a GA4 +// GoogleAnalyticsAdminV1alphaAudience: A resource message representing an // Audience. type GoogleAnalyticsAdminV1alphaAudience struct { // AdsPersonalizationEnabled: Output only. It is automatically set by GA to @@ -2085,8 +2085,8 @@ func (s GoogleAnalyticsAdminV1alphaBatchUpdateAccessBindingsResponse) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaBigQueryLink: A link between a GA4 Property and -// BigQuery project. +// GoogleAnalyticsAdminV1alphaBigQueryLink: A link between a Google Analytics +// property and BigQuery project. type GoogleAnalyticsAdminV1alphaBigQueryLink struct { // CreateTime: Output only. Time when the link was created. CreateTime string `json:"createTime,omitempty"` @@ -2113,11 +2113,9 @@ type GoogleAnalyticsAdminV1alphaBigQueryLink struct { // 'properties/{property_id}/bigQueryLinks/{bigquery_link_id}' Format: // 'properties/1234/bigQueryLinks/abc567' Name string `json:"name,omitempty"` - // Project: Immutable. The linked Google Cloud project. When creating a - // BigQueryLink, you may provide this resource name using either a project - // number or project ID. Once this resource has been created, the returned - // project will always have a project that contains a project number. Format: - // 'projects/{project number}' Example: 'projects/1234' + // Project: Immutable. The linked Google Cloud project resource name. + // Currently, this API always uses a project number, but may use project IDs in + // the future. Format: 'projects/{project number}' Example: 'projects/1234' Project string `json:"project,omitempty"` // StreamingExportEnabled: If set true, enables streaming export to the linked // Google Cloud project. @@ -3320,7 +3318,7 @@ func (s GoogleAnalyticsAdminV1alphaDeleteConnectedSiteTagRequest) MarshalJSON() } // GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink: A link between a -// GA4 property and a Display & Video 360 advertiser. +// Google Analytics property and a Display & Video 360 advertiser. type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink struct { // AdsPersonalizationEnabled: Enables personalized advertising features with // this integration. If this field is not set on create/update, it will be @@ -3332,15 +3330,15 @@ type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink struct { // AdvertiserId: Immutable. The Display & Video 360 Advertiser's advertiser ID. AdvertiserId string `json:"advertiserId,omitempty"` // CampaignDataSharingEnabled: Immutable. Enables the import of campaign data - // from Display & Video 360 into the GA4 property. After link creation, this - // can only be updated from the Display & Video 360 product. If this field is - // not set on create, it will be defaulted to true. + // from Display & Video 360 into the Google Analytics property. After link + // creation, this can only be updated from the Display & Video 360 product. If + // this field is not set on create, it will be defaulted to true. CampaignDataSharingEnabled bool `json:"campaignDataSharingEnabled,omitempty"` // CostDataSharingEnabled: Immutable. Enables the import of cost data from - // Display & Video 360 into the GA4 property. This can only be enabled if - // campaign_data_sharing_enabled is enabled. After link creation, this can only - // be updated from the Display & Video 360 product. If this field is not set on - // create, it will be defaulted to true. + // Display & Video 360 into the Google Analytics property. This can only be + // enabled if `campaign_data_sharing_enabled` is true. After link creation, + // this can only be updated from the Display & Video 360 product. If this field + // is not set on create, it will be defaulted to true. CostDataSharingEnabled bool `json:"costDataSharingEnabled,omitempty"` // Name: Output only. The resource name for this DisplayVideo360AdvertiserLink // resource. Format: @@ -3369,10 +3367,10 @@ func (s GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink) MarshalJSON() } // GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal: A proposal -// for a link between a GA4 property and a Display & Video 360 advertiser. A -// proposal is converted to a DisplayVideo360AdvertiserLink once approved. -// Google Analytics admins approve inbound proposals while Display & Video 360 -// admins approve outbound proposals. +// for a link between a Google Analytics property and a Display & Video 360 +// advertiser. A proposal is converted to a DisplayVideo360AdvertiserLink once +// approved. Google Analytics admins approve inbound proposals while Display & +// Video 360 admins approve outbound proposals. type GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLinkProposal struct { // AdsPersonalizationEnabled: Immutable. Enables personalized advertising // features with this integration. If this field is not set on create, it will @@ -3594,8 +3592,8 @@ func (s GoogleAnalyticsAdminV1alphaEventEditRule) MarshalJSON() ([]byte, error) // GoogleAnalyticsAdminV1alphaEventMapping: Event setting conditions to match // an event. type GoogleAnalyticsAdminV1alphaEventMapping struct { - // EventName: Required. Name of the GA4 event. It must always be set. The max - // allowed display name length is 40 UTF-16 code units. + // EventName: Required. Name of the Google Analytics event. It must always be + // set. The max allowed display name length is 40 UTF-16 code units. EventName string `json:"eventName,omitempty"` // MaxEventCount: The maximum number of times the event occurred. If not set, // maximum event count won't be checked. @@ -3648,7 +3646,7 @@ func (s *GoogleAnalyticsAdminV1alphaEventMapping) UnmarshalJSON(data []byte) err } // GoogleAnalyticsAdminV1alphaExpandedDataSet: A resource message representing -// a GA4 ExpandedDataSet. +// an `ExpandedDataSet`. type GoogleAnalyticsAdminV1alphaExpandedDataSet struct { // DataCollectionStartTime: Output only. Time when expanded data set began (or // will begin) collecing data. @@ -3924,8 +3922,8 @@ func (s GoogleAnalyticsAdminV1alphaFetchConnectedGa4PropertyResponse) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaFirebaseLink: A link between a GA4 property and a -// Firebase project. +// GoogleAnalyticsAdminV1alphaFirebaseLink: A link between a Google Analytics +// property and a Firebase project. type GoogleAnalyticsAdminV1alphaFirebaseLink struct { // CreateTime: Output only. Time when this FirebaseLink was originally created. CreateTime string `json:"createTime,omitempty"` @@ -3990,8 +3988,8 @@ func (s GoogleAnalyticsAdminV1alphaGlobalSiteTag) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaGoogleAdsLink: A link between a GA4 property and -// a Google Ads account. +// GoogleAnalyticsAdminV1alphaGoogleAdsLink: A link between a Google Analytics +// property and a Google Ads account. type GoogleAnalyticsAdminV1alphaGoogleAdsLink struct { // AdsPersonalizationEnabled: Enable personalized advertising features with // this integration. Automatically publish my Google Analytics audience lists @@ -5280,7 +5278,7 @@ func (s GoogleAnalyticsAdminV1alphaPostbackWindow) MarshalJSON() ([]byte, error) } // GoogleAnalyticsAdminV1alphaProperty: A resource message representing a -// Google Analytics GA4 property. +// Google Analytics property. type GoogleAnalyticsAdminV1alphaProperty struct { // Account: Immutable. The resource name of the parent account Format: // accounts/{account_id} Example: "accounts/123" @@ -5346,9 +5344,9 @@ type GoogleAnalyticsAdminV1alphaProperty struct { // // Possible values: // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + // "PROPERTY_TYPE_ORDINARY" - Ordinary Google Analytics property + // "PROPERTY_TYPE_SUBPROPERTY" - Google Analytics subproperty + // "PROPERTY_TYPE_ROLLUP" - Google Analytics rollup property PropertyType string `json:"propertyType,omitempty"` // ServiceLevel: Output only. The Google Analytics service level that applies // to this property. @@ -5388,7 +5386,7 @@ func (s GoogleAnalyticsAdminV1alphaProperty) MarshalJSON() ([]byte, error) { } // GoogleAnalyticsAdminV1alphaPropertySummary: A virtual resource representing -// metadata for a GA4 property. +// metadata for a Google Analytics property. type GoogleAnalyticsAdminV1alphaPropertySummary struct { // DisplayName: Display name for the property referred to in this property // summary. @@ -5405,9 +5403,9 @@ type GoogleAnalyticsAdminV1alphaPropertySummary struct { // // Possible values: // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + // "PROPERTY_TYPE_ORDINARY" - Ordinary Google Analytics property + // "PROPERTY_TYPE_SUBPROPERTY" - Google Analytics subproperty + // "PROPERTY_TYPE_ROLLUP" - Google Analytics rollup property PropertyType string `json:"propertyType,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with empty or @@ -5773,8 +5771,8 @@ func (s GoogleAnalyticsAdminV1alphaSKAdNetworkConversionValueSchema) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaSearchAds360Link: A link between a GA4 property -// and a Search Ads 360 entity. +// GoogleAnalyticsAdminV1alphaSearchAds360Link: A link between a Google +// Analytics property and a Search Ads 360 entity. type GoogleAnalyticsAdminV1alphaSearchAds360Link struct { // AdsPersonalizationEnabled: Enables personalized advertising features with // this integration. If this field is not set on create, it will be defaulted @@ -5787,12 +5785,12 @@ type GoogleAnalyticsAdminV1alphaSearchAds360Link struct { // Search Ads 360 Advertiser. that has been linked. AdvertiserId string `json:"advertiserId,omitempty"` // CampaignDataSharingEnabled: Immutable. Enables the import of campaign data - // from Search Ads 360 into the GA4 property. After link creation, this can - // only be updated from the Search Ads 360 product. If this field is not set on - // create, it will be defaulted to true. + // from Search Ads 360 into the Google Analytics property. After link creation, + // this can only be updated from the Search Ads 360 product. If this field is + // not set on create, it will be defaulted to true. CampaignDataSharingEnabled bool `json:"campaignDataSharingEnabled,omitempty"` // CostDataSharingEnabled: Immutable. Enables the import of cost data from - // Search Ads 360 to the GA4 property. This can only be enabled if + // Search Ads 360 to the Google Analytics property. This can only be enabled if // campaign_data_sharing_enabled is enabled. After link creation, this can only // be updated from the Search Ads 360 product. If this field is not set on // create, it will be defaulted to true. @@ -5980,7 +5978,7 @@ type GoogleAnalyticsAdminV1alphaSetAutomatedGa4ConfigurationOptOutResponse struc } // GoogleAnalyticsAdminV1alphaSubpropertyEventFilter: A resource message -// representing a GA4 Subproperty event filter. +// representing a Google Analytics subproperty event filter. type GoogleAnalyticsAdminV1alphaSubpropertyEventFilter struct { // ApplyToProperty: Immutable. Resource name of the Subproperty that uses this // filter. @@ -6677,7 +6675,7 @@ type AccountsListCall struct { } // List: Returns all accounts accessible by the caller. Note that these -// accounts might not currently have GA4 properties. Soft-deleted (ie: +// accounts might not currently have GA properties. Soft-deleted (ie: // "trashed") accounts are excluded by default. Returns an empty list if no // relevant accounts are found. func (r *AccountsService) List() *AccountsListCall { @@ -7042,7 +7040,7 @@ type AccountsRunAccessReportCall struct { // be requested for a property. Reports may be requested for any property, but // dimensions that aren't related to quota can only be requested on Google // Analytics 360 properties. This method is only available to Administrators. -// These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 +// These data access records include GA UI Reporting, GA UI Explorations, GA // Data API, and other products like Firebase & Admob that can retrieve data // from Google Analytics through a linkage. These records don't include // property configuration changes like adding a stream or changing a property's @@ -7053,8 +7051,9 @@ type AccountsRunAccessReportCall struct { // or account level. If requested at the account level, Data Access Reports // include all access for all properties under that account. To request at // the property level, entity should be for example 'properties/123' if "123" -// is your GA4 property ID. To request at the account level, entity should be -// for example 'accounts/1234' if "1234" is your GA4 Account ID. +// is your Google Analytics property ID. To request at the account level, +// entity should be for example 'accounts/1234' if "1234" is your Google +// Analytics Account ID. func (r *AccountsService) RunAccessReport(entity string, googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest) *AccountsRunAccessReportCall { c := &AccountsRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.entity = entity @@ -8381,7 +8380,7 @@ type PropertiesCreateCall struct { header_ http.Header } -// Create: Creates an "GA4" property with the specified location and +// Create: Creates a Google Analytics property with the specified location and // attributes. func (r *PropertiesService) Create(googleanalyticsadminv1alphaproperty *GoogleAnalyticsAdminV1alphaProperty) *PropertiesCreateCall { c := &PropertiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -8676,7 +8675,7 @@ type PropertiesDeleteCall struct { // not restored before the expiration time, the Property and all child // resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently // purged. https://support.google.com/analytics/answer/6154772 Returns an error -// if the target is not found, or is not a GA4 Property. +// if the target is not found. // // - name: The name of the Property to soft-delete. Format: // properties/{property_id} Example: "properties/1000". @@ -9078,7 +9077,7 @@ type PropertiesGetCall struct { header_ http.Header } -// Get: Lookup for a single "GA4" Property. +// Get: Lookup for a single GA Property. // // - name: The name of the property to lookup. Format: properties/{property_id} // Example: "properties/1000". @@ -9515,10 +9514,10 @@ type PropertiesListCall struct { header_ http.Header } -// List: Returns child Properties under the specified parent Account. Only -// "GA4" properties will be returned. Properties will be excluded if the caller -// does not have access. Soft-deleted (ie: "trashed") properties are excluded -// by default. Returns an empty list if no relevant properties are found. +// List: Returns child Properties under the specified parent Account. +// Properties will be excluded if the caller does not have access. Soft-deleted +// (ie: "trashed") properties are excluded by default. Returns an empty list if +// no relevant properties are found. func (r *PropertiesService) List() *PropertiesListCall { c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -9996,7 +9995,7 @@ type PropertiesRunAccessReportCall struct { // be requested for a property. Reports may be requested for any property, but // dimensions that aren't related to quota can only be requested on Google // Analytics 360 properties. This method is only available to Administrators. -// These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 +// These data access records include GA UI Reporting, GA UI Explorations, GA // Data API, and other products like Firebase & Admob that can retrieve data // from Google Analytics through a linkage. These records don't include // property configuration changes like adding a stream or changing a property's @@ -10007,8 +10006,9 @@ type PropertiesRunAccessReportCall struct { // or account level. If requested at the account level, Data Access Reports // include all access for all properties under that account. To request at // the property level, entity should be for example 'properties/123' if "123" -// is your GA4 property ID. To request at the account level, entity should be -// for example 'accounts/1234' if "1234" is your GA4 Account ID. +// is your Google Analytics property ID. To request at the account level, +// entity should be for example 'accounts/1234' if "1234" is your Google +// Analytics Account ID. func (r *PropertiesService) RunAccessReport(entity string, googleanalyticsadminv1alpharunaccessreportrequest *GoogleAnalyticsAdminV1alphaRunAccessReportRequest) *PropertiesRunAccessReportCall { c := &PropertiesRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.entity = entity @@ -18581,7 +18581,7 @@ type PropertiesDataStreamsMeasurementProtocolSecretsGetCall struct { header_ http.Header } -// Get: Lookup for a single "GA4" MeasurementProtocolSecret. +// Get: Lookup for a single MeasurementProtocolSecret. // // - name: The name of the measurement protocol secret to lookup. Format: // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{ diff --git a/analyticsadmin/v1beta/analyticsadmin-api.json b/analyticsadmin/v1beta/analyticsadmin-api.json index bb07cc7763d..8a79cdc734a 100644 --- a/analyticsadmin/v1beta/analyticsadmin-api.json +++ b/analyticsadmin/v1beta/analyticsadmin-api.json @@ -220,7 +220,7 @@ ] }, "list": { - "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", + "description": "Returns all accounts accessible by the caller. Note that these accounts might not currently have GA properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", "flatPath": "v1beta/accounts", "httpMethod": "GET", "id": "analyticsadmin.accounts.list", @@ -305,7 +305,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1beta/accounts/{accountsId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.accounts.runAccessReport", @@ -314,7 +314,7 @@ ], "parameters": { "entity": { - "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", + "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your Google Analytics Account ID.", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -394,7 +394,7 @@ ] }, "create": { - "description": "Creates an \"GA4\" property with the specified location and attributes.", + "description": "Creates a Google Analytics property with the specified location and attributes.", "flatPath": "v1beta/properties", "httpMethod": "POST", "id": "analyticsadmin.properties.create", @@ -412,7 +412,7 @@ ] }, "delete": { - "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not a GA4 Property.", + "description": "Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", "flatPath": "v1beta/properties/{propertiesId}", "httpMethod": "DELETE", "id": "analyticsadmin.properties.delete", @@ -437,7 +437,7 @@ ] }, "get": { - "description": "Lookup for a single \"GA4\" Property.", + "description": "Lookup for a single GA Property.", "flatPath": "v1beta/properties/{propertiesId}", "httpMethod": "GET", "id": "analyticsadmin.properties.get", @@ -489,7 +489,7 @@ ] }, "list": { - "description": "Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", + "description": "Returns child Properties under the specified parent Account. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", "flatPath": "v1beta/properties", "httpMethod": "GET", "id": "analyticsadmin.properties.list", @@ -561,7 +561,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", "flatPath": "v1beta/properties/{propertiesId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.properties.runAccessReport", @@ -570,7 +570,7 @@ ], "parameters": { "entity": { - "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your GA4 Account ID.", + "description": "The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account. To request at the property level, entity should be for example 'properties/123' if \"123\" is your Google Analytics property ID. To request at the account level, entity should be for example 'accounts/1234' if \"1234\" is your Google Analytics Account ID.", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -1309,7 +1309,7 @@ ] }, "get": { - "description": "Lookup for a single \"GA4\" MeasurementProtocolSecret.", + "description": "Lookup for a single MeasurementProtocolSecret.", "flatPath": "v1beta/properties/{propertiesId}/dataStreams/{dataStreamsId}/measurementProtocolSecrets/{measurementProtocolSecretsId}", "httpMethod": "GET", "id": "analyticsadmin.properties.dataStreams.measurementProtocolSecrets.get", @@ -1788,7 +1788,7 @@ } } }, - "revision": "20240722", + "revision": "20240823", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1betaAccessBetweenFilter": { @@ -2202,7 +2202,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaAccountSummary": { - "description": "A virtual resource representing an overview of an account and all its child GA4 properties.", + "description": "A virtual resource representing an overview of an account and all its child Google Analytics properties.", "id": "GoogleAnalyticsAdminV1betaAccountSummary", "properties": { "account": { @@ -2748,7 +2748,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaFirebaseLink": { - "description": "A link between a GA4 property and a Firebase project.", + "description": "A link between a Google Analytics property and a Firebase project.", "id": "GoogleAnalyticsAdminV1betaFirebaseLink", "properties": { "createTime": { @@ -2770,7 +2770,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaGoogleAdsLink": { - "description": "A link between a GA4 property and a Google Ads account.", + "description": "A link between a Google Analytics property and a Google Ads account.", "id": "GoogleAnalyticsAdminV1betaGoogleAdsLink", "properties": { "adsPersonalizationEnabled": { @@ -3114,7 +3114,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaProperty": { - "description": "A resource message representing a Google Analytics GA4 property.", + "description": "A resource message representing a Google Analytics property.", "id": "GoogleAnalyticsAdminV1betaProperty", "properties": { "account": { @@ -3228,9 +3228,9 @@ ], "enumDescriptions": [ "Unknown or unspecified property type", - "Ordinary GA4 property", - "GA4 subproperty", - "GA4 rollup property" + "Ordinary Google Analytics property", + "Google Analytics subproperty", + "Google Analytics rollup property" ], "type": "string" }, @@ -3263,7 +3263,7 @@ "type": "object" }, "GoogleAnalyticsAdminV1betaPropertySummary": { - "description": "A virtual resource representing metadata for a GA4 property.", + "description": "A virtual resource representing metadata for a Google Analytics property.", "id": "GoogleAnalyticsAdminV1betaPropertySummary", "properties": { "displayName": { @@ -3288,9 +3288,9 @@ ], "enumDescriptions": [ "Unknown or unspecified property type", - "Ordinary GA4 property", - "GA4 subproperty", - "GA4 rollup property" + "Ordinary Google Analytics property", + "Google Analytics subproperty", + "Google Analytics rollup property" ], "type": "string" } diff --git a/analyticsadmin/v1beta/analyticsadmin-gen.go b/analyticsadmin/v1beta/analyticsadmin-gen.go index 8b99baada7c..337ab6befe3 100644 --- a/analyticsadmin/v1beta/analyticsadmin-gen.go +++ b/analyticsadmin/v1beta/analyticsadmin-gen.go @@ -906,7 +906,7 @@ func (s GoogleAnalyticsAdminV1betaAccount) MarshalJSON() ([]byte, error) { } // GoogleAnalyticsAdminV1betaAccountSummary: A virtual resource representing an -// overview of an account and all its child GA4 properties. +// overview of an account and all its child Google Analytics properties. type GoogleAnalyticsAdminV1betaAccountSummary struct { // Account: Resource name of account referred to by this account summary // Format: accounts/{account_id} Example: "accounts/1000" @@ -1559,8 +1559,8 @@ func (s GoogleAnalyticsAdminV1betaDataStreamWebStreamData) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1betaFirebaseLink: A link between a GA4 property and a -// Firebase project. +// GoogleAnalyticsAdminV1betaFirebaseLink: A link between a Google Analytics +// property and a Firebase project. type GoogleAnalyticsAdminV1betaFirebaseLink struct { // CreateTime: Output only. Time when this FirebaseLink was originally created. CreateTime string `json:"createTime,omitempty"` @@ -1593,8 +1593,8 @@ func (s GoogleAnalyticsAdminV1betaFirebaseLink) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1betaGoogleAdsLink: A link between a GA4 property and a -// Google Ads account. +// GoogleAnalyticsAdminV1betaGoogleAdsLink: A link between a Google Analytics +// property and a Google Ads account. type GoogleAnalyticsAdminV1betaGoogleAdsLink struct { // AdsPersonalizationEnabled: Enable personalized advertising features with // this integration. Automatically publish my Google Analytics audience lists @@ -2135,7 +2135,7 @@ func (s *GoogleAnalyticsAdminV1betaNumericValue) UnmarshalJSON(data []byte) erro } // GoogleAnalyticsAdminV1betaProperty: A resource message representing a Google -// Analytics GA4 property. +// Analytics property. type GoogleAnalyticsAdminV1betaProperty struct { // Account: Immutable. The resource name of the parent account Format: // accounts/{account_id} Example: "accounts/123" @@ -2201,9 +2201,9 @@ type GoogleAnalyticsAdminV1betaProperty struct { // // Possible values: // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + // "PROPERTY_TYPE_ORDINARY" - Ordinary Google Analytics property + // "PROPERTY_TYPE_SUBPROPERTY" - Google Analytics subproperty + // "PROPERTY_TYPE_ROLLUP" - Google Analytics rollup property PropertyType string `json:"propertyType,omitempty"` // ServiceLevel: Output only. The Google Analytics service level that applies // to this property. @@ -2243,7 +2243,7 @@ func (s GoogleAnalyticsAdminV1betaProperty) MarshalJSON() ([]byte, error) { } // GoogleAnalyticsAdminV1betaPropertySummary: A virtual resource representing -// metadata for a GA4 property. +// metadata for a Google Analytics property. type GoogleAnalyticsAdminV1betaPropertySummary struct { // DisplayName: Display name for the property referred to in this property // summary. @@ -2260,9 +2260,9 @@ type GoogleAnalyticsAdminV1betaPropertySummary struct { // // Possible values: // "PROPERTY_TYPE_UNSPECIFIED" - Unknown or unspecified property type - // "PROPERTY_TYPE_ORDINARY" - Ordinary GA4 property - // "PROPERTY_TYPE_SUBPROPERTY" - GA4 subproperty - // "PROPERTY_TYPE_ROLLUP" - GA4 rollup property + // "PROPERTY_TYPE_ORDINARY" - Ordinary Google Analytics property + // "PROPERTY_TYPE_SUBPROPERTY" - Google Analytics subproperty + // "PROPERTY_TYPE_ROLLUP" - Google Analytics rollup property PropertyType string `json:"propertyType,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with empty or @@ -3052,7 +3052,7 @@ type AccountsListCall struct { } // List: Returns all accounts accessible by the caller. Note that these -// accounts might not currently have GA4 properties. Soft-deleted (ie: +// accounts might not currently have GA properties. Soft-deleted (ie: // "trashed") accounts are excluded by default. Returns an empty list if no // relevant accounts are found. func (r *AccountsService) List() *AccountsListCall { @@ -3417,7 +3417,7 @@ type AccountsRunAccessReportCall struct { // be requested for a property. Reports may be requested for any property, but // dimensions that aren't related to quota can only be requested on Google // Analytics 360 properties. This method is only available to Administrators. -// These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 +// These data access records include GA UI Reporting, GA UI Explorations, GA // Data API, and other products like Firebase & Admob that can retrieve data // from Google Analytics through a linkage. These records don't include // property configuration changes like adding a stream or changing a property's @@ -3428,8 +3428,9 @@ type AccountsRunAccessReportCall struct { // or account level. If requested at the account level, Data Access Reports // include all access for all properties under that account. To request at // the property level, entity should be for example 'properties/123' if "123" -// is your GA4 property ID. To request at the account level, entity should be -// for example 'accounts/1234' if "1234" is your GA4 Account ID. +// is your Google Analytics property ID. To request at the account level, +// entity should be for example 'accounts/1234' if "1234" is your Google +// Analytics Account ID. func (r *AccountsService) RunAccessReport(entity string, googleanalyticsadminv1betarunaccessreportrequest *GoogleAnalyticsAdminV1betaRunAccessReportRequest) *AccountsRunAccessReportCall { c := &AccountsRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.entity = entity @@ -3758,7 +3759,7 @@ type PropertiesCreateCall struct { header_ http.Header } -// Create: Creates an "GA4" property with the specified location and +// Create: Creates a Google Analytics property with the specified location and // attributes. func (r *PropertiesService) Create(googleanalyticsadminv1betaproperty *GoogleAnalyticsAdminV1betaProperty) *PropertiesCreateCall { c := &PropertiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -3860,7 +3861,7 @@ type PropertiesDeleteCall struct { // not restored before the expiration time, the Property and all child // resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently // purged. https://support.google.com/analytics/answer/6154772 Returns an error -// if the target is not found, or is not a GA4 Property. +// if the target is not found. // // - name: The name of the Property to soft-delete. Format: // properties/{property_id} Example: "properties/1000". @@ -3958,7 +3959,7 @@ type PropertiesGetCall struct { header_ http.Header } -// Get: Lookup for a single "GA4" Property. +// Get: Lookup for a single GA Property. // // - name: The name of the property to lookup. Format: properties/{property_id} // Example: "properties/1000". @@ -4177,10 +4178,10 @@ type PropertiesListCall struct { header_ http.Header } -// List: Returns child Properties under the specified parent Account. Only -// "GA4" properties will be returned. Properties will be excluded if the caller -// does not have access. Soft-deleted (ie: "trashed") properties are excluded -// by default. Returns an empty list if no relevant properties are found. +// List: Returns child Properties under the specified parent Account. +// Properties will be excluded if the caller does not have access. Soft-deleted +// (ie: "trashed") properties are excluded by default. Returns an empty list if +// no relevant properties are found. func (r *PropertiesService) List() *PropertiesListCall { c := &PropertiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -4465,7 +4466,7 @@ type PropertiesRunAccessReportCall struct { // be requested for a property. Reports may be requested for any property, but // dimensions that aren't related to quota can only be requested on Google // Analytics 360 properties. This method is only available to Administrators. -// These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 +// These data access records include GA UI Reporting, GA UI Explorations, GA // Data API, and other products like Firebase & Admob that can retrieve data // from Google Analytics through a linkage. These records don't include // property configuration changes like adding a stream or changing a property's @@ -4476,8 +4477,9 @@ type PropertiesRunAccessReportCall struct { // or account level. If requested at the account level, Data Access Reports // include all access for all properties under that account. To request at // the property level, entity should be for example 'properties/123' if "123" -// is your GA4 property ID. To request at the account level, entity should be -// for example 'accounts/1234' if "1234" is your GA4 Account ID. +// is your Google Analytics property ID. To request at the account level, +// entity should be for example 'accounts/1234' if "1234" is your Google +// Analytics Account ID. func (r *PropertiesService) RunAccessReport(entity string, googleanalyticsadminv1betarunaccessreportrequest *GoogleAnalyticsAdminV1betaRunAccessReportRequest) *PropertiesRunAccessReportCall { c := &PropertiesRunAccessReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.entity = entity @@ -7179,7 +7181,7 @@ type PropertiesDataStreamsMeasurementProtocolSecretsGetCall struct { header_ http.Header } -// Get: Lookup for a single "GA4" MeasurementProtocolSecret. +// Get: Lookup for a single MeasurementProtocolSecret. // // - name: The name of the measurement protocol secret to lookup. Format: // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{ diff --git a/analyticsdata/v1beta/analyticsdata-api.json b/analyticsdata/v1beta/analyticsdata-api.json index 95d790e218c..95ba3a0fd97 100644 --- a/analyticsdata/v1beta/analyticsdata-api.json +++ b/analyticsdata/v1beta/analyticsdata-api.json @@ -111,7 +111,7 @@ "properties": { "methods": { "batchRunPivotReports": { - "description": "Returns multiple pivot reports in a batch. All reports must be for the same GA4 Property.", + "description": "Returns multiple pivot reports in a batch. All reports must be for the same Google Analytics property.", "flatPath": "v1beta/properties/{propertiesId}:batchRunPivotReports", "httpMethod": "POST", "id": "analyticsdata.properties.batchRunPivotReports", @@ -120,7 +120,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunPivotReportRequest may either be unspecified or consistent with this property. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -140,7 +140,7 @@ ] }, "batchRunReports": { - "description": "Returns multiple reports in a batch. All reports must be for the same GA4 Property.", + "description": "Returns multiple reports in a batch. All reports must be for the same Google Analytics property.", "flatPath": "v1beta/properties/{propertiesId}:batchRunReports", "httpMethod": "POST", "id": "analyticsdata.properties.batchRunReports", @@ -149,7 +149,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). This property must be specified for the batch. The property within RunReportRequest may either be unspecified or consistent with this property. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -178,7 +178,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). `property` should be the same value as in your `runReport` request. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -198,7 +198,7 @@ ] }, "getMetadata": { - "description": "Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", + "description": "Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name `levels_unlocked` is registered to a property, the Metadata response will contain `customEvent:levels_unlocked`. Universal metadata are dimensions and metrics applicable to any property such as `country` and `totalUsers`.", "flatPath": "v1beta/properties/{propertiesId}/metadata", "httpMethod": "GET", "id": "analyticsdata.properties.getMetadata", @@ -207,7 +207,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics GA4 Property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.", + "description": "Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics property identifier. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234/metadata Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.", "location": "path", "pattern": "^properties/[^/]+/metadata$", "required": true, @@ -233,7 +233,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -262,7 +262,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -291,7 +291,7 @@ ], "parameters": { "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -440,7 +440,7 @@ } } }, - "revision": "20240731", + "revision": "20240825", "rootUrl": "https://analyticsdata.googleapis.com/", "schemas": { "ActiveMetricRestriction": { @@ -1769,7 +1769,7 @@ "type": "array" }, "keepEmptyRows": { - "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics (GA4) property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.", + "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.", "type": "boolean" }, "metricFilter": { @@ -1791,11 +1791,11 @@ "type": "array" }, "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", "type": "string" }, "returnPropertyQuota": { - "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "description": "Toggles whether to return the current state of this Google Analytics property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", "type": "boolean" } }, @@ -1843,7 +1843,7 @@ }, "propertyQuota": { "$ref": "PropertyQuota", - "description": "This Analytics Property's quota state including this request." + "description": "This Google Analytics property's quota state including this request." }, "rows": { "description": "Rows of dimension value combinations and metric values in the report.", @@ -1922,7 +1922,7 @@ "type": "array" }, "returnPropertyQuota": { - "description": "Toggles whether to return the current state of this Analytics Property's Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "description": "Toggles whether to return the current state of this Google Analytics property's Realtime quota. Quota is returned in [PropertyQuota](#PropertyQuota).", "type": "boolean" } }, @@ -1966,7 +1966,7 @@ }, "propertyQuota": { "$ref": "PropertyQuota", - "description": "This Analytics Property's Realtime quota state including this request." + "description": "This Google Analytics property's Realtime quota state including this request." }, "rowCount": { "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response and the `limit` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows.", @@ -2028,7 +2028,7 @@ "type": "array" }, "keepEmptyRows": { - "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics (GA4) property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.", + "description": "If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter. Regardless of this `keep_empty_rows` setting, only data recorded by the Google Analytics property can be displayed in a report. For example if a property never logs a `purchase` event, then a query for the `eventName` dimension and `eventCount` metric will not have a row eventName: \"purchase\" and eventCount: 0.", "type": "boolean" }, "limit": { @@ -2081,11 +2081,11 @@ "type": "array" }, "property": { - "description": "A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", + "description": "A Google Analytics property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). Within a batch request, this property should either be unspecified or consistent with the batch-level property. Example: properties/1234", "type": "string" }, "returnPropertyQuota": { - "description": "Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", + "description": "Toggles whether to return the current state of this Google Analytics property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).", "type": "boolean" } }, @@ -2133,7 +2133,7 @@ }, "propertyQuota": { "$ref": "PropertyQuota", - "description": "This Analytics Property's quota state including this request." + "description": "This Google Analytics property's quota state including this request." }, "rowCount": { "description": "The total number of rows in the query result. `rowCount` is independent of the number of rows returned in the response, the `limit` request parameter, and the `offset` request parameter. For example if a query returns 175 rows and includes `limit` of 50 in the API request, the response will contain `rowCount` of 175 but only 50 rows. To learn more about this pagination parameter, see [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination).", diff --git a/analyticsdata/v1beta/analyticsdata-gen.go b/analyticsdata/v1beta/analyticsdata-gen.go index 367681a8494..b2f303419f8 100644 --- a/analyticsdata/v1beta/analyticsdata-gen.go +++ b/analyticsdata/v1beta/analyticsdata-gen.go @@ -2095,7 +2095,7 @@ type RunPivotReportRequest struct { // KeepEmptyRows: If false or unspecified, each row with all metrics equal to 0 // will not be returned. If true, these rows will be returned if they are not // separately removed by a filter. Regardless of this `keep_empty_rows` - // setting, only data recorded by the Google Analytics (GA4) property can be + // setting, only data recorded by the Google Analytics property can be // displayed in a report. For example if a property never logs a `purchase` // event, then a query for the `eventName` dimension and `eventCount` metric // will not have a row eventName: "purchase" and eventCount: 0. @@ -2113,15 +2113,15 @@ type RunPivotReportRequest struct { // subset of dimension names defined in Dimensions. No two pivots can share a // dimension. A dimension is only visible if it appears in a pivot. Pivots []*Pivot `json:"pivots,omitempty"` - // Property: A Google Analytics GA4 property identifier whose events are - // tracked. Specified in the URL path and not the body. To learn more, see - // where to find your Property ID + // Property: A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see where to find + // your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Within a batch request, this property should either be unspecified or // consistent with the batch-level property. Example: properties/1234 Property string `json:"property,omitempty"` // ReturnPropertyQuota: Toggles whether to return the current state of this - // Analytics Property's quota. Quota is returned in PropertyQuota + // Google Analytics property's quota. Quota is returned in PropertyQuota // (#PropertyQuota). ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"` // ForceSendFields is a list of field names (e.g. "CohortSpec") to @@ -2173,7 +2173,8 @@ type RunPivotReportResponse struct { // "dimensionValues": [{ "value": "session_start" }] }, { "dimensionValues": [{ // "value": "scroll" }] }] }] PivotHeaders []*PivotHeader `json:"pivotHeaders,omitempty"` - // PropertyQuota: This Analytics Property's quota state including this request. + // PropertyQuota: This Google Analytics property's quota state including this + // request. PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"` // Rows: Rows of dimension value combinations and metric values in the report. Rows []*Row `json:"rows,omitempty"` @@ -2239,8 +2240,8 @@ type RunRealtimeReportRequest struct { // OrderBys: Specifies how rows are ordered in the response. OrderBys []*OrderBy `json:"orderBys,omitempty"` // ReturnPropertyQuota: Toggles whether to return the current state of this - // Analytics Property's Realtime quota. Quota is returned in PropertyQuota - // (#PropertyQuota). + // Google Analytics property's Realtime quota. Quota is returned in + // PropertyQuota (#PropertyQuota). ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"` // ForceSendFields is a list of field names (e.g. "DimensionFilter") to // unconditionally include in API requests. By default, fields with empty or @@ -2278,8 +2279,8 @@ type RunRealtimeReportResponse struct { MetricHeaders []*MetricHeader `json:"metricHeaders,omitempty"` // Minimums: If requested, the minimum values of metrics. Minimums []*Row `json:"minimums,omitempty"` - // PropertyQuota: This Analytics Property's Realtime quota state including this - // request. + // PropertyQuota: This Google Analytics property's Realtime quota state + // including this request. PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"` // RowCount: The total number of rows in the query result. `rowCount` is // independent of the number of rows returned in the response and the `limit` @@ -2341,7 +2342,7 @@ type RunReportRequest struct { // KeepEmptyRows: If false or unspecified, each row with all metrics equal to 0 // will not be returned. If true, these rows will be returned if they are not // separately removed by a filter. Regardless of this `keep_empty_rows` - // setting, only data recorded by the Google Analytics (GA4) property can be + // setting, only data recorded by the Google Analytics property can be // displayed in a report. For example if a property never logs a `purchase` // event, then a query for the `eventName` dimension and `eventCount` metric // will not have a row eventName: "purchase" and eventCount: 0. @@ -2386,15 +2387,15 @@ type RunReportRequest struct { // both comparisons and multiple date ranges will have order bys applied on the // comparisons. OrderBys []*OrderBy `json:"orderBys,omitempty"` - // Property: A Google Analytics GA4 property identifier whose events are - // tracked. Specified in the URL path and not the body. To learn more, see - // where to find your Property ID + // Property: A Google Analytics property identifier whose events are tracked. + // Specified in the URL path and not the body. To learn more, see where to find + // your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Within a batch request, this property should either be unspecified or // consistent with the batch-level property. Example: properties/1234 Property string `json:"property,omitempty"` // ReturnPropertyQuota: Toggles whether to return the current state of this - // Analytics Property's quota. Quota is returned in PropertyQuota + // Google Analytics property's quota. Quota is returned in PropertyQuota // (#PropertyQuota). ReturnPropertyQuota bool `json:"returnPropertyQuota,omitempty"` // ForceSendFields is a list of field names (e.g. "CohortSpec") to @@ -2434,7 +2435,8 @@ type RunReportResponse struct { MetricHeaders []*MetricHeader `json:"metricHeaders,omitempty"` // Minimums: If requested, the minimum values of metrics. Minimums []*Row `json:"minimums,omitempty"` - // PropertyQuota: This Analytics Property's quota state including this request. + // PropertyQuota: This Google Analytics property's quota state including this + // request. PropertyQuota *PropertyQuota `json:"propertyQuota,omitempty"` // RowCount: The total number of rows in the query result. `rowCount` is // independent of the number of rows returned in the response, the `limit` @@ -2684,11 +2686,11 @@ type PropertiesBatchRunPivotReportsCall struct { } // BatchRunPivotReports: Returns multiple pivot reports in a batch. All reports -// must be for the same GA4 Property. +// must be for the same Google Analytics property. // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // This property must be specified for the batch. The property within // RunPivotReportRequest may either be unspecified or consistent with this @@ -2793,11 +2795,11 @@ type PropertiesBatchRunReportsCall struct { } // BatchRunReports: Returns multiple reports in a batch. All reports must be -// for the same GA4 Property. +// for the same Google Analytics property. // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // This property must be specified for the batch. The property within // RunReportRequest may either be unspecified or consistent with this @@ -2910,8 +2912,8 @@ type PropertiesCheckCompatibilityCall struct { // Realtime and Core reports have different compatibility rules. This method // checks compatibility for Core reports. // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. To learn more, see where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// To learn more, see where to find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // `property` should be the same value as in your `runReport` request. // Example: properties/1234. @@ -3016,17 +3018,16 @@ type PropertiesGetMetadataCall struct { // GetMetadata: Returns metadata for dimensions and metrics available in // reporting methods. Used to explore the dimensions and metrics. In this -// method, a Google Analytics GA4 Property Identifier is specified in the -// request, and the metadata response includes Custom dimensions and metrics as -// well as Universal metadata. For example if a custom metric with parameter -// name `levels_unlocked` is registered to a property, the Metadata response -// will contain `customEvent:levels_unlocked`. Universal metadata are -// dimensions and metrics applicable to any property such as `country` and -// `totalUsers`. +// method, a Google Analytics property identifier is specified in the request, +// and the metadata response includes Custom dimensions and metrics as well as +// Universal metadata. For example if a custom metric with parameter name +// `levels_unlocked` is registered to a property, the Metadata response will +// contain `customEvent:levels_unlocked`. Universal metadata are dimensions and +// metrics applicable to any property such as `country` and `totalUsers`. // // - name: The resource name of the metadata to retrieve. This name field is // specified in the URL path and not URL parameters. Property is a numeric -// Google Analytics GA4 Property identifier. To learn more, see where to find +// Google Analytics property identifier. To learn more, see where to find // your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Example: properties/1234/metadata Set the Property ID to 0 for dimensions @@ -3142,9 +3143,9 @@ type PropertiesRunPivotReportCall struct { // included in a pivot. Multiple pivots can be specified to further dissect // your data. // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Within a batch request, this property should either be unspecified or // consistent with the batch-level property. Example: properties/1234. @@ -3256,9 +3257,9 @@ type PropertiesRunRealtimeReportCall struct { // Realtime Report // (https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-basics). // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Example: properties/1234. func (r *PropertiesService) RunRealtimeReport(propertyid string, runrealtimereportrequest *RunRealtimeReportRequest) *PropertiesRunRealtimeReportCall { @@ -3370,9 +3371,9 @@ type PropertiesRunReportCall struct { // understanding responses, see Creating a Report // (https://developers.google.com/analytics/devguides/reporting/data/v1/basics). // -// - property: A Google Analytics GA4 property identifier whose events are -// tracked. Specified in the URL path and not the body. To learn more, see -// where to find your Property ID +// - property: A Google Analytics property identifier whose events are tracked. +// Specified in the URL path and not the body. To learn more, see where to +// find your Property ID // (https://developers.google.com/analytics/devguides/reporting/data/v1/property-id). // Within a batch request, this property should either be unspecified or // consistent with the batch-level property. Example: properties/1234. diff --git a/androidenterprise/v1/androidenterprise-api.json b/androidenterprise/v1/androidenterprise-api.json index 813ce9dd5dd..078548af62a 100644 --- a/androidenterprise/v1/androidenterprise-api.json +++ b/androidenterprise/v1/androidenterprise-api.json @@ -2654,7 +2654,7 @@ } } }, - "revision": "20240703", + "revision": "20240820", "rootUrl": "https://androidenterprise.googleapis.com/", "schemas": { "Administrator": { @@ -3374,7 +3374,7 @@ "type": "object" }, "Entitlement": { - "description": " *Deprecated:* New integrations cannot use this method and can refer to our new recommendations. The presence of an Entitlements resource indicates that a user has the right to use a particular app. Entitlements are user specific, not device specific. This allows a user with an entitlement to an app to install the app on all their devices. It's also possible for a user to hold an entitlement to an app without installing the app on any device. The API can be used to create an entitlement. As an option, you can also use the API to trigger the installation of an app on all a user's managed devices at the same time the entitlement is created. If the app is free, creating the entitlement also creates a group license for that app. For paid apps, creating the entitlement consumes one license, and that license remains consumed until the entitlement is removed. If the enterprise hasn't purchased enough licenses, then no entitlement is created and the installation fails. An entitlement is also not created for an app if the app requires permissions that the enterprise hasn't accepted. If an entitlement is deleted, the app may be uninstalled from a user's device. As a best practice, uninstall the app by calling Installs.delete() before deleting the entitlement. Entitlements for apps that a user pays for on an unmanaged profile have \"userPurchase\" as the entitlement reason. These entitlements cannot be removed via the API.", + "description": " *Deprecated:* New integrations cannot use this method and can refer to our new recommendations. ", "id": "Entitlement", "properties": { "productId": { @@ -3447,7 +3447,7 @@ "type": "object" }, "GroupLicense": { - "description": " *Deprecated:* New integrations cannot use this method and can refer to our new recommendations. Group license objects allow you to keep track of licenses (called entitlements) for both free and paid apps. For a free app, a group license is created when an enterprise admin first approves the product in Google Play or when the first entitlement for the product is created for a user via the API. For a paid app, a group license object is only created when an enterprise admin purchases the product in Google Play for the first time. Use the API to query group licenses. A Grouplicenses resource includes the total number of licenses purchased (paid apps only) and the total number of licenses currently in use. In other words, the total number of Entitlements that exist for the product. Only one group license object is created per product and group license objects are never deleted. If a product is unapproved, its group license remains. This allows enterprise admins to keep track of any remaining entitlements for the product.", + "description": " *Deprecated:* New integrations cannot use this method and can refer to our new recommendations ", "id": "GroupLicense", "properties": { "acquisitionKind": { @@ -3678,7 +3678,7 @@ "type": "object" }, "ManagedConfiguration": { - "description": " *Deprecated:* New integrations cannot use this method and can refer to our new recommendations. A managed configuration resource contains the set of managed properties defined by the app developer in the app's managed configurations schema, as well as any configuration variables defined for the user.", + "description": " *Deprecated:* New integrations cannot use this method and can refer to our new recommendations ", "id": "ManagedConfiguration", "properties": { "configurationVariables": { @@ -4582,7 +4582,7 @@ "type": "object" }, "ServiceAccountKey": { - "description": " *Deprecated:* New integrations cannot use this method and can refer to our new recommendations. Credentials that can be used to authenticate as a service account.", + "description": " *Deprecated:* New integrations cannot use this method and can refer to our new recommendations ", "id": "ServiceAccountKey", "properties": { "data": { diff --git a/androidenterprise/v1/androidenterprise-gen.go b/androidenterprise/v1/androidenterprise-gen.go index f48e4951fc3..e8d1effa39a 100644 --- a/androidenterprise/v1/androidenterprise-gen.go +++ b/androidenterprise/v1/androidenterprise-gen.go @@ -1337,25 +1337,7 @@ func (s EnterprisesSendTestPushNotificationResponse) MarshalJSON() ([]byte, erro } // Entitlement: *Deprecated:* New integrations cannot use this method and can -// refer to our new recommendations. The presence of an Entitlements resource -// indicates that a user has the right to use a particular app. Entitlements -// are user specific, not device specific. This allows a user with an -// entitlement to an app to install the app on all their devices. It's also -// possible for a user to hold an entitlement to an app without installing the -// app on any device. The API can be used to create an entitlement. As an -// option, you can also use the API to trigger the installation of an app on -// all a user's managed devices at the same time the entitlement is created. If -// the app is free, creating the entitlement also creates a group license for -// that app. For paid apps, creating the entitlement consumes one license, and -// that license remains consumed until the entitlement is removed. If the -// enterprise hasn't purchased enough licenses, then no entitlement is created -// and the installation fails. An entitlement is also not created for an app if -// the app requires permissions that the enterprise hasn't accepted. If an -// entitlement is deleted, the app may be uninstalled from a user's device. As -// a best practice, uninstall the app by calling Installs.delete() before -// deleting the entitlement. Entitlements for apps that a user pays for on an -// unmanaged profile have "userPurchase" as the entitlement reason. These -// entitlements cannot be removed via the API. +// refer to our new recommendations. type Entitlement struct { // ProductId: The ID of the product that the entitlement is for. For example, // "app:com.google.android.gm". @@ -1452,20 +1434,7 @@ func (s GoogleAuthenticationSettings) MarshalJSON() ([]byte, error) { } // GroupLicense: *Deprecated:* New integrations cannot use this method and can -// refer to our new recommendations. Group license objects allow you to keep -// track of licenses (called entitlements) for both free and paid apps. For a -// free app, a group license is created when an enterprise admin first approves -// the product in Google Play or when the first entitlement for the product is -// created for a user via the API. For a paid app, a group license object is -// only created when an enterprise admin purchases the product in Google Play -// for the first time. Use the API to query group licenses. A Grouplicenses -// resource includes the total number of licenses purchased (paid apps only) -// and the total number of licenses currently in use. In other words, the total -// number of Entitlements that exist for the product. Only one group license -// object is created per product and group license objects are never deleted. -// If a product is unapproved, its group license remains. This allows -// enterprise admins to keep track of any remaining entitlements for the -// product. +// refer to our new recommendations type GroupLicense struct { // AcquisitionKind: How this group license was acquired. "bulkPurchase" means // that this Grouplicenses resource was created because the enterprise @@ -1801,10 +1770,7 @@ func (s MaintenanceWindow) MarshalJSON() ([]byte, error) { } // ManagedConfiguration: *Deprecated:* New integrations cannot use this method -// and can refer to our new recommendations. A managed configuration resource -// contains the set of managed properties defined by the app developer in the -// app's managed configurations schema, as well as any configuration variables -// defined for the user. +// and can refer to our new recommendations type ManagedConfiguration struct { // ConfigurationVariables: Contains the ID of the managed configuration profile // and the set of configuration variables (if any) defined for the user. @@ -2872,8 +2838,7 @@ func (s ServiceAccount) MarshalJSON() ([]byte, error) { } // ServiceAccountKey: *Deprecated:* New integrations cannot use this method -// and can refer to our new recommendations. Credentials that can be used to -// authenticate as a service account. +// and can refer to our new recommendations type ServiceAccountKey struct { // Data: The body of the private key credentials file, in string format. This // is only populated when the ServiceAccountKey is created, and is not stored diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 2678425e70e..e936206bcff 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1168,7 +1168,7 @@ } } }, - "revision": "20240808", + "revision": "20240821", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -6123,6 +6123,11 @@ "description": "The carrier name associated with this SIM card.", "type": "string" }, + "iccId": { + "description": "Output only. The ICCID associated with this SIM card.", + "readOnly": true, + "type": "string" + }, "phoneNumber": { "description": "The phone number associated with this SIM card.", "type": "string" diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 9b27f241b32..a52240c5e25 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -6134,6 +6134,8 @@ func (s SystemUpdateInfo) MarshalJSON() ([]byte, error) { type TelephonyInfo struct { // CarrierName: The carrier name associated with this SIM card. CarrierName string `json:"carrierName,omitempty"` + // IccId: Output only. The ICCID associated with this SIM card. + IccId string `json:"iccId,omitempty"` // PhoneNumber: The phone number associated with this SIM card. PhoneNumber string `json:"phoneNumber,omitempty"` // ForceSendFields is a list of field names (e.g. "CarrierName") to diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 84125b463e4..54c250bd0fc 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -741,7 +741,8 @@ ], "parameters": { "ackBundleInstallationWarning": { - "description": "Must be set to true if the app bundle installation may trigger a warning on user devices (for example, if installation size may be over a threshold, typically 100 MB).", + "deprecated": true, + "description": "Deprecated. The installation warning has been removed, it's not necessary to set this field anymore.", "location": "query", "type": "boolean" }, @@ -4731,7 +4732,7 @@ } } }, - "revision": "20240806", + "revision": "20240821", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -6226,6 +6227,17 @@ }, "type": "object" }, + "ExternalOfferInitialAcquisitionDetails": { + "description": "Details about the first time a user/device completed a transaction using external offers.", + "id": "ExternalOfferInitialAcquisitionDetails", + "properties": { + "externalTransactionId": { + "description": "Required. The external transaction id of the first completed purchase made by the user.", + "type": "string" + } + }, + "type": "object" + }, "ExternalSubscription": { "description": "Details of an external subscription.", "id": "ExternalSubscription", @@ -6267,6 +6279,10 @@ "description": "Output only. The current tax amount. This represents the current tax amount including any refunds that may have been applied to this transaction.", "readOnly": true }, + "externalOfferInitialAcquisitionDetails": { + "$ref": "ExternalOfferInitialAcquisitionDetails", + "description": "Optional. Details about the first time a user/device completed a transaction using external offers. Not required for transactions made using user choice billing or alternative billing only." + }, "externalTransactionId": { "description": "Output only. The id of this transaction. All transaction ids under the same package name must be unique. Set when creating the external transaction.", "readOnly": true, @@ -8249,6 +8265,10 @@ "description": "Revocation context of the purchases.subscriptionsv2.revoke API.", "id": "RevocationContext", "properties": { + "fullRefund": { + "$ref": "RevocationContextFullRefund", + "description": "Optional. Used when users should be refunded the full amount of the latest order of the subscription." + }, "proratedRefund": { "$ref": "RevocationContextProratedRefund", "description": "Optional. Used when users should be refunded a prorated amount they paid for their subscription based on the amount of time remaining in a subscription." @@ -8256,6 +8276,12 @@ }, "type": "object" }, + "RevocationContextFullRefund": { + "description": "Used to determine if the refund type in the RevocationContext is a full refund.", + "id": "RevocationContextFullRefund", + "properties": {}, + "type": "object" + }, "RevocationContextProratedRefund": { "description": "Used to determine if the refund type in the RevocationContext is a prorated refund.", "id": "RevocationContextProratedRefund", diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 4fce2fefc03..7cc7e0cc1b2 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -2652,6 +2652,30 @@ func (s ExternalAccountIdentifiers) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExternalOfferInitialAcquisitionDetails: Details about the first time a +// user/device completed a transaction using external offers. +type ExternalOfferInitialAcquisitionDetails struct { + // ExternalTransactionId: Required. The external transaction id of the first + // completed purchase made by the user. + ExternalTransactionId string `json:"externalTransactionId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExternalTransactionId") 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. "ExternalTransactionId") 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 ExternalOfferInitialAcquisitionDetails) MarshalJSON() ([]byte, error) { + type NoMethod ExternalOfferInitialAcquisitionDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ExternalSubscription: Details of an external subscription. type ExternalSubscription struct { // SubscriptionType: Required. The type of the external subscription. @@ -2693,6 +2717,11 @@ type ExternalTransaction struct { // current tax amount including any refunds that may have been applied to this // transaction. CurrentTaxAmount *Price `json:"currentTaxAmount,omitempty"` + // ExternalOfferInitialAcquisitionDetails: Optional. Details about the first + // time a user/device completed a transaction using external offers. Not + // required for transactions made using user choice billing or alternative + // billing only. + ExternalOfferInitialAcquisitionDetails *ExternalOfferInitialAcquisitionDetails `json:"externalOfferInitialAcquisitionDetails,omitempty"` // ExternalTransactionId: Output only. The id of this transaction. All // transaction ids under the same package name must be unique. Set when // creating the external transaction. @@ -5351,19 +5380,22 @@ func (s ReviewsReplyResponse) MarshalJSON() ([]byte, error) { // RevocationContext: Revocation context of the // purchases.subscriptionsv2.revoke API. type RevocationContext struct { + // FullRefund: Optional. Used when users should be refunded the full amount of + // the latest order of the subscription. + FullRefund *RevocationContextFullRefund `json:"fullRefund,omitempty"` // ProratedRefund: Optional. Used when users should be refunded a prorated // amount they paid for their subscription based on the amount of time // remaining in a subscription. ProratedRefund *RevocationContextProratedRefund `json:"proratedRefund,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProratedRefund") to + // ForceSendFields is a list of field names (e.g. "FullRefund") 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. "ProratedRefund") 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. "FullRefund") 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:"-"` } @@ -5373,6 +5405,11 @@ func (s RevocationContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RevocationContextFullRefund: Used to determine if the refund type in the +// RevocationContext is a full refund. +type RevocationContextFullRefund struct { +} + // RevocationContextProratedRefund: Used to determine if the refund type in the // RevocationContext is a prorated refund. type RevocationContextProratedRefund struct { @@ -9591,9 +9628,8 @@ func (r *EditsBundlesService) Upload(packageName string, editId string) *EditsBu } // AckBundleInstallationWarning sets the optional parameter -// "ackBundleInstallationWarning": Must be set to true if the app bundle -// installation may trigger a warning on user devices (for example, if -// installation size may be over a threshold, typically 100 MB). +// "ackBundleInstallationWarning": Deprecated. The installation warning has +// been removed, it's not necessary to set this field anymore. func (c *EditsBundlesUploadCall) AckBundleInstallationWarning(ackBundleInstallationWarning bool) *EditsBundlesUploadCall { c.urlParams_.Set("ackBundleInstallationWarning", fmt.Sprint(ackBundleInstallationWarning)) return c diff --git a/apikeys/v2/apikeys-api.json b/apikeys/v2/apikeys-api.json index 15b2ec052dd..5de86b47d30 100644 --- a/apikeys/v2/apikeys-api.json +++ b/apikeys/v2/apikeys-api.json @@ -396,7 +396,7 @@ } } }, - "revision": "20230806", + "revision": "20240811", "rootUrl": "https://apikeys.googleapis.com/", "schemas": { "Operation": { @@ -502,7 +502,7 @@ "type": "array" }, "service": { - "description": "The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use [`gcloud services list`](/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.", + "description": "The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use [`gcloud services list`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.", "type": "string" } }, diff --git a/apikeys/v2/apikeys-gen.go b/apikeys/v2/apikeys-gen.go index a81df1dc0e4..3ce249ebc2f 100644 --- a/apikeys/v2/apikeys-gen.go +++ b/apikeys/v2/apikeys-gen.go @@ -363,8 +363,8 @@ type V2ApiTarget struct { Methods []string `json:"methods,omitempty"` // Service: The service for this restriction. It should be the canonical // service name, for example: `translate.googleapis.com`. You can use `gcloud - // services list` (/sdk/gcloud/reference/services/list) to get a list of - // services that are enabled in the project. + // services list` (https://cloud.google.com/sdk/gcloud/reference/services/list) + // to get a list of services that are enabled in the project. Service string `json:"service,omitempty"` // ForceSendFields is a list of field names (e.g. "Methods") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index 360e8598038..d1798217eb0 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -678,6 +678,16 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` Examples of using a filter: To filter the results of your request to repositories with the name \"my-repo\" in project my-project in the us-central region, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-*\"` * `name=\"projects/my-project/locations/us-central1/repositories/*repo\"` * `name=\"projects/my-project/locations/us-central1/repositories/*repo*\"`", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The field to order the results by.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of repositories to return. Maximum page size is 1,000.", "format": "int32", @@ -1034,7 +1044,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `owner` An example of using a filter: * `name=\"projects/p1/locations/us-central1/repositories/repo1/files/a/b/*\"` --\u003e Files with an ID starting with \"a/b/\". * `owner=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Files owned by the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `owner` * `annotations` Examples of using a filter: To filter the results of your request to files with the name \"my_file.txt\" in project my-project in the us-central region, in repository my-repo, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/my-*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/*file*\"` To filter the results of your request to files owned by the version `1.0` in package `pkg1`, append the following filter expression to your request: * `owner=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0\"` To filter the results of your request to files with the annotation key-value pair [`external_link`:`external_link_value`], append the following filter expression to your request: * \"annotations.external_link:external_link_value\" To filter just for a specific annotation key `external_link`, append the following filter expression to your request: * \"annotations.external_link\" If the annotation key or value contains special characters, you can escape them by surrounding the value with backticks. For example, to filter the results of your request to files with the annotation key-value pair [`external.link`:`https://example.com/my-file`], append the following filter expression to your request: * \"annotations.`external.link`:`https://example.com/my-file`\" You can also filter with annotations with a wildcard to match any number of characters before or after the value: * \"annotations.*_link:`*example.com*`\"", "location": "query", "type": "string" }, @@ -1477,6 +1487,16 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `annotations` Examples of using a filter: To filter the results of your request to packages with the name \"my-package\" in project my-project in the us-central region, in repository my-repo, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/*package\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/*pack*\"` To filter the results of your request to packages with the annotation key-value pair [`external_link`:`external_link_value`], append the following filter expression to your request\": * \"annotations.external_link:external_link_value\" To filter the results just for a specific annotation key `external_link`, append the following filter expression to your request: * \"annotations.external_link\" If the annotation key or value contains special characters, you can escape them by surrounding the value with backticks. For example, to filter the results of your request to packages with the annotation key-value pair [`external.link`:`https://example.com/my-package`], append the following filter expression to your request: * \"annotations.`external.link`:`https://example.com/my-package`\" You can also filter with annotations with a wildcard to match any number of characters before or after the value: * \"annotations.*_link:`*example.com*`\"", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. The field to order the results by.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of packages to return. Maximum page size is 1,000.", "format": "int32", @@ -1637,7 +1657,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `version` Examples of using a filter: To filter the results of your request to tags with the name \"my-tag\" in package \"my-package\" in repository \"my-repo\" in project \"my-project\" in the us-central region, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*\"` To filter the results of your request to tags applied to the version `1.0` in package `my-package`, append the following filter expression to your request: * `version=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0\"`", "location": "query", "type": "string" }, @@ -1815,6 +1835,11 @@ "parent" ], "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `annotations` Examples of using a filter: To filter the results of your request to versions with the name \"my-version\" in project my-project in the us-central region, in repository my-repo, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my-version\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/my*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/*version*\"` To filter the results of your request to versions with the annotation key-value pair [`external_link`:`external_link_value`], append the following filter expression to your request: * \"annotations.external_link:external_link_value\" To filter just for a specific annotation key `external_link`, append the following filter expression to your request: * \"annotations.external_link\" If the annotation key or value contains special characters, you can escape them by surrounding the value with backticks. For example, to filter the results of your request to versions with the annotation key-value pair [`external.link`:`https://example.com/my-version`], append the following filter expression to your request: * \"annotations.`external.link`:`https://example.com/my-version`\" You can also filter with annotations with a wildcard to match any number of characters before or after the value: * \"annotations.*_link:`*example.com*`\"", + "location": "query", + "type": "string" + }, "orderBy": { "description": "Optional. The field to order the results by.", "location": "query", @@ -2013,7 +2038,7 @@ } } }, - "revision": "20240724", + "revision": "20240826", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index aa257792729..b5badd0865f 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -4493,6 +4493,30 @@ func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLoca return c } +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. Filter rules are case insensitive. The fields +// eligible for filtering are: * `name` Examples of using a filter: To filter +// the results of your request to repositories with the name "my-repo" in +// project my-project in the us-central region, append the following filter +// expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo` You +// can also use wildcards to match any number of characters before or after the +// value: * +// `name="projects/my-project/locations/us-central1/repositories/my-*" * +// `name="projects/my-project/locations/us-central1/repositories/*repo" * +// `name="projects/my-project/locations/us-central1/repositories/*repo*" +func (c *ProjectsLocationsRepositoriesListCall) Filter(filter string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The field to order the +// results by. +func (c *ProjectsLocationsRepositoriesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // repositories to return. Maximum page size is 1,000. func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall { @@ -5824,11 +5848,36 @@ func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *Project // Filter sets the optional parameter "filter": An expression for filtering the // results of the request. Filter rules are case insensitive. The fields -// eligible for filtering are: * `name` * `owner` An example of using a filter: -// * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*" -// --> Files with an ID starting with "a/b/". * -// `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ve -// rsions/1.0" --> Files owned by the version `1.0` in package `pkg1`. +// eligible for filtering are: * `name` * `owner` * `annotations` Examples of +// using a filter: To filter the results of your request to files with the name +// "my_file.txt" in project my-project in the us-central region, in repository +// my-repo, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/m +// y-file.txt" You can also use wildcards to match any number of characters +// before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/m +// y-*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/* +// file.txt" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/* +// file*" To filter the results of your request to files owned by the version +// `1.0` in package `pkg1`, append the following filter expression to your +// request: * +// `owner="projects/my-project/locations/us-central1/repositories/my-repo/packag +// es/my-package/versions/1.0" To filter the results of your request to files +// with the annotation key-value pair [`external_link`:`external_link_value`], +// append the following filter expression to your request: * +// "annotations.external_link:external_link_value" To filter just for a +// specific annotation key `external_link`, append the following filter +// expression to your request: * "annotations.external_link" If the annotation +// key or value contains special characters, you can escape them by surrounding +// the value with backticks. For example, to filter the results of your request +// to files with the annotation key-value pair +// [`external.link`:`https://example.com/my-file`], append the following filter +// expression to your request: * +// "annotations.`external.link`:`https://example.com/my-file" You can also +// filter with annotations with a wildcard to match any number of characters +// before or after the value: * "annotations.*_link:`*example.com*" func (c *ProjectsLocationsRepositoriesFilesListCall) Filter(filter string) *ProjectsLocationsRepositoriesFilesListCall { c.urlParams_.Set("filter", filter) return c @@ -7484,6 +7533,46 @@ func (r *ProjectsLocationsRepositoriesPackagesService) List(parent string) *Proj return c } +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. Filter rules are case insensitive. The fields +// eligible for filtering are: * `name` * `annotations` Examples of using a +// filter: To filter the results of your request to packages with the name +// "my-package" in project my-project in the us-central region, in repository +// my-repo, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package" You can also use wildcards to match any number of characters +// before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/*package" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/*pack*" To filter the results of your request to packages with the +// annotation key-value pair [`external_link`:`external_link_value`], append +// the following filter expression to your request": * +// "annotations.external_link:external_link_value" To filter the results just +// for a specific annotation key `external_link`, append the following filter +// expression to your request: * "annotations.external_link" If the annotation +// key or value contains special characters, you can escape them by surrounding +// the value with backticks. For example, to filter the results of your request +// to packages with the annotation key-value pair +// [`external.link`:`https://example.com/my-package`], append the following +// filter expression to your request: * +// "annotations.`external.link`:`https://example.com/my-package" You can also +// filter with annotations with a wildcard to match any number of characters +// before or after the value: * "annotations.*_link:`*example.com*" +func (c *ProjectsLocationsRepositoriesPackagesListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The field to order the +// results by. +func (c *ProjectsLocationsRepositoriesPackagesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // packages to return. Maximum page size is 1,000. func (c *ProjectsLocationsRepositoriesPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesListCall { @@ -8052,10 +8141,23 @@ func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) * // Filter sets the optional parameter "filter": An expression for filtering the // results of the request. Filter rules are case insensitive. The fields -// eligible for filtering are: * `version` An example of using a filter: * -// `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ -// versions/1.0" --> Tags that are applied to the version `1.0` in package -// `pkg1`. +// eligible for filtering are: * `name` * `version` Examples of using a filter: +// To filter the results of your request to tags with the name "my-tag" in +// package "my-package" in repository "my-repo" in project "my-project" in the +// us-central region, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/my-tag" You can also use wildcards to match any number of +// characters before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/my*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/*tag" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/*tag*" To filter the results of your request to tags +// applied to the version `1.0` in package `my-package`, append the following +// filter expression to your request: * +// `version="projects/my-project/locations/us-central1/repositories/my-repo/pack +// ages/my-package/versions/1.0" func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c.urlParams_.Set("filter", filter) return c @@ -8649,6 +8751,40 @@ func (r *ProjectsLocationsRepositoriesPackagesVersionsService) List(parent strin return c } +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. Filter rules are case insensitive. The fields +// eligible for filtering are: * `name` * `annotations` Examples of using a +// filter: To filter the results of your request to versions with the name +// "my-version" in project my-project in the us-central region, in repository +// my-repo, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/versions/my-version" You can also use wildcards to match any +// number of characters before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/versions/*version" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/versions/my*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/versions/*version*" To filter the results of your request to +// versions with the annotation key-value pair +// [`external_link`:`external_link_value`], append the following filter +// expression to your request: * +// "annotations.external_link:external_link_value" To filter just for a +// specific annotation key `external_link`, append the following filter +// expression to your request: * "annotations.external_link" If the annotation +// key or value contains special characters, you can escape them by surrounding +// the value with backticks. For example, to filter the results of your request +// to versions with the annotation key-value pair +// [`external.link`:`https://example.com/my-version`], append the following +// filter expression to your request: * +// "annotations.`external.link`:`https://example.com/my-version" You can also +// filter with annotations with a wildcard to match any number of characters +// before or after the value: * "annotations.*_link:`*example.com*" +func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + // OrderBy sets the optional parameter "orderBy": The field to order the // results by. func (c *ProjectsLocationsRepositoriesPackagesVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesVersionsListCall { diff --git a/artifactregistry/v1beta1/artifactregistry-api.json b/artifactregistry/v1beta1/artifactregistry-api.json index 0045ba8eee0..40a97ff4078 100644 --- a/artifactregistry/v1beta1/artifactregistry-api.json +++ b/artifactregistry/v1beta1/artifactregistry-api.json @@ -715,7 +715,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `owner` An example of using a filter: * `name=\"projects/p1/locations/us-central1/repositories/repo1/files/a/b/*\"` --\u003e Files with an ID starting with \"a/b/\". * `owner=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Files owned by the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `owner` * `annotations` Examples of using a filter: To filter the results of your request to files with the name \"my_file.txt\" in project my-project in the us-central region, in repository my-repo, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/my-*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/*file*\"` To filter the results of your request to files owned by the version `1.0` in package `pkg1`, append the following filter expression to your request: * `owner=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0\"` To filter the results of your request to files with the annotation key-value pair [`external_link`:`external_link_value`], append the following filter expression to your request: * \"annotations.external_link:external_link_value\" To filter just for a specific annotation key `external_link`, append the following filter expression to your request: * \"annotations.external_link\" If the annotation key or value contains special characters, you can escape them by surrounding the value with backticks. For example, to filter the results of your request to files with the annotation key-value pair [`external.link`:`https://example.com/my-file`], append the following filter expression to your request: * \"annotations.`external.link`:`https://example.com/my-file`\" You can also filter with annotations with a wildcard to match any number of characters before or after the value: * \"annotations.*_link:`*example.com*`\"", "location": "query", "type": "string" }, @@ -937,7 +937,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `version` Examples of using a filter: To filter the results of your request to tags with the name \"my-tag\" in package \"my-package\" in repository \"my-repo\" in project \"my-project\" in the us-central region, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*\"` To filter the results of your request to tags applied to the version `1.0` in package `my-package`, append the following filter expression to your request: * `version=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0\"`", "location": "query", "type": "string" }, @@ -1146,7 +1146,7 @@ } } }, - "revision": "20240724", + "revision": "20240809", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "Binding": { diff --git a/artifactregistry/v1beta1/artifactregistry-gen.go b/artifactregistry/v1beta1/artifactregistry-gen.go index 1c92fcf4974..b9bc37d1242 100644 --- a/artifactregistry/v1beta1/artifactregistry-gen.go +++ b/artifactregistry/v1beta1/artifactregistry-gen.go @@ -2508,11 +2508,36 @@ func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *Project // Filter sets the optional parameter "filter": An expression for filtering the // results of the request. Filter rules are case insensitive. The fields -// eligible for filtering are: * `name` * `owner` An example of using a filter: -// * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*" -// --> Files with an ID starting with "a/b/". * -// `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ve -// rsions/1.0" --> Files owned by the version `1.0` in package `pkg1`. +// eligible for filtering are: * `name` * `owner` * `annotations` Examples of +// using a filter: To filter the results of your request to files with the name +// "my_file.txt" in project my-project in the us-central region, in repository +// my-repo, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/m +// y-file.txt" You can also use wildcards to match any number of characters +// before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/m +// y-*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/* +// file.txt" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/* +// file*" To filter the results of your request to files owned by the version +// `1.0` in package `pkg1`, append the following filter expression to your +// request: * +// `owner="projects/my-project/locations/us-central1/repositories/my-repo/packag +// es/my-package/versions/1.0" To filter the results of your request to files +// with the annotation key-value pair [`external_link`:`external_link_value`], +// append the following filter expression to your request: * +// "annotations.external_link:external_link_value" To filter just for a +// specific annotation key `external_link`, append the following filter +// expression to your request: * "annotations.external_link" If the annotation +// key or value contains special characters, you can escape them by surrounding +// the value with backticks. For example, to filter the results of your request +// to files with the annotation key-value pair +// [`external.link`:`https://example.com/my-file`], append the following filter +// expression to your request: * +// "annotations.`external.link`:`https://example.com/my-file" You can also +// filter with annotations with a wildcard to match any number of characters +// before or after the value: * "annotations.*_link:`*example.com*" func (c *ProjectsLocationsRepositoriesFilesListCall) Filter(filter string) *ProjectsLocationsRepositoriesFilesListCall { c.urlParams_.Set("filter", filter) return c @@ -3321,10 +3346,23 @@ func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) * // Filter sets the optional parameter "filter": An expression for filtering the // results of the request. Filter rules are case insensitive. The fields -// eligible for filtering are: * `version` An example of using a filter: * -// `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ -// versions/1.0" --> Tags that are applied to the version `1.0` in package -// `pkg1`. +// eligible for filtering are: * `name` * `version` Examples of using a filter: +// To filter the results of your request to tags with the name "my-tag" in +// package "my-package" in repository "my-repo" in project "my-project" in the +// us-central region, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/my-tag" You can also use wildcards to match any number of +// characters before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/my*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/*tag" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/*tag*" To filter the results of your request to tags +// applied to the version `1.0` in package `my-package`, append the following +// filter expression to your request: * +// `version="projects/my-project/locations/us-central1/repositories/my-repo/pack +// ages/my-package/versions/1.0" func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c.urlParams_.Set("filter", filter) return c diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index 504abc748cd..94b5ae2be4c 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -618,6 +618,11 @@ "parent" ], "parameters": { + "orderBy": { + "description": "Optional. The field to order the results by.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of repositories to return. Maximum page size is 1,000.", "format": "int32", @@ -877,7 +882,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `owner` An example of using a filter: * `name=\"projects/p1/locations/us-central1/repositories/repo1/files/a/b/*\"` --\u003e Files with an ID starting with \"a/b/\". * `owner=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Files owned by the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `owner` * `annotations` Examples of using a filter: To filter the results of your request to files with the name \"my_file.txt\" in project my-project in the us-central region, in repository my-repo, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/my-file.txt\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/my-*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/*file.txt\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/files/*file*\"` To filter the results of your request to files owned by the version `1.0` in package `pkg1`, append the following filter expression to your request: * `owner=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0\"` To filter the results of your request to files with the annotation key-value pair [`external_link`:`external_link_value`], append the following filter expression to your request: * \"annotations.external_link:external_link_value\" To filter just for a specific annotation key `external_link`, append the following filter expression to your request: * \"annotations.external_link\" If the annotation key or value contains special characters, you can escape them by surrounding the value with backticks. For example, to filter the results of your request to files with the annotation key-value pair [`external.link`:`https://example.com/my-file`], append the following filter expression to your request: * \"annotations.`external.link`:`https://example.com/my-file`\" You can also filter with annotations with a wildcard to match any number of characters before or after the value: * \"annotations.*_link:`*example.com*`\"", "location": "query", "type": "string" }, @@ -973,6 +978,11 @@ "parent" ], "parameters": { + "orderBy": { + "description": "Optional. The field to order the results by.", + "location": "query", + "type": "string" + }, "pageSize": { "description": "The maximum number of packages to return. Maximum page size is 1,000.", "format": "int32", @@ -1133,7 +1143,7 @@ ], "parameters": { "filter": { - "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `version` An example of using a filter: * `version=\"projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0\"` --\u003e Tags that are applied to the version `1.0` in package `pkg1`.", + "description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `version` Examples of using a filter: To filter the results of your request to tags with the name \"my-tag\" in package \"my-package\" in repository \"my-repo\" in project \"my-project\" in the us-central region, append the following filter expression to your request: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my-tag\"` You can also use wildcards to match any number of characters before or after the value: * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/my*\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag\"` * `name=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/tags/*tag*\"` To filter the results of your request to tags applied to the version `1.0` in package `my-package`, append the following filter expression to your request: * `version=\"projects/my-project/locations/us-central1/repositories/my-repo/packages/my-package/versions/1.0\"`", "location": "query", "type": "string" }, @@ -1414,7 +1424,7 @@ } } }, - "revision": "20240724", + "revision": "20240826", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index e1081339043..947bfcdd411 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -2668,6 +2668,13 @@ func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLoca return c } +// OrderBy sets the optional parameter "orderBy": The field to order the +// results by. +func (c *ProjectsLocationsRepositoriesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // repositories to return. Maximum page size is 1,000. func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall { @@ -3644,11 +3651,36 @@ func (r *ProjectsLocationsRepositoriesFilesService) List(parent string) *Project // Filter sets the optional parameter "filter": An expression for filtering the // results of the request. Filter rules are case insensitive. The fields -// eligible for filtering are: * `name` * `owner` An example of using a filter: -// * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*" -// --> Files with an ID starting with "a/b/". * -// `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ve -// rsions/1.0" --> Files owned by the version `1.0` in package `pkg1`. +// eligible for filtering are: * `name` * `owner` * `annotations` Examples of +// using a filter: To filter the results of your request to files with the name +// "my_file.txt" in project my-project in the us-central region, in repository +// my-repo, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/m +// y-file.txt" You can also use wildcards to match any number of characters +// before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/m +// y-*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/* +// file.txt" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/files/* +// file*" To filter the results of your request to files owned by the version +// `1.0` in package `pkg1`, append the following filter expression to your +// request: * +// `owner="projects/my-project/locations/us-central1/repositories/my-repo/packag +// es/my-package/versions/1.0" To filter the results of your request to files +// with the annotation key-value pair [`external_link`:`external_link_value`], +// append the following filter expression to your request: * +// "annotations.external_link:external_link_value" To filter just for a +// specific annotation key `external_link`, append the following filter +// expression to your request: * "annotations.external_link" If the annotation +// key or value contains special characters, you can escape them by surrounding +// the value with backticks. For example, to filter the results of your request +// to files with the annotation key-value pair +// [`external.link`:`https://example.com/my-file`], append the following filter +// expression to your request: * +// "annotations.`external.link`:`https://example.com/my-file" You can also +// filter with annotations with a wildcard to match any number of characters +// before or after the value: * "annotations.*_link:`*example.com*" func (c *ProjectsLocationsRepositoriesFilesListCall) Filter(filter string) *ProjectsLocationsRepositoriesFilesListCall { c.urlParams_.Set("filter", filter) return c @@ -4000,6 +4032,13 @@ func (r *ProjectsLocationsRepositoriesPackagesService) List(parent string) *Proj return c } +// OrderBy sets the optional parameter "orderBy": The field to order the +// results by. +func (c *ProjectsLocationsRepositoriesPackagesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesPackagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // packages to return. Maximum page size is 1,000. func (c *ProjectsLocationsRepositoriesPackagesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesPackagesListCall { @@ -4568,10 +4607,23 @@ func (r *ProjectsLocationsRepositoriesPackagesTagsService) List(parent string) * // Filter sets the optional parameter "filter": An expression for filtering the // results of the request. Filter rules are case insensitive. The fields -// eligible for filtering are: * `version` An example of using a filter: * -// `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/ -// versions/1.0" --> Tags that are applied to the version `1.0` in package -// `pkg1`. +// eligible for filtering are: * `name` * `version` Examples of using a filter: +// To filter the results of your request to tags with the name "my-tag" in +// package "my-package" in repository "my-repo" in project "my-project" in the +// us-central region, append the following filter expression to your request: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/my-tag" You can also use wildcards to match any number of +// characters before or after the value: * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/my*" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/*tag" * +// `name="projects/my-project/locations/us-central1/repositories/my-repo/package +// s/my-package/tags/*tag*" To filter the results of your request to tags +// applied to the version `1.0` in package `my-package`, append the following +// filter expression to your request: * +// `version="projects/my-project/locations/us-central1/repositories/my-repo/pack +// ages/my-package/versions/1.0" func (c *ProjectsLocationsRepositoriesPackagesTagsListCall) Filter(filter string) *ProjectsLocationsRepositoriesPackagesTagsListCall { c.urlParams_.Set("filter", filter) return c diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 9d7a1e2fd0b..2cfbd488fe8 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240801", + "revision": "20240823", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -697,7 +697,9 @@ "IL2", "JP_REGIONS_AND_SUPPORT", "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", - "REGIONAL_CONTROLS" + "REGIONAL_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -720,7 +722,9 @@ "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", "Assured Workloads Sovereign Controls KSA", - "Assured Workloads for Regional Controls" + "Assured Workloads for Regional Controls", + "Healthcare and Life Science Controls", + "Healthcare and Life Science Controls with US Support" ], "type": "string" }, @@ -1180,7 +1184,9 @@ "IL2", "JP_REGIONS_AND_SUPPORT", "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", - "REGIONAL_CONTROLS" + "REGIONAL_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1203,7 +1209,9 @@ "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", "Assured Workloads Sovereign Controls KSA", - "Assured Workloads for Regional Controls" + "Assured Workloads for Regional Controls", + "Healthcare and Life Science Controls", + "Healthcare and Life Science Controls with US Support" ], "type": "string" }, @@ -1281,14 +1289,18 @@ "LOCAL_CONTROLS_BY_S3NS", "SOVEREIGN_CONTROLS_BY_T_SYSTEMS", "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT", - "SOVEREIGN_CONTROLS_BY_PSN" + "SOVEREIGN_CONTROLS_BY_PSN", + "SOVEREIGN_CONTROLS_BY_CNTXT", + "SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM" ], "enumDescriptions": [ "", "Enum representing S3NS (Thales) partner.", "Enum representing T_SYSTEM (TSI) partner.", "Enum representing SIA_MINSAIT (Indra) partner.", - "Enum representing PSN (TIM) partner." + "Enum representing PSN (TIM) partner.", + "Enum representing CNTXT (Kingdom of Saudi Arabia) partner.", + "Enum representing CNTXT (Kingdom of Saudi Arabia) partner offering without EKM." ], "type": "string" }, @@ -1296,6 +1308,10 @@ "$ref": "GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions", "description": "Optional. Permissions granted to the AW Partner SA account for the customer workload" }, + "partnerServicesBillingAccount": { + "description": "Optional. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN/CNTXT partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC", + "type": "string" + }, "provisionedResourcesParent": { "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", "type": "string" diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 83dff38a2d0..2b17129e525 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -349,6 +349,10 @@ type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS" - Healthcare and Life Science + // Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life + // Science Controls with US Support ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -884,6 +888,10 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS" - Healthcare and Life Science + // Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life + // Science Controls with US Support ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the Workload. ComplianceStatus *GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus `json:"complianceStatus,omitempty"` @@ -938,10 +946,21 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT" - Enum representing SIA_MINSAIT // (Indra) partner. // "SOVEREIGN_CONTROLS_BY_PSN" - Enum representing PSN (TIM) partner. + // "SOVEREIGN_CONTROLS_BY_CNTXT" - Enum representing CNTXT (Kingdom of Saudi + // Arabia) partner. + // "SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM" - Enum representing CNTXT (Kingdom of + // Saudi Arabia) partner offering without EKM. Partner string `json:"partner,omitempty"` // PartnerPermissions: Optional. Permissions granted to the AW Partner SA // account for the customer workload PartnerPermissions *GoogleCloudAssuredworkloadsV1WorkloadPartnerPermissions `json:"partnerPermissions,omitempty"` + // PartnerServicesBillingAccount: Optional. Billing account necessary for + // purchasing services from Sovereign Partners. This field is required for + // creating SIA/PSN/CNTXT partner workloads. The caller should have + // 'billing.resourceAssociations.create' IAM permission on this + // billing-account. The format of this string is + // billingAccounts/AAAAAA-BBBBBB-CCCCCC + PartnerServicesBillingAccount string `json:"partnerServicesBillingAccount,omitempty"` // ProvisionedResourcesParent: Input only. The parent resource for the // resources managed by this Assured Workload. May be either empty or a folder // resource which is a child of the Workload parent. If not specified all diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index 963e48d0ccf..ad17eaf8996 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -588,7 +588,7 @@ } } }, - "revision": "20240801", + "revision": "20240823", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -694,7 +694,9 @@ "IL2", "JP_REGIONS_AND_SUPPORT", "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", - "REGIONAL_CONTROLS" + "REGIONAL_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -717,7 +719,9 @@ "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", "Assured Workloads Sovereign Controls KSA", - "Assured Workloads for Regional Controls" + "Assured Workloads for Regional Controls", + "Healthcare and Life Science Controls", + "Healthcare and Life Science Controls with US Support" ], "type": "string" }, @@ -1175,7 +1179,9 @@ "IL2", "JP_REGIONS_AND_SUPPORT", "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", - "REGIONAL_CONTROLS" + "REGIONAL_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1198,7 +1204,9 @@ "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", "Assured Workloads Sovereign Controls KSA", - "Assured Workloads for Regional Controls" + "Assured Workloads for Regional Controls", + "Healthcare and Life Science Controls", + "Healthcare and Life Science Controls with US Support" ], "type": "string" }, @@ -1296,14 +1304,18 @@ "LOCAL_CONTROLS_BY_S3NS", "SOVEREIGN_CONTROLS_BY_T_SYSTEMS", "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT", - "SOVEREIGN_CONTROLS_BY_PSN" + "SOVEREIGN_CONTROLS_BY_PSN", + "SOVEREIGN_CONTROLS_BY_CNTXT", + "SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM" ], "enumDescriptions": [ "", "Enum representing S3NS (Thales) partner.", "Enum representing T_SYSTEM (TSI) partner.", "Enum representing SIA_MINSAIT (Indra) partner.", - "Enum representing PSN (TIM) partner." + "Enum representing PSN (TIM) partner.", + "Enum representing CNTXT (Kingdom of Saudi Arabia) partner.", + "Enum representing CNTXT (Kingdom of Saudi Arabia) partner offering without EKM." ], "type": "string" }, @@ -1311,6 +1323,10 @@ "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadPartnerPermissions", "description": "Optional. Permissions granted to the AW Partner SA account for the customer workload" }, + "partnerServicesBillingAccount": { + "description": "Optional. Billing account necessary for purchasing services from Sovereign Partners. This field is required for creating SIA/PSN/CNTXT partner workloads. The caller should have 'billing.resourceAssociations.create' IAM permission on this billing-account. The format of this string is billingAccounts/AAAAAA-BBBBBB-CCCCCC", + "type": "string" + }, "provisionedResourcesParent": { "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", "type": "string" diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index fa3c5409bb9..5cbb605f0a6 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -349,6 +349,10 @@ type GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata struct { // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS" - Healthcare and Life Science + // Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life + // Science Controls with US Support ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -868,6 +872,10 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS" - Healthcare and Life Science + // Controls + // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life + // Science Controls with US Support ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the Workload. ComplianceStatus *GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus `json:"complianceStatus,omitempty"` @@ -935,10 +943,21 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // "SOVEREIGN_CONTROLS_BY_SIA_MINSAIT" - Enum representing SIA_MINSAIT // (Indra) partner. // "SOVEREIGN_CONTROLS_BY_PSN" - Enum representing PSN (TIM) partner. + // "SOVEREIGN_CONTROLS_BY_CNTXT" - Enum representing CNTXT (Kingdom of Saudi + // Arabia) partner. + // "SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM" - Enum representing CNTXT (Kingdom of + // Saudi Arabia) partner offering without EKM. Partner string `json:"partner,omitempty"` // PartnerPermissions: Optional. Permissions granted to the AW Partner SA // account for the customer workload PartnerPermissions *GoogleCloudAssuredworkloadsV1beta1WorkloadPartnerPermissions `json:"partnerPermissions,omitempty"` + // PartnerServicesBillingAccount: Optional. Billing account necessary for + // purchasing services from Sovereign Partners. This field is required for + // creating SIA/PSN/CNTXT partner workloads. The caller should have + // 'billing.resourceAssociations.create' IAM permission on this + // billing-account. The format of this string is + // billingAccounts/AAAAAA-BBBBBB-CCCCCC + PartnerServicesBillingAccount string `json:"partnerServicesBillingAccount,omitempty"` // ProvisionedResourcesParent: Input only. The parent resource for the // resources managed by this Assured Workload. May be either empty or a folder // resource which is a child of the Workload parent. If not specified all diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index fc1f9421ed2..1510c627436 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -1598,7 +1598,7 @@ } } }, - "revision": "20240731", + "revision": "20240815", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AbandonBackupRequest": { @@ -2433,17 +2433,6 @@ "format": "int32", "type": "integer" }, - "backupVault": { - "deprecated": true, - "description": "Optional. TODO b/341576760: Remove deprecated BV and Datasource field form BP and BPA once UI removed all dependencies on them Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault}", - "type": "string" - }, - "backupVaultServiceAccount": { - "deprecated": true, - "description": "Output only. TODO b/341576760: Remove deprecated BV and Datasource field form BP and BPA once UI removed all dependencies on them Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account.", - "readOnly": true, - "type": "string" - }, "ruleId": { "description": "Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is unique per `BackupPlan`.The `rule_id` must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.", "type": "string" @@ -2497,11 +2486,6 @@ "format": "google-datetime", "type": "string" }, - "enforcedRetentionDuration": { - "description": "Required. The default retention period for each backup in the backup vault (Deprecated).", - "format": "google-duration", - "type": "string" - }, "etag": { "description": "Optional. Server specified ETag for the backup vault resource to prevent simultaneous updates from overwiting each other.", "type": "string" @@ -4392,12 +4376,6 @@ "description": "Message for rules config info.", "id": "RuleConfigInfo", "properties": { - "dataSource": { - "deprecated": true, - "description": "Output only. TODO b/341576760: Remove deprecated BV and Datasource field form BP and BPA once UI removed all dependencies on them Output Only. Resource name of data source which will be used as storage location for backups taken by specified rule. Format : projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", - "readOnly": true, - "type": "string" - }, "lastBackupError": { "$ref": "Status", "description": "Output only. Output Only. google.rpc.Status object to store the last backup error.", diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index 98b367901fc..52579b44f44 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -1078,18 +1078,6 @@ type BackupRule struct { // will be kept. It is defined in “days”. The value should be greater than // or equal to minimum enforced retention of the backup vault. BackupRetentionDays int64 `json:"backupRetentionDays,omitempty"` - // BackupVault: Optional. TODO b/341576760: Remove deprecated BV and Datasource - // field form BP and BPA once UI removed all dependencies on them Required. - // Resource name of backup vault which will be used as storage location for - // backups. Format: - // projects/{project}/locations/{location}/backupVaults/{backupvault} - BackupVault string `json:"backupVault,omitempty"` - // BackupVaultServiceAccount: Output only. TODO b/341576760: Remove deprecated - // BV and Datasource field form BP and BPA once UI removed all dependencies on - // them Output only. The Google Cloud Platform Service Account to be used by - // the BackupVault for taking backups. Specify the email address of the Backup - // Vault Service Account. - BackupVaultServiceAccount string `json:"backupVaultServiceAccount,omitempty"` // RuleId: Required. Immutable. The unique id of this `BackupRule`. The // `rule_id` is unique per `BackupPlan`.The `rule_id` must start with a // lowercase letter followed by up to 62 lowercase letters, numbers, or @@ -1139,9 +1127,6 @@ type BackupVault struct { // EffectiveTime: Optional. Time after which the BackupVault resource is // locked. EffectiveTime string `json:"effectiveTime,omitempty"` - // EnforcedRetentionDuration: Required. The default retention period for each - // backup in the backup vault (Deprecated). - EnforcedRetentionDuration string `json:"enforcedRetentionDuration,omitempty"` // Etag: Optional. Server specified ETag for the backup vault resource to // prevent simultaneous updates from overwiting each other. Etag string `json:"etag,omitempty"` @@ -3440,13 +3425,6 @@ func (s RestoreBackupRequest) MarshalJSON() ([]byte, error) { // RuleConfigInfo: Message for rules config info. type RuleConfigInfo struct { - // DataSource: Output only. TODO b/341576760: Remove deprecated BV and - // Datasource field form BP and BPA once UI removed all dependencies on them - // Output Only. Resource name of data source which will be used as storage - // location for backups taken by specified rule. Format : - // projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSource - // s/{datasource} - DataSource string `json:"dataSource,omitempty"` // LastBackupError: Output only. Output Only. google.rpc.Status object to store // the last backup error. LastBackupError *Status `json:"lastBackupError,omitempty"` @@ -3465,15 +3443,15 @@ type RuleConfigInfo struct { LastSuccessfulBackupConsistencyTime string `json:"lastSuccessfulBackupConsistencyTime,omitempty"` // RuleId: Output only. Output Only. Backup Rule id fetched from backup plan. RuleId string `json:"ruleId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSource") to + // ForceSendFields is a list of field names (e.g. "LastBackupError") 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. "DataSource") 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. "LastBackupError") 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:"-"` } diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json index 2bd285e205a..0b14bd153b1 100644 --- a/batch/v1/batch-api.json +++ b/batch/v1/batch-api.json @@ -561,7 +561,7 @@ } } }, - "revision": "20240801", + "revision": "20240813", "rootUrl": "https://batch.googleapis.com/", "schemas": { "Accelerator": { @@ -1256,6 +1256,10 @@ "description": "InstancePolicyOrTemplate lets you define the type of resources to use for this job either with an InstancePolicy or an instance template. If undefined, Batch picks the type of VM to use and doesn't include optional VM resources such as GPUs and extra disks.", "id": "InstancePolicyOrTemplate", "properties": { + "blockProjectSshKeys": { + "description": "Optional. Set this field to `true` if you want Batch to block project-level SSH keys from accessing this job's VMs. Alternatively, you can configure the job to specify a VM instance template that blocks project-level SSH keys. In either case, Batch blocks project-level SSH keys while creating the VMs for this job. Batch allows project-level SSH keys for a job's VMs only if all the following are true: + This field is undefined or set to `false`. + The job's VM instance template (if any) doesn't block project-level SSH keys. Notably, you can override this behavior by manually updating a VM to block or allow project-level SSH keys. For more information about blocking project-level SSH keys, see the Compute Engine documentation: https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys", + "type": "boolean" + }, "installGpuDrivers": { "description": "Set this field true if you want Batch to help fetch drivers from a third party location and install them for GPUs specified in `policy.accelerators` or `instance_template` on your behalf. Default is false. For Container-Optimized Image cases, Batch will install the accelerator driver following milestones of https://cloud.google.com/container-optimized-os/docs/release-notes. For non Container-Optimized Image cases, following https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py.", "type": "boolean" diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go index 8f5b2e914ba..73599cd7c0d 100644 --- a/batch/v1/batch-gen.go +++ b/batch/v1/batch-gen.go @@ -1182,6 +1182,18 @@ func (s InstancePolicy) MarshalJSON() ([]byte, error) { // instance template. If undefined, Batch picks the type of VM to use and // doesn't include optional VM resources such as GPUs and extra disks. type InstancePolicyOrTemplate struct { + // BlockProjectSshKeys: Optional. Set this field to `true` if you want Batch to + // block project-level SSH keys from accessing this job's VMs. Alternatively, + // you can configure the job to specify a VM instance template that blocks + // project-level SSH keys. In either case, Batch blocks project-level SSH keys + // while creating the VMs for this job. Batch allows project-level SSH keys for + // a job's VMs only if all the following are true: + This field is undefined or + // set to `false`. + The job's VM instance template (if any) doesn't block + // project-level SSH keys. Notably, you can override this behavior by manually + // updating a VM to block or allow project-level SSH keys. For more information + // about blocking project-level SSH keys, see the Compute Engine documentation: + // https://cloud.google.com/compute/docs/connect/restrict-ssh-keys#block-keys + BlockProjectSshKeys bool `json:"blockProjectSshKeys,omitempty"` // InstallGpuDrivers: Set this field true if you want Batch to help fetch // drivers from a third party location and install them for GPUs specified in // `policy.accelerators` or `instance_template` on your behalf. Default is @@ -1200,15 +1212,15 @@ type InstancePolicyOrTemplate struct { InstanceTemplate string `json:"instanceTemplate,omitempty"` // Policy: InstancePolicy. Policy *InstancePolicy `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstallGpuDrivers") to + // ForceSendFields is a list of field names (e.g. "BlockProjectSshKeys") 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. "InstallGpuDrivers") 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. "BlockProjectSshKeys") 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:"-"` } diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index 29939fb380c..ff5c4dfc69e 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -1264,7 +1264,10 @@ "path": "v1alpha/{+name}:cancel", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaCancelSubscriptionResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "create": { "description": "Creates a new BeyondCorp Enterprise Subscription in a given organization. Location will always be global as BeyondCorp subscriptions are per organization.", @@ -1289,7 +1292,10 @@ }, "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "get": { "description": "Gets details of a single Subscription.", @@ -1311,7 +1317,10 @@ "path": "v1alpha/{+name}", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "list": { "description": "Lists Subscriptions in a given organization and location.", @@ -1344,7 +1353,10 @@ "path": "v1alpha/{+parent}/subscriptions", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "patch": { "description": "Updates an existing BeyondCorp Enterprise Subscription in a given organization. Location will always be global as BeyondCorp subscriptions are per organization.", @@ -1380,7 +1392,10 @@ }, "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "restart": { "description": "Restarts an existing BeyondCorp Enterprise Subscription in a given organization, that is scheduled for cancellation. Location will always be global as BeyondCorp subscriptions are per organization. Returns the timestamp for when the cancellation will become effective", @@ -1407,7 +1422,10 @@ "path": "v1alpha/{+name}:restart", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaRestartSubscriptionResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } @@ -3462,6 +3480,232 @@ } } }, + "global": { + "resources": { + "securityGateways": { + "resources": { + "applications": { + "methods": { + "create": { + "description": "Creates a new Application in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/applications", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.global.securityGateways.applications.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "applicationId": { + "description": "Optional. User-settable Hub resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or letter.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent SecurityGateway using the form: `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. 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 request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/applications", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Application.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/applications/{applicationsId}", + "httpMethod": "PATCH", + "id": "beyondcorp.projects.locations.global.securityGateways.applications.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. 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. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request timed 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" + }, + "updateMask": { + "description": "Required. Mutable fields include: display_name.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/applications/{applicationsId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.global.securityGateways.applications.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "hubs": { + "methods": { + "create": { + "description": "Creates a new Hub in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.global.securityGateways.hubs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "hubId": { + "description": "Optional. User-settable Hub resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or letter.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the parent SecurityGateway using the form: `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. 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 request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/hubs", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single Hub.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs/{hubsId}", + "httpMethod": "PATCH", + "id": "beyondcorp.projects.locations.global.securityGateways.hubs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+/hubs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. 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. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request timed 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" + }, + "updateMask": { + "description": "Required. Mutable fields include: display_name.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs/{hubsId}:testIamPermissions", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.global.securityGateways.hubs.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+/hubs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, "insights": { "methods": { "configuredInsight": { @@ -4176,52 +4420,274 @@ "https://www.googleapis.com/auth/cloud-platform" ] } - } - } - } - } - } - } - }, - "revision": "20240802", - "rootUrl": "https://beyondcorp.googleapis.com/", - "schemas": { - "AllocatedConnection": { - "description": "Allocated connection of the AppGateway.", - "id": "AllocatedConnection", - "properties": { - "ingressPort": { - "description": "Required. The ingress port of an allocated connection", - "format": "int32", - "type": "integer" - }, - "pscUri": { - "description": "Required. The PSC uri of an allocated connection", - "type": "string" - } - }, - "type": "object" - }, - "AppGateway": { - "description": "A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be authorised for a single AppGateway.", - "id": "AppGateway", - "properties": { - "allocatedConnections": { - "description": "Output only. A list of connections allocated for the Gateway", - "items": { - "$ref": "AllocatedConnection" - }, - "readOnly": true, - "type": "array" - }, - "createTime": { - "description": "Output only. Timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed 64 characters.", + }, + "resources": { + "applications": { + "methods": { + "delete": { + "description": "Deletes a single Application.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications/{applicationsId}", + "httpMethod": "DELETE", + "id": "beyondcorp.projects.locations.securityGateways.applications.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. 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. The server will guarantee that for at least 60 minutes after the first request. 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" + }, + "validateOnly": { + "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Application.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications/{applicationsId}", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.applications.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Application using the form: `projects/{project_id}/locations/global/securityGateway/{security_gateway_id}/applications/{application_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Applications in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.applications.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter specifying constraints of a list operation. All fields in the Hub message are supported. For example, the following query will return the Hub with displayName \"test-application\" For more information, please refer to https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous ListHubsRequest, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location to which the resources belong. `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/applications", + "response": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "hubs": { + "methods": { + "delete": { + "description": "Deletes a single Hub.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs/{hubsId}", + "httpMethod": "DELETE", + "id": "beyondcorp.projects.locations.securityGateways.hubs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/hubs/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. 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. The server will guarantee that for at least 60 minutes after the first request. 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" + }, + "validateOnly": { + "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Hub.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs/{hubsId}", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.hubs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Hub using the form: `projects/{project_id}/locations/global/securityGateway/{security_gateway_id}/hubs/{hub_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/hubs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Hubs in a given project and location.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.hubs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter specifying constraints of a list operation. All fields in the Hub message are supported. For example, the following query will return the Hub with displayName \"test-hub\" For more information, please refer to https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous ListHubsRequest, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location to which the resources belong. `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/hubs", + "response": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20240807", + "rootUrl": "https://beyondcorp.googleapis.com/", + "schemas": { + "AllocatedConnection": { + "description": "Allocated connection of the AppGateway.", + "id": "AllocatedConnection", + "properties": { + "ingressPort": { + "description": "Required. The ingress port of an allocated connection", + "format": "int32", + "type": "integer" + }, + "pscUri": { + "description": "Required. The PSC uri of an allocated connection", + "type": "string" + } + }, + "type": "object" + }, + "AppGateway": { + "description": "A BeyondCorp AppGateway resource represents a BeyondCorp protected AppGateway to a remote application. It creates all the necessary GCP components needed for creating a BeyondCorp protected AppGateway. Multiple connectors can be authorised for a single AppGateway.", + "id": "AppGateway", + "properties": { + "allocatedConnections": { + "description": "Output only. A list of connections allocated for the Gateway", + "items": { + "$ref": "AllocatedConnection" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. An arbitrary user-provided name for the AppGateway. Cannot exceed 64 characters.", "type": "string" }, "hostType": { @@ -6357,6 +6823,197 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication": { + "description": "A Beyondcorp Application resource information.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication", + "properties": { + "applicationMatchFilter": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter", + "description": "Required. Application filter conditions associated with an application." + }, + "createTime": { + "description": "Output only. Timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. An arbitrary user-provided name for the Route resource. Cannot exceed 64 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. Name of the resource.", + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when the resource was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter": { + "description": "Match Criteria for Application Filtering.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter", + "properties": { + "matchConditions": { + "description": "Required. Match conditions for AND logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if all the conditions are met. The conditions can be one of the following combination (FQDN), (FQDN \u0026 PORTS), (IP_ADDRESS), (IP_ADDRESS \u0026 PORTS) EXAMPLES: FQDN - (\"*.abc.com\"), (\"xyz.abc.com\") FQDN and PORTS - (\"abc.com\" and \"22\"), (\"abc.com\" and \"22,33)\" etc IP_ADDRESS - (\"10.20.30.40\"), (\"100.20.30.40\") IP_ADDRESS and PORTS - (\"10.20.30.40\" and \"4\"), (\"10.20.30.40\" and \"4,5\")", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition": { + "description": "Match condition for idenfying the application.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition", + "properties": { + "fqdn": { + "description": "Optional. FQDN of the application.", + "type": "string" + }, + "ipAddress": { + "description": "Optional. IP Address of the application.", + "type": "string" + }, + "ports": { + "description": "Optional. Ports of the application.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub": { + "description": "A Beyondcorp Hub resource information.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub", + "properties": { + "createTime": { + "description": "Output only. Timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. An arbitrary user-provided name for the Hub. Cannot exceed 64 characters.", + "type": "string" + }, + "name": { + "description": "Identifier. Name of the resource.", + "type": "string" + }, + "natGatewayConfig": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig", + "description": "Required. NAT gateway setup to ensure enough NAT IP addresses are available to handle the traffic needed to access the applications. Allows to explicitly enable or disable the NAT in the Hub along with the total IPs allocated to handle the capacity limits." + }, + "state": { + "description": "Output only. The operational state of the Hub.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "UPDATING", + "DELETING", + "RUNNING", + "DOWN", + "ERROR" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Hub is being created.", + "Hub is being updated.", + "Hub is being deleted.", + "Hub is running.", + "Hub is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF.", + "Hub encountered an error and is in an indeterministic state." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when the resource was last modified.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig": { + "description": "Represents the NAT Gateway configuration.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig", + "properties": { + "enableNatGateway": { + "description": "Optional. Explicitly enable or disable the NAT Gateway. This is defaulted to false until NAT Gateway configuration is fully supported and any request with a disable option will be rejected.", + "type": "boolean" + }, + "natIps": { + "description": "Output only. List of NAT IPs that will be used for establishing connection to the endpoints.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse": { + "description": "Message for response to listing Applications.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse", + "properties": { + "applications": { + "description": "A list of BeyondCorp Application in the project.", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "A list of locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse": { + "description": "Message for response to listing Hubs.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse", + "properties": { + "hubs": { + "description": "A list of BeyondCorp Hub in the project.", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "A list of locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse": { "description": "Message for response to listing SecurityGateways.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse", diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 2e0e2bb95e1..7645358032e 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -285,6 +285,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.ClientGateways = NewProjectsLocationsClientGatewaysService(s) rs.Connections = NewProjectsLocationsConnectionsService(s) rs.Connectors = NewProjectsLocationsConnectorsService(s) + rs.Global = NewProjectsLocationsGlobalService(s) rs.Insights = NewProjectsLocationsInsightsService(s) rs.NetConnections = NewProjectsLocationsNetConnectionsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -313,6 +314,8 @@ type ProjectsLocationsService struct { Connectors *ProjectsLocationsConnectorsService + Global *ProjectsLocationsGlobalService + Insights *ProjectsLocationsInsightsService NetConnections *ProjectsLocationsNetConnectionsService @@ -403,6 +406,51 @@ type ProjectsLocationsConnectorsService struct { s *Service } +func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { + rs := &ProjectsLocationsGlobalService{s: s} + rs.SecurityGateways = NewProjectsLocationsGlobalSecurityGatewaysService(s) + return rs +} + +type ProjectsLocationsGlobalService struct { + s *Service + + SecurityGateways *ProjectsLocationsGlobalSecurityGatewaysService +} + +func NewProjectsLocationsGlobalSecurityGatewaysService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysService { + rs := &ProjectsLocationsGlobalSecurityGatewaysService{s: s} + rs.Applications = NewProjectsLocationsGlobalSecurityGatewaysApplicationsService(s) + rs.Hubs = NewProjectsLocationsGlobalSecurityGatewaysHubsService(s) + return rs +} + +type ProjectsLocationsGlobalSecurityGatewaysService struct { + s *Service + + Applications *ProjectsLocationsGlobalSecurityGatewaysApplicationsService + + Hubs *ProjectsLocationsGlobalSecurityGatewaysHubsService +} + +func NewProjectsLocationsGlobalSecurityGatewaysApplicationsService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysApplicationsService { + rs := &ProjectsLocationsGlobalSecurityGatewaysApplicationsService{s: s} + return rs +} + +type ProjectsLocationsGlobalSecurityGatewaysApplicationsService struct { + s *Service +} + +func NewProjectsLocationsGlobalSecurityGatewaysHubsService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysHubsService { + rs := &ProjectsLocationsGlobalSecurityGatewaysHubsService{s: s} + return rs +} + +type ProjectsLocationsGlobalSecurityGatewaysHubsService struct { + s *Service +} + func NewProjectsLocationsInsightsService(s *Service) *ProjectsLocationsInsightsService { rs := &ProjectsLocationsInsightsService{s: s} return rs @@ -432,11 +480,35 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsSecurityGatewaysService(s *Service) *ProjectsLocationsSecurityGatewaysService { rs := &ProjectsLocationsSecurityGatewaysService{s: s} + rs.Applications = NewProjectsLocationsSecurityGatewaysApplicationsService(s) + rs.Hubs = NewProjectsLocationsSecurityGatewaysHubsService(s) return rs } type ProjectsLocationsSecurityGatewaysService struct { s *Service + + Applications *ProjectsLocationsSecurityGatewaysApplicationsService + + Hubs *ProjectsLocationsSecurityGatewaysHubsService +} + +func NewProjectsLocationsSecurityGatewaysApplicationsService(s *Service) *ProjectsLocationsSecurityGatewaysApplicationsService { + rs := &ProjectsLocationsSecurityGatewaysApplicationsService{s: s} + return rs +} + +type ProjectsLocationsSecurityGatewaysApplicationsService struct { + s *Service +} + +func NewProjectsLocationsSecurityGatewaysHubsService(s *Service) *ProjectsLocationsSecurityGatewaysHubsService { + rs := &ProjectsLocationsSecurityGatewaysHubsService{s: s} + return rs +} + +type ProjectsLocationsSecurityGatewaysHubsService struct { + s *Service } // AllocatedConnection: Allocated connection of the AppGateway. @@ -2812,6 +2884,239 @@ func (s GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription) Marsh return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication: A Beyondcorp +// Application resource information. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication struct { + // ApplicationMatchFilter: Required. Application filter conditions associated + // with an application. + ApplicationMatchFilter *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter `json:"applicationMatchFilter,omitempty"` + // CreateTime: Output only. Timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Optional. An arbitrary user-provided name for the Route + // resource. Cannot exceed 64 characters. + DisplayName string `json:"displayName,omitempty"` + // Name: Identifier. Name of the resource. + Name string `json:"name,omitempty"` + // UpdateTime: Output only. Timestamp when the resource was last modified. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ApplicationMatchFilter") 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. "ApplicationMatchFilter") 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 GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter: Match +// Criteria for Application Filtering. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter struct { + // MatchConditions: Required. Match conditions for AND logic. An array of match + // conditions to allow for multiple matching criteria. The rule is considered a + // match if all the conditions are met. The conditions can be one of the + // following combination (FQDN), (FQDN & PORTS), (IP_ADDRESS), (IP_ADDRESS & + // PORTS) EXAMPLES: FQDN - ("*.abc.com"), ("xyz.abc.com") FQDN and PORTS - + // ("abc.com" and "22"), ("abc.com" and "22,33)" etc IP_ADDRESS - + // ("10.20.30.40"), ("100.20.30.40") IP_ADDRESS and PORTS - ("10.20.30.40" and + // "4"), ("10.20.30.40" and "4,5") + MatchConditions []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition `json:"matchConditions,omitempty"` + // ForceSendFields is a list of field names (e.g. "MatchConditions") 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. "MatchConditions") 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 GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondit +// ion: Match condition for idenfying the application. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition struct { + // Fqdn: Optional. FQDN of the application. + Fqdn string `json:"fqdn,omitempty"` + // IpAddress: Optional. IP Address of the application. + IpAddress string `json:"ipAddress,omitempty"` + // Ports: Optional. Ports of the application. + Ports []int64 `json:"ports,omitempty"` + // ForceSendFields is a list of field names (e.g. "Fqdn") 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. "Fqdn") 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 GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub: A Beyondcorp Hub resource +// information. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub struct { + // CreateTime: Output only. Timestamp when the resource was created. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Optional. An arbitrary user-provided name for the Hub. Cannot + // exceed 64 characters. + DisplayName string `json:"displayName,omitempty"` + // Name: Identifier. Name of the resource. + Name string `json:"name,omitempty"` + // NatGatewayConfig: Required. NAT gateway setup to ensure enough NAT IP + // addresses are available to handle the traffic needed to access the + // applications. Allows to explicitly enable or disable the NAT in the Hub + // along with the total IPs allocated to handle the capacity limits. + NatGatewayConfig *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig `json:"natGatewayConfig,omitempty"` + // State: Output only. The operational state of the Hub. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "CREATING" - Hub is being created. + // "UPDATING" - Hub is being updated. + // "DELETING" - Hub is being deleted. + // "RUNNING" - Hub is running. + // "DOWN" - Hub is down and may be restored in the future. This happens when + // CCFE sends ProjectState = OFF. + // "ERROR" - Hub encountered an error and is in an indeterministic state. + State string `json:"state,omitempty"` + // UpdateTime: Output only. Timestamp when the resource was last modified. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig: Represents +// the NAT Gateway configuration. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig struct { + // EnableNatGateway: Optional. Explicitly enable or disable the NAT Gateway. + // This is defaulted to false until NAT Gateway configuration is fully + // supported and any request with a disable option will be rejected. + EnableNatGateway bool `json:"enableNatGateway,omitempty"` + // NatIps: Output only. List of NAT IPs that will be used for establishing + // connection to the endpoints. + NatIps []string `json:"natIps,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableNatGateway") 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. "EnableNatGateway") 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 GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse: +// Message for response to listing Applications. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse struct { + // Applications: A list of BeyondCorp Application in the project. + Applications []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication `json:"applications,omitempty"` + // NextPageToken: A token to retrieve the next page of results, or empty if + // there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: A list of locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Applications") 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. "Applications") 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 GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse: Message for +// response to listing Hubs. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse struct { + // Hubs: A list of BeyondCorp Hub in the project. + Hubs []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub `json:"hubs,omitempty"` + // NextPageToken: A token to retrieve the next page of results, or empty if + // there are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: A list of locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Hubs") 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. "Hubs") 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 GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse: // Message for response to listing SecurityGateways. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse struct { @@ -16044,183 +16349,97 @@ func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsInsightsConfiguredInsightCall struct { - s *Service - insight string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpsecuritygatewaysv1alphaapplication *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ConfiguredInsight: Gets the value for a selected particular insight based on -// the provided filters. Use the organization level path for fetching at org -// level and project level path for fetching the insight value specific to a -// particular project. +// Create: Creates a new Application in a given project and location. // -// - insight: The resource name of the insight using the form: -// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ -// id}` -// `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. -func (r *ProjectsLocationsInsightsService) ConfiguredInsight(insight string) *ProjectsLocationsInsightsConfiguredInsightCall { - c := &ProjectsLocationsInsightsConfiguredInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.insight = insight +// - parent: The resource name of the parent SecurityGateway using the form: +// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ +// id}`. +func (r *ProjectsLocationsGlobalSecurityGatewaysApplicationsService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphaapplication *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { + c := &ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpsecuritygatewaysv1alphaapplication = googlecloudbeyondcorpsecuritygatewaysv1alphaapplication return c } -// Aggregation sets the optional parameter "aggregation": Required. Aggregation -// type. Available aggregation could be fetched by calling insight list and get -// APIs in `BASIC` view. -// -// Possible values: -// -// "AGGREGATION_UNSPECIFIED" - Unspecified. -// "HOURLY" - Insight should be aggregated at hourly level. -// "DAILY" - Insight should be aggregated at daily level. -// "WEEKLY" - Insight should be aggregated at weekly level. -// "MONTHLY" - Insight should be aggregated at monthly level. -// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date -// -// range passed in as the start and end time in the request. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Aggregation(aggregation string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("aggregation", aggregation) +// ApplicationId sets the optional parameter "applicationId": User-settable Hub +// resource ID. * Must start with a letter. * Must contain between 4-63 +// characters from `/a-z-/`. * Must end with a number or letter. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { + c.urlParams_.Set("applicationId", applicationId) return c } -// CustomGroupingFieldFilter sets the optional parameter -// "customGrouping.fieldFilter": Filterable parameters to be added to the -// grouping clause. Available fields could be fetched by calling insight list -// and get APIs in `BASIC` view. `=` is the only comparison operator supported. -// `AND` is the only logical operator supported. Usage: -// field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only -// `AND` conditions are allowed. NOTE: Use the `filter_alias` from -// `Insight.Metadata.Field` message for the filtering the corresponding fields -// in this filter field. (These expressions are based on the filter language -// described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingFieldFilter(customGroupingFieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("customGrouping.fieldFilter", customGroupingFieldFilter) +// 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 request if it has already been +// completed. The server will guarantee that for at least 60 minutes since the +// first request. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } -// CustomGroupingGroupFields sets the optional parameter -// "customGrouping.groupFields": Required. Fields to be used for grouping. -// NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for -// declaring the fields to be grouped-by here. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingGroupFields(customGroupingGroupFields ...string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.SetMulti("customGrouping.groupFields", append([]string{}, customGroupingGroupFields...)) - return c -} - -// EndTime sets the optional parameter "endTime": Required. Ending time for the -// duration for which insight is to be pulled. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) EndTime(endTime string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("endTime", endTime) - return c -} - -// FieldFilter sets the optional parameter "fieldFilter": Other -// filterable/configurable parameters as applicable to the selected insight. -// Available fields could be fetched by calling insight list and get APIs in -// `BASIC` view. `=` is the only comparison operator supported. `AND` is the -// only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 -// AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: -// Use the `filter_alias` from `Insight.Metadata.Field` message for the -// filtering the corresponding fields in this filter field. (These expressions -// are based on the filter language described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsConfiguredInsightCall) FieldFilter(fieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("fieldFilter", fieldFilter) - return c -} - -// Group sets the optional parameter "group": Group id of the available -// groupings for the insight. Available groupings could be fetched by calling -// insight list and get APIs in `BASIC` view. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Group(group string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("group", group) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer items than requested. If unspecified, server will pick an -// appropriate default. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageSize(pageSize int64) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Used to fetch the page -// represented by the token. Fetches the first page when not set. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageToken(pageToken string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// StartTime sets the optional parameter "startTime": Required. Starting time -// for the duration for which insight is to be pulled. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) StartTime(startTime string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("startTime", startTime) - 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 *ProjectsLocationsInsightsConfiguredInsightCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfiguredInsightCall { - 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 *ProjectsLocationsInsightsConfiguredInsightCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.ifNoneMatch_ = entityTag +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfiguredInsightCall { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { 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 *ProjectsLocationsInsightsConfiguredInsightCall) Header() http.Header { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsConfiguredInsightCall) 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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphaapplication) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+insight}:configuredInsight") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "insight": c.insight, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.insights.configuredInsight" call. +// Do executes the "beyondcorp.projects.locations.global.securityGateways.applications.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse.Se -// rverResponse.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 *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse, error) { +// *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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16239,7 +16458,7 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16252,115 +16471,83 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.Ca 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 *ProjectsLocationsInsightsConfiguredInsightCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse) 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 ProjectsLocationsInsightsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall struct { + s *Service + name string + googlecloudbeyondcorpsecuritygatewaysv1alphaapplication *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the value for a selected particular insight with default -// configuration. The default aggregation level is 'DAILY' and no grouping will -// be applied or default grouping if applicable. The data will be returned for -// recent 7 days starting the day before. The insight data size will be limited -// to 50 rows. Use the organization level path for fetching at org level and -// project level path for fetching the insight value specific to a particular -// project. Setting the `view` to `BASIC` will only return the metadata for the -// insight. +// Patch: Updates the parameters of a single Application. // -// - name: The resource name of the insight using the form: -// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ -// id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. -func (r *ProjectsLocationsInsightsService) Get(name string) *ProjectsLocationsInsightsGetCall { - c := &ProjectsLocationsInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. Name of the resource. +func (r *ProjectsLocationsGlobalSecurityGatewaysApplicationsService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphaapplication *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { + c := &ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudbeyondcorpsecuritygatewaysv1alphaapplication = googlecloudbeyondcorpsecuritygatewaysv1alphaapplication return c } -// View sets the optional parameter "view": Required. Metadata only or full -// data view. -// -// Possible values: -// -// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -// -// "BASIC" - Include basic metadata about the insight, but not the insight -// -// data. This is the default value (for both ListInsights and GetInsight). -// -// "FULL" - Include everything. -func (c *ProjectsLocationsInsightsGetCall) View(view string) *ProjectsLocationsInsightsGetCall { - c.urlParams_.Set("view", view) +// 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. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request timed 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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mutable +// fields include: display_name. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { + 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 *ProjectsLocationsInsightsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsGetCall { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { 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 *ProjectsLocationsInsightsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsInsightsGetCall) Context(ctx context.Context) *ProjectsLocationsInsightsGetCall { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall { 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 *ProjectsLocationsInsightsGetCall) Header() http.Header { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsGetCall) 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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphaapplication) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -16371,13 +16558,13 @@ func (c *ProjectsLocationsInsightsGetCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.insights.get" call. +// Do executes the "beyondcorp.projects.locations.global.securityGateways.applications.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight.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 +// *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 *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight, error) { +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16396,7 +16583,7 @@ func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16409,177 +16596,1578 @@ func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsInsightsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists for all the available insights that could be fetched from the -// system. Allows to filter using category. Setting the `view` to `BASIC` will -// let you iterate over the list of insight metadatas. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - parent: The resource name of InsightMetadata using the form: -// `organizations/{organization_id}/locations/{location}` -// `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsInsightsService) List(parent string) *ProjectsLocationsInsightsListCall { - c := &ProjectsLocationsInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsGlobalSecurityGatewaysApplicationsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall { + c := &ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } -// Aggregation sets the optional parameter "aggregation": Aggregation type. The -// default is 'DAILY'. -// -// Possible values: -// -// "AGGREGATION_UNSPECIFIED" - Unspecified. -// "HOURLY" - Insight should be aggregated at hourly level. -// "DAILY" - Insight should be aggregated at daily level. -// "WEEKLY" - Insight should be aggregated at weekly level. -// "MONTHLY" - Insight should be aggregated at monthly level. -// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date -// -// range passed in as the start and end time in the request. -func (c *ProjectsLocationsInsightsListCall) Aggregation(aggregation string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("aggregation", aggregation) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// EndTime sets the optional parameter "endTime": Ending time for the duration +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall { + 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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.global.securityGateways.applications.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Hub in a given project and location. +// +// - parent: The resource name of the parent SecurityGateway using the form: +// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ +// id}`. +func (r *ProjectsLocationsGlobalSecurityGatewaysHubsService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + c := &ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpsecuritygatewaysv1alphahub = googlecloudbeyondcorpsecuritygatewaysv1alphahub + return c +} + +// HubId sets the optional parameter "hubId": User-settable Hub resource ID. * +// Must start with a letter. * Must contain between 4-63 characters from +// `/a-z-/`. * Must end with a number or letter. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) HubId(hubId string) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + c.urlParams_.Set("hubId", hubId) + 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 request if it has already been +// completed. The server will guarantee that for at least 60 minutes since the +// first request. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + 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 *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { + 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 *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphahub) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/hubs") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.global.securityGateways.hubs.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 *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall struct { + s *Service + name string + googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Hub. +// +// - name: Identifier. Name of the resource. +func (r *ProjectsLocationsGlobalSecurityGatewaysHubsService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + c := &ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudbeyondcorpsecuritygatewaysv1alphahub = googlecloudbeyondcorpsecuritygatewaysv1alphahub + 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. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request timed 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 *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mutable +// fields include: display_name. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + 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 *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { + 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 *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphahub) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.global.securityGateways.hubs.patch" 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 *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsGlobalSecurityGatewaysHubsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { + c := &ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { + 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 *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.global.securityGateways.hubs.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsInsightsConfiguredInsightCall struct { + s *Service + insight string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ConfiguredInsight: Gets the value for a selected particular insight based on +// the provided filters. Use the organization level path for fetching at org +// level and project level path for fetching the insight value specific to a +// particular project. +// +// - insight: The resource name of the insight using the form: +// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ +// id}` +// `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. +func (r *ProjectsLocationsInsightsService) ConfiguredInsight(insight string) *ProjectsLocationsInsightsConfiguredInsightCall { + c := &ProjectsLocationsInsightsConfiguredInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.insight = insight + return c +} + +// Aggregation sets the optional parameter "aggregation": Required. Aggregation +// type. Available aggregation could be fetched by calling insight list and get +// APIs in `BASIC` view. +// +// Possible values: +// +// "AGGREGATION_UNSPECIFIED" - Unspecified. +// "HOURLY" - Insight should be aggregated at hourly level. +// "DAILY" - Insight should be aggregated at daily level. +// "WEEKLY" - Insight should be aggregated at weekly level. +// "MONTHLY" - Insight should be aggregated at monthly level. +// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date +// +// range passed in as the start and end time in the request. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Aggregation(aggregation string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("aggregation", aggregation) + return c +} + +// CustomGroupingFieldFilter sets the optional parameter +// "customGrouping.fieldFilter": Filterable parameters to be added to the +// grouping clause. Available fields could be fetched by calling insight list +// and get APIs in `BASIC` view. `=` is the only comparison operator supported. +// `AND` is the only logical operator supported. Usage: +// field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only +// `AND` conditions are allowed. NOTE: Use the `filter_alias` from +// `Insight.Metadata.Field` message for the filtering the corresponding fields +// in this filter field. (These expressions are based on the filter language +// described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingFieldFilter(customGroupingFieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("customGrouping.fieldFilter", customGroupingFieldFilter) + return c +} + +// CustomGroupingGroupFields sets the optional parameter +// "customGrouping.groupFields": Required. Fields to be used for grouping. +// NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for +// declaring the fields to be grouped-by here. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingGroupFields(customGroupingGroupFields ...string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.SetMulti("customGrouping.groupFields", append([]string{}, customGroupingGroupFields...)) + return c +} + +// EndTime sets the optional parameter "endTime": Required. Ending time for the +// duration for which insight is to be pulled. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) EndTime(endTime string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("endTime", endTime) + return c +} + +// FieldFilter sets the optional parameter "fieldFilter": Other +// filterable/configurable parameters as applicable to the selected insight. +// Available fields could be fetched by calling insight list and get APIs in +// `BASIC` view. `=` is the only comparison operator supported. `AND` is the +// only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 +// AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: +// Use the `filter_alias` from `Insight.Metadata.Field` message for the +// filtering the corresponding fields in this filter field. (These expressions +// are based on the filter language described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsConfiguredInsightCall) FieldFilter(fieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("fieldFilter", fieldFilter) + return c +} + +// Group sets the optional parameter "group": Group id of the available +// groupings for the insight. Available groupings could be fetched by calling +// insight list and get APIs in `BASIC` view. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Group(group string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("group", group) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageSize(pageSize int64) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Used to fetch the page +// represented by the token. Fetches the first page when not set. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageToken(pageToken string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// StartTime sets the optional parameter "startTime": Required. Starting time +// for the duration for which insight is to be pulled. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) StartTime(startTime string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("startTime", startTime) + 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 *ProjectsLocationsInsightsConfiguredInsightCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfiguredInsightCall { + 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 *ProjectsLocationsInsightsConfiguredInsightCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfiguredInsightCall { + 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 *ProjectsLocationsInsightsConfiguredInsightCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightsConfiguredInsightCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+insight}:configuredInsight") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "insight": c.insight, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.insights.configuredInsight" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse.Se +// rverResponse.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 *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse, 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 := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsInsightsConfiguredInsightCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse) 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 ProjectsLocationsInsightsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the value for a selected particular insight with default +// configuration. The default aggregation level is 'DAILY' and no grouping will +// be applied or default grouping if applicable. The data will be returned for +// recent 7 days starting the day before. The insight data size will be limited +// to 50 rows. Use the organization level path for fetching at org level and +// project level path for fetching the insight value specific to a particular +// project. Setting the `view` to `BASIC` will only return the metadata for the +// insight. +// +// - name: The resource name of the insight using the form: +// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ +// id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. +func (r *ProjectsLocationsInsightsService) Get(name string) *ProjectsLocationsInsightsGetCall { + c := &ProjectsLocationsInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": Required. Metadata only or full +// data view. +// +// Possible values: +// +// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API will +// +// default to the BASIC view. +// +// "BASIC" - Include basic metadata about the insight, but not the insight +// +// data. This is the default value (for both ListInsights and GetInsight). +// +// "FULL" - Include everything. +func (c *ProjectsLocationsInsightsGetCall) View(view string) *ProjectsLocationsInsightsGetCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsInsightsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsGetCall { + 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 *ProjectsLocationsInsightsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInsightsGetCall) Context(ctx context.Context) *ProjectsLocationsInsightsGetCall { + 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 *ProjectsLocationsInsightsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.insights.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight.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 *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight, 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 := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsInsightsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists for all the available insights that could be fetched from the +// system. Allows to filter using category. Setting the `view` to `BASIC` will +// let you iterate over the list of insight metadatas. +// +// - parent: The resource name of InsightMetadata using the form: +// `organizations/{organization_id}/locations/{location}` +// `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsInsightsService) List(parent string) *ProjectsLocationsInsightsListCall { + c := &ProjectsLocationsInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Aggregation sets the optional parameter "aggregation": Aggregation type. The +// default is 'DAILY'. +// +// Possible values: +// +// "AGGREGATION_UNSPECIFIED" - Unspecified. +// "HOURLY" - Insight should be aggregated at hourly level. +// "DAILY" - Insight should be aggregated at daily level. +// "WEEKLY" - Insight should be aggregated at weekly level. +// "MONTHLY" - Insight should be aggregated at monthly level. +// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date +// +// range passed in as the start and end time in the request. +func (c *ProjectsLocationsInsightsListCall) Aggregation(aggregation string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("aggregation", aggregation) + return c +} + +// EndTime sets the optional parameter "endTime": Ending time for the duration // for which insights are to be pulled. The default is the current time. func (c *ProjectsLocationsInsightsListCall) EndTime(endTime string) *ProjectsLocationsInsightsListCall { c.urlParams_.Set("endTime", endTime) return c } -// Filter sets the optional parameter "filter": Filter expression to restrict -// the insights returned. Supported filter fields: * `type` * `category` * -// `subCategory` Examples: * "category = application AND type = count" * -// "category = application AND subCategory = iap" * "type = status" Allowed -// values: * type: [count, latency, status, list] * category: [application, -// device, request, security] * subCategory: [iap, caa, webprotect] NOTE: Only -// equality based comparison is allowed. Only `AND` conjunction is allowed. -// NOTE: The 'AND' in the filter field needs to be in capital letters only. -// NOTE: Just filtering on `subCategory` is not allowed. It should be passed in -// with the parent `category` too. (These expressions are based on the filter -// language described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsListCall) Filter(filter string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("filter", filter) +// Filter sets the optional parameter "filter": Filter expression to restrict +// the insights returned. Supported filter fields: * `type` * `category` * +// `subCategory` Examples: * "category = application AND type = count" * +// "category = application AND subCategory = iap" * "type = status" Allowed +// values: * type: [count, latency, status, list] * category: [application, +// device, request, security] * subCategory: [iap, caa, webprotect] NOTE: Only +// equality based comparison is allowed. Only `AND` conjunction is allowed. +// NOTE: The 'AND' in the filter field needs to be in capital letters only. +// NOTE: Just filtering on `subCategory` is not allowed. It should be passed in +// with the parent `category` too. (These expressions are based on the filter +// language described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsListCall) Filter(filter string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results. This is currently ignored. +func (c *ProjectsLocationsInsightsListCall) OrderBy(orderBy string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. NOTE: Default page size is 50. +func (c *ProjectsLocationsInsightsListCall) PageSize(pageSize int64) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInsightsListCall) PageToken(pageToken string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// StartTime sets the optional parameter "startTime": Starting time for the +// duration for which insights are to be pulled. The default is 7 days before +// the current time. +func (c *ProjectsLocationsInsightsListCall) StartTime(startTime string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("startTime", startTime) + return c +} + +// View sets the optional parameter "view": Required. List only metadata or +// full data. +// +// Possible values: +// +// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API will +// +// default to the BASIC view. +// +// "BASIC" - Include basic metadata about the insight, but not the insight +// +// data. This is the default value (for both ListInsights and GetInsight). +// +// "FULL" - Include everything. +func (c *ProjectsLocationsInsightsListCall) View(view string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsInsightsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsListCall { + 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 *ProjectsLocationsInsightsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInsightsListCall) Context(ctx context.Context) *ProjectsLocationsInsightsListCall { + 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 *ProjectsLocationsInsightsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/insights") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.insights.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse.ServerR +// esponse.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 *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse, 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 := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse) 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 ProjectsLocationsNetConnectionsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsNetConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + c := &ProjectsLocationsNetConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.netConnections.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsNetConnectionsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsNetConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsNetConnectionsSetIamPolicyCall { + c := &ProjectsLocationsNetConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + 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 *ProjectsLocationsNetConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsSetIamPolicyCall { + 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 *ProjectsLocationsNetConnectionsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.netConnections.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsNetConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsNetConnectionsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsNetConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { + c := &ProjectsLocationsNetConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// OrderBy sets the optional parameter "orderBy": Hint for how to order the -// results. This is currently ignored. -func (c *ProjectsLocationsInsightsListCall) OrderBy(orderBy string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("orderBy", orderBy) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { + c.ctx_ = ctx return c } -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer items than requested. If unspecified, server will pick an -// appropriate default. NOTE: Default page size is 50. -func (c *ProjectsLocationsInsightsListCall) PageSize(pageSize int64) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.netConnections.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } -// PageToken sets the optional parameter "pageToken": A token identifying a -// page of results the server should return. -func (c *ProjectsLocationsInsightsListCall) PageToken(pageToken string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx return c } -// StartTime sets the optional parameter "startTime": Starting time for the -// duration for which insights are to be pulled. The default is 7 days before -// the current time. -func (c *ProjectsLocationsInsightsListCall) StartTime(startTime string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("startTime", startTime) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Required. List only metadata or -// full data. -// -// Possible values: -// -// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API will -// -// default to the BASIC view. -// -// "BASIC" - Include basic metadata about the insight, but not the insight -// -// data. This is the default value (for both ListInsights and GetInsight). +// Delete: Deletes a long-running operation. This method indicates that the +// client is no longer interested in the operation result. It does not cancel +// the operation. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. // -// "FULL" - Include everything. -func (c *ProjectsLocationsInsightsListCall) View(view string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("view", view) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 *ProjectsLocationsInsightsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsListCall { +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { 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 *ProjectsLocationsInsightsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsInsightsListCall) Context(ctx context.Context) *ProjectsLocationsInsightsListCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { 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 *ProjectsLocationsInsightsListCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/insights") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.insights.list" call. +// Do executes the "beyondcorp.projects.locations.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse.ServerR -// esponse.Header or (if a response was returned at all) in +// *Empty.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 *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse, error) { +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16598,7 +18186,7 @@ func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16611,69 +18199,30 @@ func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*G 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 *ProjectsLocationsInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse) 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 ProjectsLocationsNetConnectionsGetIamPolicyCall struct { +type ProjectsLocationsOperationsGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsNetConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { - c := &ProjectsLocationsNetConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no -// conditional role bindings may specify any valid value or leave the field -// unset. The policy in the response might use the policy version that you -// specified, or it might use a lower policy version. For example, if you -// specify version 3, but the policy has no conditional role bindings, the -// response uses version 1. To learn which resources support conditions in -// their IAM policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNetConnectionsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16681,27 +18230,27 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi. // 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16709,7 +18258,7 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16717,18 +18266,18 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.getIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16747,7 +18296,7 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16760,81 +18309,104 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsNetConnectionsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsListCall struct { + s *Service + name 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. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsNetConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsNetConnectionsSetIamPolicyCall { - c := &ProjectsLocationsNetConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsSetIamPolicyCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsSetIamPolicyCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 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 *ProjectsLocationsNetConnectionsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.setIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsNetConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16853,7 +18425,7 @@ func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16866,65 +18438,99 @@ func (c *ProjectsLocationsNetConnectionsSetIamPolicyCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsNetConnectionsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +type ProjectsLocationsSecurityGatewaysCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new SecurityGateway in a given project and location. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsNetConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { - c := &ProjectsLocationsNetConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The resource project name of the SecurityGateway location using +// the form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsSecurityGatewaysService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway) *ProjectsLocationsSecurityGatewaysCreateCall { + c := &ProjectsLocationsSecurityGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway = googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway + 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 request if it has already been +// completed. The server will guarantee that for at least 60 minutes since the +// first request. +func (c *ProjectsLocationsSecurityGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SecurityGatewayId sets the optional parameter "securityGatewayId": +// User-settable SecurityGateway resource ID. * Must start with a letter. * +// Must contain between 4-63 characters from `/a-z-/`. * Must end with a number +// or letter. +func (c *ProjectsLocationsSecurityGatewaysCreateCall) SecurityGatewayId(securityGatewayId string) *ProjectsLocationsSecurityGatewaysCreateCall { + c.urlParams_.Set("securityGatewayId", securityGatewayId) 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 *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysCreateCall { 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 *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/securityGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -16932,18 +18538,18 @@ func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.testIamPermissions" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsSecurityGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16962,7 +18568,7 @@ func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16975,68 +18581,80 @@ func (c *ProjectsLocationsNetConnectionsTestIamPermissionsCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Delete: Deletes a single SecurityGateway. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: BeyondCorp SecurityGateway name using the form: +// `projects/{project_id}/locations/{location_id}/securityGateways/{security_g +// ateway_id}`. +func (r *ProjectsLocationsSecurityGatewaysService) Delete(name string) *ProjectsLocationsSecurityGatewaysDeleteCall { + c := &ProjectsLocationsSecurityGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + 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. The server will guarantee that for at least 60 minutes after +// the first request. 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 *ProjectsLocationsSecurityGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validates +// request by executing a dry-run which would not alter the resource in any +// way. +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysDeleteCall { 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsSecurityGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -17047,12 +18665,13 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.operations.cancel" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *Empty.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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *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 *ProjectsLocationsSecurityGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17071,7 +18690,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17084,22 +18703,22 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that the -// client is no longer interested in the operation result. It does not cancel -// the operation. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. +// Get: Gets details of a single SecurityGateway. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the PartnerTenant using the form: +// `projects/{project_id}/locations/{location_id}/securityGateway/{security_ga +// teway_id}`. +func (r *ProjectsLocationsSecurityGatewaysService) Get(name string) *ProjectsLocationsSecurityGatewaysGetCall { + c := &ProjectsLocationsSecurityGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17107,34 +18726,45 @@ func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysGetCall { 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 *ProjectsLocationsSecurityGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysGetCall { 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 *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -17145,12 +18775,13 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.operations.delete" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway.ServerResponse.H +// eader 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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsSecurityGatewaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17169,7 +18800,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17182,30 +18813,48 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsSecurityGatewaysGetIamPolicyCall struct { s *Service - name string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsSecurityGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { + c := &ProjectsLocationsSecurityGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17213,27 +18862,27 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17241,7 +18890,7 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17249,18 +18898,18 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.operations.get" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.getIamPolicy" 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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17279,7 +18928,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17292,41 +18941,57 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsSecurityGatewaysListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the request. If -// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// List: Lists SecurityGateways in a given project and location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent location to which the resources belong. +// `projects/{project_id}/locations/{location_id}/`. +func (r *ProjectsLocationsSecurityGatewaysService) List(parent string) *ProjectsLocationsSecurityGatewaysListCall { + c := &ProjectsLocationsSecurityGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +// Filter sets the optional parameter "filter": A filter specifying constraints +// of a list operation. All fields in the SecurityGateway message are +// supported. For example, the following query will return the SecurityGateway +// with displayName "test-security-gateway" For more information, please refer +// to https://google.aip.dev/160. +func (c *ProjectsLocationsSecurityGatewaysListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { +// OrderBy sets the optional parameter "orderBy": Specifies the ordering of +// results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) for +// more information. +func (c *ProjectsLocationsSecurityGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If not specified, a default value of 50 will be used by the +// service. Regardless of the page_size value, the response may include a +// partial list and a caller should only rely on response's next_page_token to +// determine if there are more instances left to be queried. +func (c *ProjectsLocationsSecurityGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous ListSecurityGatewayRequest, if any. +func (c *ProjectsLocationsSecurityGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17334,7 +18999,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsSecurityGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17342,27 +19007,27 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsSecurityGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsSecurityGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysListCall { 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 *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17370,7 +19035,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/securityGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17378,18 +19043,18 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.operations.list" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse.Ser +// verResponse.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 *ProjectsLocationsSecurityGatewaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17408,7 +19073,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17424,7 +19089,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsSecurityGatewaysListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -17442,78 +19107,187 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsSecurityGatewaysCreateCall struct { +type ProjectsLocationsSecurityGatewaysPatchCall struct { s *Service - parent string + name string googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a new SecurityGateway in a given project and location. +// Patch: Updates the parameters of a single SecurityGateway. // -// - parent: The resource project name of the SecurityGateway location using -// the form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsSecurityGatewaysService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway) *ProjectsLocationsSecurityGatewaysCreateCall { - c := &ProjectsLocationsSecurityGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Identifier. Name of the resource. +func (r *ProjectsLocationsSecurityGatewaysService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway) *ProjectsLocationsSecurityGatewaysPatchCall { + c := &ProjectsLocationsSecurityGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway = googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway 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 request if it has already been -// completed. The server will guarantee that for at least 60 minutes since the -// first request. -func (c *ProjectsLocationsSecurityGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysCreateCall { - c.urlParams_.Set("requestId", requestId) - 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. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request timed 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 *ProjectsLocationsSecurityGatewaysPatchCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mutable +// fields include: display_name, gateway_regions. +func (c *ProjectsLocationsSecurityGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSecurityGatewaysPatchCall { + 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 *ProjectsLocationsSecurityGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSecurityGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysPatchCall { + 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 *ProjectsLocationsSecurityGatewaysPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecurityGatewaysPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.securityGateways.patch" 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 *ProjectsLocationsSecurityGatewaysPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsSecurityGatewaysSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SecurityGatewayId sets the optional parameter "securityGatewayId": -// User-settable SecurityGateway resource ID. * Must start with a letter. * -// Must contain between 4-63 characters from `/a-z-/`. * Must end with a number -// or letter. -func (c *ProjectsLocationsSecurityGatewaysCreateCall) SecurityGatewayId(securityGatewayId string) *ProjectsLocationsSecurityGatewaysCreateCall { - c.urlParams_.Set("securityGatewayId", securityGatewayId) +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsSecurityGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { + c := &ProjectsLocationsSecurityGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest 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 *ProjectsLocationsSecurityGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysCreateCall { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysCreateCall { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { 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 *ProjectsLocationsSecurityGatewaysCreateCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/securityGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17521,18 +19295,18 @@ func (c *ProjectsLocationsSecurityGatewaysCreateCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.create" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.setIamPolicy" 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 *ProjectsLocationsSecurityGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17551,7 +19325,7 @@ func (c *ProjectsLocationsSecurityGatewaysCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17564,97 +19338,84 @@ func (c *ProjectsLocationsSecurityGatewaysCreateCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsSecurityGatewaysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single SecurityGateway. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - name: BeyondCorp SecurityGateway name using the form: -// `projects/{project_id}/locations/{location_id}/securityGateways/{security_g -// ateway_id}`. -func (r *ProjectsLocationsSecurityGatewaysService) Delete(name string) *ProjectsLocationsSecurityGatewaysDeleteCall { - c := &ProjectsLocationsSecurityGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - 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. The server will guarantee that for at least 60 minutes after -// the first request. 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 *ProjectsLocationsSecurityGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, validates -// request by executing a dry-run which would not alter the resource in any -// way. -func (c *ProjectsLocationsSecurityGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsSecurityGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { + c := &ProjectsLocationsSecurityGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest 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 *ProjectsLocationsSecurityGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { 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 *ProjectsLocationsSecurityGatewaysDeleteCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.delete" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.testIamPermissions" 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 +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsSecurityGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17673,7 +19434,7 @@ func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17686,68 +19447,78 @@ func (c *ProjectsLocationsSecurityGatewaysDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsSecurityGatewaysGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysApplicationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single SecurityGateway. +// Delete: Deletes a single Application. // -// - name: The resource name of the PartnerTenant using the form: -// `projects/{project_id}/locations/{location_id}/securityGateway/{security_ga -// teway_id}`. -func (r *ProjectsLocationsSecurityGatewaysService) Get(name string) *ProjectsLocationsSecurityGatewaysGetCall { - c := &ProjectsLocationsSecurityGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Delete(name string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name 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. The server will guarantee that for at least 60 minutes after +// the first request. 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 *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, validates +// request by executing a dry-run which would not alter the resource in any +// way. +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsSecurityGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysGetCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { 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 *ProjectsLocationsSecurityGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysGetCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { 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 *ProjectsLocationsSecurityGatewaysGetCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -17758,13 +19529,13 @@ func (c *ProjectsLocationsSecurityGatewaysGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.get" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway.ServerResponse.H -// eader 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 *ProjectsLocationsSecurityGatewaysGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway, error) { +// *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 *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17783,7 +19554,7 @@ func (c *ProjectsLocationsSecurityGatewaysGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17796,48 +19567,30 @@ func (c *ProjectsLocationsSecurityGatewaysGetCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsSecurityGatewaysGetIamPolicyCall struct { +type ProjectsLocationsSecurityGatewaysApplicationsGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Get: Gets details of a single Application. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsSecurityGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { - c := &ProjectsLocationsSecurityGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy. Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected. Requests for policies with any -// conditional role bindings must specify version 3. Policies with no -// conditional role bindings may specify any valid value or leave the field -// unset. The policy in the response might use the policy version that you -// specified, or it might use a lower policy version. For example, if you -// specify version 3, but the policy has no conditional role bindings, the -// response uses version 1. To learn which resources support conditions in -// their IAM policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The resource name of the Application using the form: +// `projects/{project_id}/locations/global/securityGateway/{security_gateway_i +// d}/applications/{application_id}`. +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Get(name string) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsGetCall{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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17845,27 +19598,27 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Fields(s ...googleap // 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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { 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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17873,7 +19626,7 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17881,18 +19634,18 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.getIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication.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 *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17911,7 +19664,7 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17924,7 +19677,7 @@ func (c *ProjectsLocationsSecurityGatewaysGetIamPolicyCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsSecurityGatewaysListCall struct { +type ProjectsLocationsSecurityGatewaysApplicationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -17933,22 +19686,23 @@ type ProjectsLocationsSecurityGatewaysListCall struct { header_ http.Header } -// List: Lists SecurityGateways in a given project and location. +// List: Lists Applications in a given project and location. // // - parent: The parent location to which the resources belong. -// `projects/{project_id}/locations/{location_id}/`. -func (r *ProjectsLocationsSecurityGatewaysService) List(parent string) *ProjectsLocationsSecurityGatewaysListCall { - c := &ProjectsLocationsSecurityGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ +// id}`. +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) List(parent string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": A filter specifying constraints -// of a list operation. All fields in the SecurityGateway message are -// supported. For example, the following query will return the SecurityGateway -// with displayName "test-security-gateway" For more information, please refer -// to https://google.aip.dev/160. -func (c *ProjectsLocationsSecurityGatewaysListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysListCall { +// of a list operation. All fields in the Hub message are supported. For +// example, the following query will return the Hub with displayName +// "test-application" For more information, please refer to +// https://google.aip.dev/160. +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("filter", filter) return c } @@ -17957,7 +19711,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Filter(filter string) *Proje // results. See Sorting order // (https://cloud.google.com/apis/design/design_patterns#sorting_order) for // more information. -func (c *ProjectsLocationsSecurityGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -17967,14 +19721,14 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) OrderBy(orderBy string) *Pro // service. Regardless of the page_size value, the response may include a // partial list and a caller should only rely on response's next_page_token to // determine if there are more instances left to be queried. -func (c *ProjectsLocationsSecurityGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The next_page_token value -// returned from a previous ListSecurityGatewayRequest, if any. -func (c *ProjectsLocationsSecurityGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysListCall { +// returned from a previous ListHubsRequest, if any. +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17982,7 +19736,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17990,27 +19744,27 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsSecurityGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsListCall { 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 *ProjectsLocationsSecurityGatewaysListCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18018,7 +19772,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/securityGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18031,13 +19785,13 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.list" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse.Ser -// verResponse.Header or (if a response was returned at all) in +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse.ServerR +// esponse.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 *ProjectsLocationsSecurityGatewaysListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18056,7 +19810,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18072,7 +19826,7 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Do(opts ...googleapi.CallOpt // 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 *ProjectsLocationsSecurityGatewaysListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse) error) error { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18090,22 +19844,20 @@ func (c *ProjectsLocationsSecurityGatewaysListCall) Pages(ctx context.Context, f } } -type ProjectsLocationsSecurityGatewaysPatchCall struct { - s *Service - name string - googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysHubsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single SecurityGateway. +// Delete: Deletes a single Hub. // -// - name: Identifier. Name of the resource. -func (r *ProjectsLocationsSecurityGatewaysService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway) *ProjectsLocationsSecurityGatewaysPatchCall { - c := &ProjectsLocationsSecurityGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsSecurityGatewaysHubsService) Delete(name string) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { + c := &ProjectsLocationsSecurityGatewaysHubsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway = googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway return c } @@ -18114,59 +19866,56 @@ func (r *ProjectsLocationsSecurityGatewaysService) Patch(name string, googleclou // your request, the server will know to ignore the request if it has already // been completed. The server will guarantee that for at least 60 minutes after // the first request. For example, consider a situation where you make an -// initial request and the request timed out. If you make the request again +// 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 *ProjectsLocationsSecurityGatewaysPatchCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysPatchCall { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mutable -// fields include: display_name, gateway_regions. -func (c *ProjectsLocationsSecurityGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSecurityGatewaysPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// ValidateOnly sets the optional parameter "validateOnly": If set, validates +// request by executing a dry-run which would not alter the resource in any +// way. +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 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 *ProjectsLocationsSecurityGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysPatchCall { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysPatchCall { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { 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 *ProjectsLocationsSecurityGatewaysPatchCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasecuritygateway) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -18177,13 +19926,13 @@ func (c *ProjectsLocationsSecurityGatewaysPatchCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.patch" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.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 *ProjectsLocationsSecurityGatewaysPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18215,81 +19964,85 @@ func (c *ProjectsLocationsSecurityGatewaysPatchCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsSecurityGatewaysSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysHubsGetCall struct { + s *Service + name 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. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +// Get: Gets details of a single Hub. // -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsSecurityGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { - c := &ProjectsLocationsSecurityGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The resource name of the Hub using the form: +// `projects/{project_id}/locations/global/securityGateway/{security_gateway_i +// d}/hubs/{hub_id}`. +func (r *ProjectsLocationsSecurityGatewaysHubsService) Get(name string) *ProjectsLocationsSecurityGatewaysHubsGetCall { + c := &ProjectsLocationsSecurityGatewaysHubsGetCall{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 *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsGetCall { 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 *ProjectsLocationsSecurityGatewaysHubsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysHubsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsGetCall { 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 *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.setIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub.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 *ProjectsLocationsSecurityGatewaysHubsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18308,7 +20061,7 @@ func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18321,84 +20074,120 @@ func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsSecurityGatewaysTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysHubsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// List: Lists Hubs in a given project and location. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsSecurityGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { - c := &ProjectsLocationsSecurityGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The parent location to which the resources belong. +// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ +// id}`. +func (r *ProjectsLocationsSecurityGatewaysHubsService) List(parent string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c := &ProjectsLocationsSecurityGatewaysHubsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter specifying constraints +// of a list operation. All fields in the Hub message are supported. For +// example, the following query will return the Hub with displayName "test-hub" +// For more information, please refer to https://google.aip.dev/160. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering of +// results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) for +// more information. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If not specified, a default value of 50 will be used by the +// service. Regardless of the page_size value, the response may include a +// partial list and a caller should only rely on response's next_page_token to +// determine if there are more instances left to be queried. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous ListHubsRequest, if any. +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsListCall { 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 *ProjectsLocationsSecurityGatewaysHubsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysHubsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsListCall { 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 *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsSecurityGatewaysHubsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/hubs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.testIamPermissions" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse.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 *ProjectsLocationsSecurityGatewaysHubsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18417,7 +20206,7 @@ func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18429,3 +20218,24 @@ func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...goo } 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 *ProjectsLocationsSecurityGatewaysHubsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse) 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) + } +} diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index b6a49ff9ee8..e9e70c49ec6 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1935,7 +1935,7 @@ } } }, - "revision": "20240727", + "revision": "20240815", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3076,6 +3076,17 @@ }, "type": "object" }, + "DataPolicyOption": { + "description": "Data policy option proto, it currently supports name only, will support precedence later.", + "id": "DataPolicyOption", + "properties": { + "name": { + "description": "Data policy resource name in the form of projects/project_id/locations/location_id/dataPolicies/data_policy_id.", + "type": "string" + } + }, + "type": "object" + }, "DataSplitResult": { "description": "Data split result. This contains references to the training and evaluation data tables that were used to train the model.", "id": "DataSplitResult", @@ -4574,35 +4585,6 @@ }, "type": "object" }, - "IdentityColumnInfo": { - "description": "Metadata for value generation for an identity column.", - "id": "IdentityColumnInfo", - "properties": { - "generatedMode": { - "description": "Optional. Dictates when system generated values are used to populate the field.", - "enum": [ - "GENERATED_MODE_UNSPECIFIED", - "GENERATED_ALWAYS", - "GENERATED_BY_DEFAULT" - ], - "enumDescriptions": [ - "Unspecified GeneratedMode will default to GENERATED_ALWAYS.", - "Field can only have system generated values. Users cannot manually insert values into the field.", - "Use system generated values only if the user does not explicitly provide a value." - ], - "type": "string" - }, - "increment": { - "description": "Optional. The minimum difference between two successive generated values. Should be INTEGER compatible. Can be negative or positive but not 0. The default value is 1 if the field is not specified.", - "type": "string" - }, - "start": { - "description": "Optional. The first generated value. Should be INTEGER compatible. The default value is 1 if the field is not specified.", - "type": "string" - } - }, - "type": "object" - }, "IndexUnusedReason": { "description": "Reason about why no search index was used in the search query (or sub-query).", "id": "IndexUnusedReason", @@ -4828,7 +4810,7 @@ }, "jobCreationReason": { "$ref": "JobCreationReason", - "description": "Output only. If set, it provides the reason why a Job was created. If not set, it should be treated as the default: REQUESTED. This feature is not yet available. Jobs will always be created.", + "description": "Output only. The reason why a Job was created. [Preview](/products/#product-launch-stages)", "readOnly": true }, "jobReference": { @@ -5388,7 +5370,7 @@ "type": "object" }, "JobCreationReason": { - "description": "Reason about why a Job was created from a [`jobs.query`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method when used with `JOB_CREATION_OPTIONAL` Job creation mode. For [`jobs.insert`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) method calls it will always be `REQUESTED`. This feature is not yet available. Jobs will always be created.", + "description": "Reason about why a Job was created from a [`jobs.query`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method when used with `JOB_CREATION_OPTIONAL` Job creation mode. For [`jobs.insert`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) method calls it will always be `REQUESTED`. [Preview](/products/#product-launch-stages)", "id": "JobCreationReason", "properties": { "code": { @@ -7127,7 +7109,7 @@ "description": "Optional. Output format adjustments." }, "jobCreationMode": { - "description": "Optional. If not set, jobs are always required. If set, the query request will follow the behavior described JobCreationMode. This feature is not yet available. Jobs will always be created.", + "description": "Optional. If not set, jobs are always required. If set, the query request will follow the behavior described JobCreationMode. [Preview](/products/#product-launch-stages)", "enum": [ "JOB_CREATION_MODE_UNSPECIFIED", "JOB_CREATION_REQUIRED", @@ -7234,11 +7216,11 @@ }, "jobCreationReason": { "$ref": "JobCreationReason", - "description": "Optional. Only relevant when a job_reference is present in the response. If job_reference is not present it will always be unset. When job_reference is present, this field should be interpreted as follows: If set, it will provide the reason of why a Job was created. If not set, it should be treated as the default: REQUESTED. This feature is not yet available. Jobs will always be created." + "description": "Optional. The reason why a Job was created. Only relevant when a job_reference is present in the response. If job_reference is not present it will always be unset. [Preview](/products/#product-launch-stages)" }, "jobReference": { "$ref": "JobReference", - "description": "Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults)." + "description": "Reference to the Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). If job_creation_mode was set to `JOB_CREATION_OPTIONAL` and the query completes without creating a job, this field will be empty." }, "kind": { "default": "bigquery#queryResponse", @@ -7256,7 +7238,7 @@ "type": "string" }, "queryId": { - "description": "Query ID for the completed query. This ID will be auto-generated. This field is not yet available and it is currently not guaranteed to be populated.", + "description": "Auto-generated ID for the query. [Preview](/products/#product-launch-stages)", "type": "string" }, "rows": { @@ -8170,7 +8152,7 @@ "type": "object" }, "StandardSqlDataType": { - "description": "The data type of a variable such as a function argument. Examples include: * INT64: `{\"typeKind\": \"INT64\"}` * ARRAY: { \"typeKind\": \"ARRAY\", \"arrayElementType\": {\"typeKind\": \"STRING\"} } * STRUCT\u003e: { \"typeKind\": \"STRUCT\", \"structType\": { \"fields\": [ { \"name\": \"x\", \"type\": {\"typeKind\": \"STRING\"} }, { \"name\": \"y\", \"type\": { \"typeKind\": \"ARRAY\", \"arrayElementType\": {\"typeKind\": \"DATE\"} } } ] } }", + "description": "The data type of a variable such as a function argument. Examples include: * INT64: `{\"typeKind\": \"INT64\"}` * ARRAY: { \"typeKind\": \"ARRAY\", \"arrayElementType\": {\"typeKind\": \"STRING\"} } * STRUCT\u003e: { \"typeKind\": \"STRUCT\", \"structType\": { \"fields\": [ { \"name\": \"x\", \"type\": {\"typeKind\": \"STRING\"} }, { \"name\": \"y\", \"type\": { \"typeKind\": \"ARRAY\", \"arrayElementType\": {\"typeKind\": \"DATE\"} } } ] } } * RANGE: { \"typeKind\": \"RANGE\", \"rangeElementType\": {\"typeKind\": \"DATE\"} }", "id": "StandardSqlDataType", "properties": { "arrayElementType": { @@ -8839,6 +8821,13 @@ "description": "Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.", "type": "string" }, + "dataPolicies": { + "description": "Optional. Data policy options, will replace the data_policies.", + "items": { + "$ref": "DataPolicyOption" + }, + "type": "array" + }, "defaultValueExpression": { "description": "Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field.", "type": "string" @@ -8858,10 +8847,6 @@ "description": "Optional. Definition of the foreign data type. Only valid for top-level schema fields (not nested fields). If the type is FOREIGN, this field is required.", "type": "string" }, - "identityColumnInfo": { - "$ref": "IdentityColumnInfo", - "description": "Optional. Definition of how values are generated for the field. Setting this option means that the field is an identity column. Only valid for top-level schema INTEGER fields (not nested fields)." - }, "maxLength": { "description": "Optional. Maximum length of values of this field for STRINGS or BYTES. If max_length is not specified, no maximum length constraint is imposed on this field. If type = \"STRING\", then max_length represents the maximum UTF-8 length of strings in this field. If type = \"BYTES\", then max_length represents the maximum number of bytes in this field. It is invalid to set this field if type ≠ \"STRING\" and ≠ \"BYTES\".", "format": "int64", @@ -8923,7 +8908,7 @@ "type": "string" }, "type": { - "description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE ([Preview](/products/#product-launch-stages)) Use of RECORD/STRUCT indicates that the field contains a nested schema.", + "description": "Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field contains a nested schema.", "type": "string" } }, diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index a62207a9c8f..82d41a7a90f 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -1900,6 +1900,30 @@ func (s DataMaskingStatistics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DataPolicyOption: Data policy option proto, it currently supports name only, +// will support precedence later. +type DataPolicyOption struct { + // Name: Data policy resource name in the form of + // projects/project_id/locations/location_id/dataPolicies/data_policy_id. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 DataPolicyOption) MarshalJSON() ([]byte, error) { + type NoMethod DataPolicyOption + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DataSplitResult: Data split result. This contains references to the training // and evaluation data tables that were used to train the model. type DataSplitResult struct { @@ -3874,44 +3898,6 @@ func (s *HparamTuningTrial) UnmarshalJSON(data []byte) error { return nil } -// IdentityColumnInfo: Metadata for value generation for an identity column. -type IdentityColumnInfo struct { - // GeneratedMode: Optional. Dictates when system generated values are used to - // populate the field. - // - // Possible values: - // "GENERATED_MODE_UNSPECIFIED" - Unspecified GeneratedMode will default to - // GENERATED_ALWAYS. - // "GENERATED_ALWAYS" - Field can only have system generated values. Users - // cannot manually insert values into the field. - // "GENERATED_BY_DEFAULT" - Use system generated values only if the user does - // not explicitly provide a value. - GeneratedMode string `json:"generatedMode,omitempty"` - // Increment: Optional. The minimum difference between two successive generated - // values. Should be INTEGER compatible. Can be negative or positive but not 0. - // The default value is 1 if the field is not specified. - Increment string `json:"increment,omitempty"` - // Start: Optional. The first generated value. Should be INTEGER compatible. - // The default value is 1 if the field is not specified. - Start string `json:"start,omitempty"` - // ForceSendFields is a list of field names (e.g. "GeneratedMode") 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. "GeneratedMode") 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 IdentityColumnInfo) MarshalJSON() ([]byte, error) { - type NoMethod IdentityColumnInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // IndexUnusedReason: Reason about why no search index was used in the search // query (or sub-query). type IndexUnusedReason struct { @@ -4203,9 +4189,8 @@ type Job struct { Etag string `json:"etag,omitempty"` // Id: Output only. Opaque ID field of the job. Id string `json:"id,omitempty"` - // JobCreationReason: Output only. If set, it provides the reason why a Job was - // created. If not set, it should be treated as the default: REQUESTED. This - // feature is not yet available. Jobs will always be created. + // JobCreationReason: Output only. The reason why a Job was created. Preview + // (/products/#product-launch-stages) JobCreationReason *JobCreationReason `json:"jobCreationReason,omitempty"` // JobReference: Optional. Reference describing the unique-per-user name of the // job. @@ -4908,8 +4893,8 @@ func (s JobConfigurationTableCopy) MarshalJSON() ([]byte, error) { // (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method // when used with `JOB_CREATION_OPTIONAL` Job creation mode. For `jobs.insert` // (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) -// method calls it will always be `REQUESTED`. This feature is not yet -// available. Jobs will always be created. +// method calls it will always be `REQUESTED`. Preview +// (/products/#product-launch-stages) type JobCreationReason struct { // Code: Output only. Specifies the high level reason why a Job was created. // @@ -6914,8 +6899,8 @@ type QueryRequest struct { // FormatOptions: Optional. Output format adjustments. FormatOptions *DataFormatOptions `json:"formatOptions,omitempty"` // JobCreationMode: Optional. If not set, jobs are always required. If set, the - // query request will follow the behavior described JobCreationMode. This - // feature is not yet available. Jobs will always be created. + // query request will follow the behavior described JobCreationMode. Preview + // (/products/#product-launch-stages) // // Possible values: // "JOB_CREATION_MODE_UNSPECIFIED" - If unspecified JOB_CREATION_REQUIRED is @@ -7042,18 +7027,17 @@ type QueryResponse struct { // are present, this will always be true. If this is false, totalRows will not // be available. JobComplete bool `json:"jobComplete,omitempty"` - // JobCreationReason: Optional. Only relevant when a job_reference is present - // in the response. If job_reference is not present it will always be unset. - // When job_reference is present, this field should be interpreted as follows: - // If set, it will provide the reason of why a Job was created. If not set, it - // should be treated as the default: REQUESTED. This feature is not yet - // available. Jobs will always be created. + // JobCreationReason: Optional. The reason why a Job was created. Only relevant + // when a job_reference is present in the response. If job_reference is not + // present it will always be unset. Preview (/products/#product-launch-stages) JobCreationReason *JobCreationReason `json:"jobCreationReason,omitempty"` // JobReference: Reference to the Job that was created to run the query. This // field will be present even if the original request timed out, in which case // GetQueryResults can be used to read the results once the query has // completed. Since this API only returns the first page of results, subsequent - // pages can be fetched via the same mechanism (GetQueryResults). + // pages can be fetched via the same mechanism (GetQueryResults). If + // job_creation_mode was set to `JOB_CREATION_OPTIONAL` and the query completes + // without creating a job, this field will be empty. JobReference *JobReference `json:"jobReference,omitempty"` // Kind: The resource type. Kind string `json:"kind,omitempty"` @@ -7067,9 +7051,8 @@ type QueryResponse struct { // method. For more information, see Paging through table data // (https://cloud.google.com/bigquery/docs/paging-results). PageToken string `json:"pageToken,omitempty"` - // QueryId: Query ID for the completed query. This ID will be auto-generated. - // This field is not yet available and it is currently not guaranteed to be - // populated. + // QueryId: Auto-generated ID for the query. Preview + // (/products/#product-launch-stages) QueryId string `json:"queryId,omitempty"` // Rows: An object with as many results as can be contained within the maximum // permitted reply size. To get any additional rows, you can call @@ -8230,7 +8213,8 @@ func (s StagePerformanceStandaloneInsight) MarshalJSON() ([]byte, error) { // "typeKind": "ARRAY", "arrayElementType": {"typeKind": "STRING"} } * STRUCT>: // { "typeKind": "STRUCT", "structType": { "fields": [ { "name": "x", "type": // {"typeKind": "STRING"} }, { "name": "y", "type": { "typeKind": "ARRAY", -// "arrayElementType": {"typeKind": "DATE"} } } ] } } +// "arrayElementType": {"typeKind": "DATE"} } } ] } } * RANGE: { "typeKind": +// "RANGE", "rangeElementType": {"typeKind": "DATE"} } type StandardSqlDataType struct { // ArrayElementType: The type of the array's elements, if type_kind = "ARRAY". ArrayElementType *StandardSqlDataType `json:"arrayElementType,omitempty"` @@ -8994,6 +8978,8 @@ type TableFieldSchema struct { // locale, case insensitive. * '': empty string. Default to case-sensitive // behavior. Collation string `json:"collation,omitempty"` + // DataPolicies: Optional. Data policy options, will replace the data_policies. + DataPolicies []*DataPolicyOption `json:"dataPolicies,omitempty"` // DefaultValueExpression: Optional. A SQL expression to specify the [default // value] (https://cloud.google.com/bigquery/docs/default-values) for this // field. @@ -9008,10 +8994,6 @@ type TableFieldSchema struct { // valid for top-level schema fields (not nested fields). If the type is // FOREIGN, this field is required. ForeignTypeDefinition string `json:"foreignTypeDefinition,omitempty"` - // IdentityColumnInfo: Optional. Definition of how values are generated for the - // field. Setting this option means that the field is an identity column. Only - // valid for top-level schema INTEGER fields (not nested fields). - IdentityColumnInfo *IdentityColumnInfo `json:"identityColumnInfo,omitempty"` // MaxLength: Optional. Maximum length of values of this field for STRINGS or // BYTES. If max_length is not specified, no maximum length constraint is // imposed on this field. If type = "STRING", then max_length represents the @@ -9069,8 +9051,8 @@ type TableFieldSchema struct { // Type: Required. The field data type. Possible values include: * STRING * // BYTES * INTEGER (or INT64) * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * // TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * NUMERIC * BIGNUMERIC * JSON - // * RECORD (or STRUCT) * RANGE (Preview (/products/#product-launch-stages)) - // Use of RECORD/STRUCT indicates that the field contains a nested schema. + // * RECORD (or STRUCT) * RANGE Use of RECORD/STRUCT indicates that the field + // contains a nested schema. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Categories") to // unconditionally include in API requests. By default, fields with empty or diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index e2107c9aa05..2b0bed11f4a 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -2194,7 +2194,7 @@ } } }, - "revision": "20240720", + "revision": "20240806", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2375,6 +2375,20 @@ "description": "A backup of a Cloud Bigtable table.", "id": "Backup", "properties": { + "backupType": { + "description": "Indicates the backup type of the backup.", + "enum": [ + "BACKUP_TYPE_UNSPECIFIED", + "STANDARD", + "HOT" + ], + "enumDescriptions": [ + "Not specified.", + "The default type for Cloud Bigtable managed backups. Supported for backups created in both HDD and SSD instances. Requires optimization when restored to a table in an SSD instance.", + "A backup type with faster restore to SSD performance. Only supported for backups created in SSD instances. A new SSD table restored from a hot backup reaches production performance more quickly than a standard backup." + ], + "type": "string" + }, "encryptionInfo": { "$ref": "EncryptionInfo", "description": "Output only. The encryption information for the backup.", @@ -2387,7 +2401,12 @@ "type": "string" }, "expireTime": { - "description": "Required. The expiration time of the backup. When creating a backup or updating its `expire_time`, the new value must: - Be at most 90 days in the future - Be at least 6 hours in the future Once the `expire_time` has passed, Cloud Bigtable will delete the backup.", + "description": "Required. The expiration time of the backup. When creating a backup or updating its `expire_time`, the value must be greater than the backup creation time by: - At least 6 hours - At most 90 days Once the `expire_time` has passed, Cloud Bigtable will delete the backup.", + "format": "google-datetime", + "type": "string" + }, + "hotToStandardTime": { + "description": "The time at which the hot backup will be converted to a standard backup. Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the hot backup to a standard backup. This value must be greater than the backup creation time by: - At least 24 hours This field only applies for hot backups. When creating or updating a standard backup, attempting to set this field will fail the request.", "format": "google-datetime", "type": "string" }, diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index ef60a791e61..b38db5571cd 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -591,16 +591,35 @@ func (s AutoscalingTargets) MarshalJSON() ([]byte, error) { // Backup: A backup of a Cloud Bigtable table. type Backup struct { + // BackupType: Indicates the backup type of the backup. + // + // Possible values: + // "BACKUP_TYPE_UNSPECIFIED" - Not specified. + // "STANDARD" - The default type for Cloud Bigtable managed backups. + // Supported for backups created in both HDD and SSD instances. Requires + // optimization when restored to a table in an SSD instance. + // "HOT" - A backup type with faster restore to SSD performance. Only + // supported for backups created in SSD instances. A new SSD table restored + // from a hot backup reaches production performance more quickly than a + // standard backup. + BackupType string `json:"backupType,omitempty"` // EncryptionInfo: Output only. The encryption information for the backup. EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` // EndTime: Output only. `end_time` is the time that the backup was finished. // The row data in the backup will be no newer than this timestamp. EndTime string `json:"endTime,omitempty"` // ExpireTime: Required. The expiration time of the backup. When creating a - // backup or updating its `expire_time`, the new value must: - Be at most 90 - // days in the future - Be at least 6 hours in the future Once the + // backup or updating its `expire_time`, the value must be greater than the + // backup creation time by: - At least 6 hours - At most 90 days Once the // `expire_time` has passed, Cloud Bigtable will delete the backup. ExpireTime string `json:"expireTime,omitempty"` + // HotToStandardTime: The time at which the hot backup will be converted to a + // standard backup. Once the `hot_to_standard_time` has passed, Cloud Bigtable + // will convert the hot backup to a standard backup. This value must be greater + // than the backup creation time by: - At least 24 hours This field only + // applies for hot backups. When creating or updating a standard backup, + // attempting to set this field will fail the request. + HotToStandardTime string `json:"hotToStandardTime,omitempty"` // Name: A globally unique identifier for the backup which cannot be changed. // Values are of the form // `projects/{project}/instances/{instance}/clusters/{cluster}/ @@ -634,15 +653,15 @@ type Backup struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EncryptionInfo") to + // ForceSendFields is a list of field names (e.g. "BackupType") 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. "EncryptionInfo") 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. "BackupType") 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:"-"` } diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index d566681f254..c1bf373c59e 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -318,6 +318,11 @@ "pattern": "^spaces/[^/]+$", "required": true, "type": "string" + }, + "useAdminAccess": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.delete` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -368,6 +373,11 @@ "pattern": "^spaces/[^/]+$", "required": true, "type": "string" + }, + "useAdminAccess": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -437,6 +447,11 @@ "format": "google-fieldmask", "location": "query", "type": "string" + }, + "useAdminAccess": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Some `FieldMask` values are not supported using admin access. For details, see the description of `update_mask`.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -452,6 +467,49 @@ "https://www.googleapis.com/auth/chat.spaces" ] }, + "search": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). Returns a list of spaces based on a user's search. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). The user must be an administrator for the Google Workspace organization. In the request, set `use_admin_access` to `true`.", + "flatPath": "v1/spaces:search", + "httpMethod": "GET", + "id": "chat.spaces.search", + "parameterOrder": [], + "parameters": { + "orderBy": { + "description": "Optional. How the list of spaces is ordered. Supported attributes to order by are: - `membership_count.joined_direct_human_user_count` — Denotes the count of human users that have directly joined a space. - `last_active_time` — Denotes the time when last eligible item is added to any topic of this space. - `create_time` — Denotes the time of the space creation. Valid ordering operation values are: - `ASC` for ascending. Default value. - `DESC` for descending. The supported syntax are: - `membership_count.joined_direct_human_user_count DESC` - `membership_count.joined_direct_human_user_count ASC` - `last_active_time DESC` - `last_active_time ASC` - `create_time DESC` - `create_time ASC`", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.", + "location": "query", + "type": "string" + }, + "query": { + "description": "Required. A search query. You can search by using the following parameters: - `create_time` - `customer` - `display_name` - `external_user_allowed` - `last_active_time` - `space_history_state` - `space_type` `create_time` and `last_active_time` accept a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported comparison operators are: `=`, `\u003c`, `\u003e`, `\u003c=`, `\u003e=`. `customer` is required and is used to indicate which customer to fetch spaces from. `customers/my_customer` is the only supported value. `display_name` only accepts the `HAS` (`:`) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space's `display_name`. For example, `Fun Eve` matches `Fun event` or `The evening was fun`, but not `notFun event` or `even`. `external_user_allowed` accepts either `true` or `false`. `space_history_state` only accepts values from the [`historyState`] (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) field of a `space` resource. `space_type` is required and the only valid value is `SPACE`. Across different fields, only `AND` operators are supported. A valid example is `space_type = \"SPACE\" AND display_name:\"Hello\"` and an invalid example is `space_type = \"SPACE\" OR display_name:\"Hello\"`. Among the same field, `space_type` doesn't support `AND` or `OR` operators. `display_name`, 'space_history_state', and 'external_user_allowed' only support `OR` operators. `last_active_time` and `create_time` support both `AND` and `OR` operators. `AND` can only be used to represent an interval, such as `last_active_time \u003c \"2022-01-01T00:00:00+00:00\" AND last_active_time \u003e \"2023-01-01T00:00:00+00:00\"`. The following example queries are valid: ``` customer = \"customers/my_customer\" AND space_type = \"SPACE\" customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND display_name:\"Hello World\" customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (last_active_time \u003c \"2020-01-01T00:00:00+00:00\" OR last_active_time \u003e \"2022-01-01T00:00:00+00:00\") customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (display_name:\"Hello World\" OR display_name:\"Fun event\") AND (last_active_time \u003e \"2020-01-01T00:00:00+00:00\" AND last_active_time \u003c \"2022-01-01T00:00:00+00:00\") customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (create_time \u003e \"2019-01-01T00:00:00+00:00\" AND create_time \u003c \"2020-01-01T00:00:00+00:00\") AND (external_user_allowed = \"true\") AND (space_history_state = \"HISTORY_ON\" OR space_history_state = \"HISTORY_OFF\") ```", + "location": "query", + "type": "string" + }, + "useAdminAccess": { + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). This method currently only supports admin access, thus only `true` is accepted for this field.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/spaces:search", + "response": { + "$ref": "SearchSpacesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chat.admin.spaces", + "https://www.googleapis.com/auth/chat.admin.spaces.readonly" + ] + }, "setup": { "description": "Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). To specify the human members to add, add memberships with the appropriate `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. To specify the Google groups to add, add memberships with the appropriate `membership.group_member.name`. To add or invite a Google group, use `groups/{group}`, where `{group}` is the `id` for the group from the Cloud Identity Groups API. For example, you can use [Cloud Identity Groups lookup API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) to retrieve the ID `123456789` for group email `group@example.com`, then you can add the group to the space by setting the `membership.group_member.name` to `groups/123456789`. Group email is not supported, and Google groups can only be added as members in named spaces. For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [Invite or add a user or app to a space](https://developers.google.com/workspace/chat/create-members). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "flatPath": "v1/spaces:setup", @@ -476,7 +534,7 @@ "members": { "methods": { "create": { - "description": "Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [Invite or add a user or a Google Chat app to a space](https://developers.google.com/workspace/chat/create-members). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To specify the member to add, set the `membership.member.name` for the human or app member, or set the `membership.group_member.name` for the group member. - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. - To add or invite a Google group in a named space, use `groups/{group}`, where `{group}` is the `id` for the group from the Cloud Identity Groups API. For example, you can use [Cloud Identity Groups lookup API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) to retrieve the ID `123456789` for group email `group@example.com`, then you can add or invite the group to a named space by setting the `membership.group_member.name` to `groups/123456789`. Group email is not supported, and Google groups can only be added as members in named spaces.", + "description": "Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other Chat apps isn't supported. When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). For example usage, see: - [Invite or add a user to a space](https://developers.google.com/workspace/chat/create-members#create-user-membership). - [Invite or add a Google Group to a space](https://developers.google.com/workspace/chat/create-members#create-group-membership). - [Add the Chat app to a space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api).", "flatPath": "v1/spaces/{spacesId}/members", "httpMethod": "POST", "id": "chat.spaces.members.create", @@ -490,6 +548,11 @@ "pattern": "^spaces/[^/]+$", "required": true, "type": "string" + }, + "useAdminAccess": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Creating app memberships or creating memberships for users outside the administrator's Google Workspace organization isn't supported using admin access.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+parent}/members", @@ -521,6 +584,11 @@ "pattern": "^spaces/[^/]+/members/[^/]+$", "required": true, "type": "string" + }, + "useAdminAccess": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Deleting app memberships in a space isn't supported using admin access.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -549,6 +617,11 @@ "pattern": "^spaces/[^/]+/members/[^/]+$", "required": true, "type": "string" + }, + "useAdminAccess": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Getting app memberships in a space isn't supported when using admin access.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -604,6 +677,11 @@ "description": "Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "location": "query", "type": "boolean" + }, + "useAdminAccess": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.memberships.readonly` or `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Listing app memberships in a space isn't supported when using admin access.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+parent}/members", @@ -640,6 +718,11 @@ "format": "google-fieldmask", "location": "query", "type": "string" + }, + "useAdminAccess": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", + "location": "query", + "type": "boolean" } }, "path": "v1/{+name}", @@ -781,7 +864,7 @@ ] }, "list": { - "description": "Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", + "description": "Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, `{}`. For an example, see [List messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "flatPath": "v1/spaces/{spacesId}/messages", "httpMethod": "GET", "id": "chat.spaces.messages.list", @@ -1241,7 +1324,7 @@ } } }, - "revision": "20240804", + "revision": "20240818", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { @@ -1862,7 +1945,7 @@ "description": "Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes information submitted by users interacting with [dialogs](https://developers.google.com/workspace/chat/dialogs), like data entered on a card." }, "configCompleteRedirectUrl": { - "description": "The URL the Chat app should redirect the user to after they have completed an authorization or configuration flow outside of Google Chat. For more information, see [Connect a Chat app with other services \u0026 tools](https://developers.google.com/workspace/chat/connect-web-services-tools).", + "description": "For `MESSAGE` interaction events, the URL that users must be redirected to after they complete an authorization or configuration flow outside of Google Chat. For more information, see [Connect a Chat app with other services and tools](https://developers.google.com/workspace/chat/connect-web-services-tools).", "type": "string" }, "dialogEventType": { @@ -2227,8 +2310,8 @@ ], "enumDescriptions": [ "Don't use. Unspecified.", - "Default option. Render a solid divider between sections.", - "If set, no divider is rendered between sections." + "Default option. Render a solid divider.", + "If set, no divider is rendered. This style completely removes the divider from the layout. The result is equivalent to not adding a divider at all." ], "type": "string" }, @@ -2754,7 +2837,7 @@ }, "hostAppDataSource": { "$ref": "HostAppDataSourceMarkup", - "description": "A data source that's unique to a Google Workspace host application, such spaces in Google Chat." + "description": "A data source that's unique to a Google Workspace host application, such spaces in Google Chat. This field supports the Google API Client Libraries but isn't available in the Cloud Client Libraries. To learn more, see [Install the client libraries](https://developers.google.com/workspace/chat/libraries)." } }, "type": "object" @@ -3571,6 +3654,23 @@ }, "type": "object" }, + "MembershipCount": { + "description": "[Developer Preview](https://developers.google.com/workspace/preview). Represents the count of memberships of a space, grouped into categories.", + "id": "MembershipCount", + "properties": { + "joinedDirectHumanUserCount": { + "description": "Count of human users that have directly joined the space, not counting users joined by having membership in a joined group.", + "format": "int32", + "type": "integer" + }, + "joinedGroupCount": { + "description": "Count of all groups that have directly joined the space.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "MembershipCreatedEventData": { "description": "Event payload for a new membership. Event type: `google.workspace.chat.membership.v1.created`.", "id": "MembershipCreatedEventData", @@ -3969,6 +4069,29 @@ }, "type": "object" }, + "SearchSpacesResponse": { + "description": "Response with a list of spaces corresponding to the search spaces request.", + "id": "SearchSpacesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages.", + "type": "string" + }, + "spaces": { + "description": "A page of the requested spaces.", + "items": { + "$ref": "Space" + }, + "type": "array" + }, + "totalSize": { + "description": "The total number of spaces that match the query, across all pages. If the result is over 10,000 spaces, this value is an estimate.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "Section": { "description": "A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there's currently no need for layout properties (for example, float).", "id": "Section", @@ -4103,6 +4226,17 @@ "description": "Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete.", "type": "boolean" }, + "lastActiveTime": { + "description": "Output only. Timestamp of the last message in the space. [Developer Preview](https://developers.google.com/workspace/preview).", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "membershipCount": { + "$ref": "MembershipCount", + "description": "Output only. The count of joined memberships grouped by member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or `GROUP_CHAT`. [Developer Preview](https://developers.google.com/workspace/preview).", + "readOnly": true + }, "name": { "description": "Resource name of the space. Format: `spaces/{space}`", "type": "string" @@ -4422,7 +4556,7 @@ "id": "Thread", "properties": { "name": { - "description": "Output only. Resource name of the thread. Example: `spaces/{space}/threads/{thread}`", + "description": "Resource name of the thread. Example: `spaces/{space}/threads/{thread}`", "type": "string" }, "threadKey": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 0f9c0590608..3ce0d33696f 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -1296,10 +1296,10 @@ type DeprecatedEvent struct { // (https://developers.google.com/workspace/chat/dialogs), like data entered on // a card. Common *CommonEventObject `json:"common,omitempty"` - // ConfigCompleteRedirectUrl: The URL the Chat app should redirect the user to - // after they have completed an authorization or configuration flow outside of - // Google Chat. For more information, see Connect a Chat app with other - // services & tools + // ConfigCompleteRedirectUrl: For `MESSAGE` interaction events, the URL that + // users must be redirected to after they complete an authorization or + // configuration flow outside of Google Chat. For more information, see Connect + // a Chat app with other services and tools // (https://developers.google.com/workspace/chat/connect-web-services-tools). ConfigCompleteRedirectUrl string `json:"configCompleteRedirectUrl,omitempty"` // DialogEventType: The type of dialog @@ -1888,8 +1888,10 @@ type GoogleAppsCardV1Card struct { // // Possible values: // "DIVIDER_STYLE_UNSPECIFIED" - Don't use. Unspecified. - // "SOLID_DIVIDER" - Default option. Render a solid divider between sections. - // "NO_DIVIDER" - If set, no divider is rendered between sections. + // "SOLID_DIVIDER" - Default option. Render a solid divider. + // "NO_DIVIDER" - If set, no divider is rendered. This style completely + // removes the divider from the layout. The result is equivalent to not adding + // a divider at all. SectionDividerStyle string `json:"sectionDividerStyle,omitempty"` // Sections: Contains a collection of widgets. Each section has its own, // optional header. Sections are visually separated by a line divider. For an @@ -2654,7 +2656,10 @@ type GoogleAppsCardV1PlatformDataSource struct { // from their Google Workspace organization. CommonDataSource string `json:"commonDataSource,omitempty"` // HostAppDataSource: A data source that's unique to a Google Workspace host - // application, such spaces in Google Chat. + // application, such spaces in Google Chat. This field supports the Google API + // Client Libraries but isn't available in the Cloud Client Libraries. To learn + // more, see Install the client libraries + // (https://developers.google.com/workspace/chat/libraries). HostAppDataSource *HostAppDataSourceMarkup `json:"hostAppDataSource,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonDataSource") to // unconditionally include in API requests. By default, fields with empty or @@ -3834,6 +3839,33 @@ func (s MembershipBatchUpdatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MembershipCount: Developer Preview +// (https://developers.google.com/workspace/preview). Represents the count of +// memberships of a space, grouped into categories. +type MembershipCount struct { + // JoinedDirectHumanUserCount: Count of human users that have directly joined + // the space, not counting users joined by having membership in a joined group. + JoinedDirectHumanUserCount int64 `json:"joinedDirectHumanUserCount,omitempty"` + // JoinedGroupCount: Count of all groups that have directly joined the space. + JoinedGroupCount int64 `json:"joinedGroupCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "JoinedDirectHumanUserCount") + // 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. "JoinedDirectHumanUserCount") 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 MembershipCount) MarshalJSON() ([]byte, error) { + type NoMethod MembershipCount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MembershipCreatedEventData: Event payload for a new membership. Event type: // `google.workspace.chat.membership.v1.created`. type MembershipCreatedEventData struct { @@ -4432,6 +4464,38 @@ func (s RichLinkMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SearchSpacesResponse: Response with a list of spaces corresponding to the +// search spaces request. +type SearchSpacesResponse struct { + // NextPageToken: A token that can be used to retrieve the next page. If this + // field is empty, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Spaces: A page of the requested spaces. + Spaces []*Space `json:"spaces,omitempty"` + // TotalSize: The total number of spaces that match the query, across all + // pages. If the result is over 10,000 spaces, this value is an estimate. + TotalSize int64 `json:"totalSize,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SearchSpacesResponse) MarshalJSON() ([]byte, error) { + type NoMethod SearchSpacesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Section: A section contains a collection of widgets that are rendered // (vertically) in the order that they are specified. Across all platforms, // cards have a narrow fixed width, so there's currently no need for layout @@ -4644,6 +4708,14 @@ type Space struct { // of a data migration into Google Workspace. While spaces are being imported, // they aren't visible to users until the import is complete. ImportMode bool `json:"importMode,omitempty"` + // LastActiveTime: Output only. Timestamp of the last message in the space. + // Developer Preview (https://developers.google.com/workspace/preview). + LastActiveTime string `json:"lastActiveTime,omitempty"` + // MembershipCount: Output only. The count of joined memberships grouped by + // member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or + // `GROUP_CHAT`. Developer Preview + // (https://developers.google.com/workspace/preview). + MembershipCount *MembershipCount `json:"membershipCount,omitempty"` // Name: Resource name of the space. Format: `spaces/{space}` Name string `json:"name,omitempty"` // SingleUserBotDm: Optional. Whether the space is a DM between a Chat app and @@ -5084,7 +5156,7 @@ func (s TextParagraph) MarshalJSON() ([]byte, error) { // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption) // field to determine what happens if no matching thread is found. type Thread struct { - // Name: Output only. Resource name of the thread. Example: + // Name: Resource name of the thread. Example: // `spaces/{space}/threads/{thread}` Name string `json:"name,omitempty"` // ThreadKey: Optional. Input for creating or updating a thread. Otherwise, @@ -5923,6 +5995,19 @@ func (r *SpacesService) Delete(name string) *SpacesDeleteCall { return c } +// UseAdminAccess sets the optional parameter "useAdminAccess": Developer +// Preview (https://developers.google.com/workspace/preview). When `true`, the +// method runs using the user's Google Workspace administrator privileges. The +// calling user must be a Google Workspace administrator with the manage chat +// and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires the +// `chat.admin.delete` OAuth 2.0 scope +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +func (c *SpacesDeleteCall) UseAdminAccess(useAdminAccess bool) *SpacesDeleteCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6157,6 +6242,19 @@ func (r *SpacesService) Get(name string) *SpacesGetCall { return c } +// UseAdminAccess sets the optional parameter "useAdminAccess": Developer +// Preview (https://developers.google.com/workspace/preview). When `true`, the +// method runs using the user's Google Workspace administrator privileges. The +// calling user must be a Google Workspace administrator with the manage chat +// and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires the +// `chat.admin.spaces` or `chat.admin.spaces.readonly` OAuth 2.0 scopes +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +func (c *SpacesGetCall) UseAdminAccess(useAdminAccess bool) *SpacesGetCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6485,6 +6583,21 @@ func (c *SpacesPatchCall) UpdateMask(updateMask string) *SpacesPatchCall { return c } +// UseAdminAccess sets the optional parameter "useAdminAccess": Developer +// Preview (https://developers.google.com/workspace/preview). When `true`, the +// method runs using the user's Google Workspace administrator privileges. The +// calling user must be a Google Workspace administrator with the manage chat +// and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires the +// `chat.admin.spaces` OAuth 2.0 scope +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +// Some `FieldMask` values are not supported using admin access. For details, +// see the description of `update_mask`. +func (c *SpacesPatchCall) UseAdminAccess(useAdminAccess bool) *SpacesPatchCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6567,6 +6680,226 @@ func (c *SpacesPatchCall) Do(opts ...googleapi.CallOption) (*Space, error) { return ret, nil } +type SpacesSearchCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Search: Developer Preview (https://developers.google.com/workspace/preview). +// Returns a list of spaces based on a user's search. Requires user +// authentication +// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). +// The user must be an administrator for the Google Workspace organization. In +// the request, set `use_admin_access` to `true`. +func (r *SpacesService) Search() *SpacesSearchCall { + c := &SpacesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// OrderBy sets the optional parameter "orderBy": How the list of spaces is +// ordered. Supported attributes to order by are: - +// `membership_count.joined_direct_human_user_count` — Denotes the count of +// human users that have directly joined a space. - `last_active_time` — +// Denotes the time when last eligible item is added to any topic of this +// space. - `create_time` — Denotes the time of the space creation. Valid +// ordering operation values are: - `ASC` for ascending. Default value. - +// `DESC` for descending. The supported syntax are: - +// `membership_count.joined_direct_human_user_count DESC` - +// `membership_count.joined_direct_human_user_count ASC` - `last_active_time +// DESC` - `last_active_time ASC` - `create_time DESC` - `create_time ASC` +func (c *SpacesSearchCall) OrderBy(orderBy string) *SpacesSearchCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// spaces to return. The service may return fewer than this value. If +// unspecified, at most 100 spaces are returned. The maximum value is 1000. If +// you use a value more than 1000, it's automatically changed to 1000. +func (c *SpacesSearchCall) PageSize(pageSize int64) *SpacesSearchCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token, received from +// the previous search spaces call. Provide this parameter to retrieve the +// subsequent page. When paginating, all other parameters provided should match +// the call that provided the page token. Passing different values to the other +// parameters might lead to unexpected results. +func (c *SpacesSearchCall) PageToken(pageToken string) *SpacesSearchCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": Required. A search query. You can +// search by using the following parameters: - `create_time` - `customer` - +// `display_name` - `external_user_allowed` - `last_active_time` - +// `space_history_state` - `space_type` `create_time` and `last_active_time` +// accept a timestamp in RFC-3339 (https://www.rfc-editor.org/rfc/rfc3339) +// format and the supported comparison operators are: `=`, `<`, `>`, `<=`, +// `>=`. `customer` is required and is used to indicate which customer to fetch +// spaces from. `customers/my_customer` is the only supported value. +// `display_name` only accepts the `HAS` (`:`) operator. The text to match is +// first tokenized into tokens and each token is prefix-matched +// case-insensitively and independently as a substring anywhere in the space's +// `display_name`. For example, `Fun Eve` matches `Fun event` or `The evening +// was fun`, but not `notFun event` or `even`. `external_user_allowed` accepts +// either `true` or `false`. `space_history_state` only accepts values from the +// [`historyState`] +// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) +// field of a `space` resource. `space_type` is required and the only valid +// value is `SPACE`. Across different fields, only `AND` operators are +// supported. A valid example is `space_type = "SPACE" AND +// display_name:"Hello" and an invalid example is `space_type = "SPACE" OR +// display_name:"Hello". Among the same field, `space_type` doesn't support +// `AND` or `OR` operators. `display_name`, 'space_history_state', and +// 'external_user_allowed' only support `OR` operators. `last_active_time` and +// `create_time` support both `AND` and `OR` operators. `AND` can only be used +// to represent an interval, such as `last_active_time < +// "2022-01-01T00:00:00+00:00" AND last_active_time > +// "2023-01-01T00:00:00+00:00". The following example queries are valid: ``` +// customer = "customers/my_customer" AND space_type = "SPACE" customer = +// "customers/my_customer" AND space_type = "SPACE" AND display_name:"Hello +// World" customer = "customers/my_customer" AND space_type = "SPACE" AND +// (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > +// "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND +// space_type = "SPACE" AND (display_name:"Hello World" OR display_name:"Fun +// event") AND (last_active_time > "2020-01-01T00:00:00+00:00" AND +// last_active_time < "2022-01-01T00:00:00+00:00") customer = +// "customers/my_customer" AND space_type = "SPACE" AND (create_time > +// "2019-01-01T00:00:00+00:00" AND create_time < "2020-01-01T00:00:00+00:00") +// AND (external_user_allowed = "true") AND (space_history_state = "HISTORY_ON" +// OR space_history_state = "HISTORY_OFF") ``` +func (c *SpacesSearchCall) Query(query string) *SpacesSearchCall { + c.urlParams_.Set("query", query) + return c +} + +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires either the +// `chat.admin.spaces.readonly` or `chat.admin.spaces` OAuth 2.0 scope +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +// This method currently only supports admin access, thus only `true` is +// accepted for this field. +func (c *SpacesSearchCall) UseAdminAccess(useAdminAccess bool) *SpacesSearchCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + 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 *SpacesSearchCall) Fields(s ...googleapi.Field) *SpacesSearchCall { + 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 *SpacesSearchCall) IfNoneMatch(entityTag string) *SpacesSearchCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *SpacesSearchCall) Context(ctx context.Context) *SpacesSearchCall { + 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 *SpacesSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SpacesSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/spaces:search") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chat.spaces.search" call. +// Any non-2xx status code is an error. Response headers are in either +// *SearchSpacesResponse.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 *SpacesSearchCall) Do(opts ...googleapi.CallOption) (*SearchSpacesResponse, 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 := &SearchSpacesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *SpacesSearchCall) Pages(ctx context.Context, f func(*SearchSpacesResponse) 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 SpacesSetupCall struct { s *Service setupspacerequest *SetUpSpaceRequest @@ -6708,33 +7041,19 @@ type SpacesMembersCreateCall struct { header_ http.Header } -// Create: Creates a human membership or app membership for the calling app. -// Creating memberships for other apps isn't supported. For an example, see -// Invite or add a user or a Google Chat app to a space -// (https://developers.google.com/workspace/chat/create-members). When creating -// a membership, if the specified member has their auto-accept policy turned -// off, then they're invited, and must accept the space invitation before -// joining. Otherwise, creating a membership adds the member directly to the -// specified space. Requires user authentication +// Create: Creates a membership for the calling Chat app, a user, or a Google +// Group. Creating memberships for other Chat apps isn't supported. When +// creating a membership, if the specified member has their auto-accept policy +// turned off, then they're invited, and must accept the space invitation +// before joining. Otherwise, creating a membership adds the member directly to +// the specified space. Requires user authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). -// To specify the member to add, set the `membership.member.name` for the human -// or app member, or set the `membership.group_member.name` for the group -// member. - To add the calling app to a space or a direct message between two -// human users, use `users/app`. Unable to add other apps to the space. - To -// add a human user, use `users/{user}`, where `{user}` can be the email -// address for the user. For users in the same Workspace organization `{user}` -// can also be the `id` for the person from the People API, or the `id` for the -// user in the Directory API. For example, if the People API Person profile ID -// for `user@example.com` is `123456789`, you can add the user to the space by -// setting the `membership.member.name` to `users/user@example.com` or -// `users/123456789`. - To add or invite a Google group in a named space, use -// `groups/{group}`, where `{group}` is the `id` for the group from the Cloud -// Identity Groups API. For example, you can use Cloud Identity Groups lookup -// API (https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) -// to retrieve the ID `123456789` for group email `group@example.com`, then you -// can add or invite the group to a named space by setting the -// `membership.group_member.name` to `groups/123456789`. Group email is not -// supported, and Google groups can only be added as members in named spaces. +// For example usage, see: - Invite or add a user to a space +// (https://developers.google.com/workspace/chat/create-members#create-user-membership). +// - Invite or add a Google Group to a space +// (https://developers.google.com/workspace/chat/create-members#create-group-membership). +// - Add the Chat app to a space +// (https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). // // - parent: The resource name of the space for which to create the membership. // Format: spaces/{space}. @@ -6745,6 +7064,22 @@ func (r *SpacesMembersService) Create(parent string, membership *Membership) *Sp return c } +// UseAdminAccess sets the optional parameter "useAdminAccess": Developer +// Preview (https://developers.google.com/workspace/preview). When `true`, the +// method runs using the user's Google Workspace administrator privileges. The +// calling user must be a Google Workspace administrator with the manage chat +// and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires the +// `chat.admin.memberships` OAuth 2.0 scope +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +// Creating app memberships or creating memberships for users outside the +// administrator's Google Workspace organization isn't supported using admin +// access. +func (c *SpacesMembersCreateCall) UseAdminAccess(useAdminAccess bool) *SpacesMembersCreateCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6857,6 +7192,20 @@ func (r *SpacesMembersService) Delete(name string) *SpacesMembersDeleteCall { return c } +// UseAdminAccess sets the optional parameter "useAdminAccess": Developer +// Preview (https://developers.google.com/workspace/preview). When `true`, the +// method runs using the user's Google Workspace administrator privileges. The +// calling user must be a Google Workspace administrator with the manage chat +// and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires the +// `chat.admin.memberships` OAuth 2.0 scope +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +// Deleting app memberships in a space isn't supported using admin access. +func (c *SpacesMembersDeleteCall) UseAdminAccess(useAdminAccess bool) *SpacesMembersDeleteCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6970,6 +7319,21 @@ func (r *SpacesMembersService) Get(name string) *SpacesMembersGetCall { return c } +// UseAdminAccess sets the optional parameter "useAdminAccess": Developer +// Preview (https://developers.google.com/workspace/preview). When `true`, the +// method runs using the user's Google Workspace administrator privileges. The +// calling user must be a Google Workspace administrator with the manage chat +// and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires the +// `chat.admin.memberships` or `chat.admin.memberships.readonly` OAuth 2.0 +// scopes +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +// Getting app memberships in a space isn't supported when using admin access. +func (c *SpacesMembersGetCall) UseAdminAccess(useAdminAccess bool) *SpacesMembersGetCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -7155,6 +7519,21 @@ func (c *SpacesMembersListCall) ShowInvited(showInvited bool) *SpacesMembersList return c } +// UseAdminAccess sets the optional parameter "useAdminAccess": Developer +// Preview (https://developers.google.com/workspace/preview). When `true`, the +// method runs using the user's Google Workspace administrator privileges. The +// calling user must be a Google Workspace administrator with the manage chat +// and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires either the +// `chat.admin.memberships.readonly` or `chat.admin.memberships` OAuth 2.0 +// scope +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +// Listing app memberships in a space isn't supported when using admin access. +func (c *SpacesMembersListCall) UseAdminAccess(useAdminAccess bool) *SpacesMembersListCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -7297,6 +7676,19 @@ func (c *SpacesMembersPatchCall) UpdateMask(updateMask string) *SpacesMembersPat return c } +// UseAdminAccess sets the optional parameter "useAdminAccess": Developer +// Preview (https://developers.google.com/workspace/preview). When `true`, the +// method runs using the user's Google Workspace administrator privileges. The +// calling user must be a Google Workspace administrator with the manage chat +// and spaces conversations privilege +// (https://support.google.com/a/answer/13369245). Requires the +// `chat.admin.memberships` OAuth 2.0 scope +// (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). +func (c *SpacesMembersPatchCall) UseAdminAccess(useAdminAccess bool) *SpacesMembersPatchCall { + c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -7796,8 +8188,12 @@ type SpacesMessagesListCall struct { } // List: Lists messages in a space that the caller is a member of, including -// messages from blocked members and spaces. For an example, see List messages -// (/chat/api/guides/v1/messages/list). Requires user authentication +// messages from blocked members and spaces. If you list messages from a space +// with no messages, the response is an empty object. When using a REST/HTTP +// interface, the response contains an empty JSON object, `{}`. For an example, +// see List messages +// (https://developers.google.com/workspace/chat/api/guides/v1/messages/list). +// Requires user authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). // // - parent: The resource name of the space to list messages from. Format: diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index cc0f1d1c886..7668432689c 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -1104,7 +1104,7 @@ "type": "string" }, "readMask": { - "description": "Read mask to specify which fields to return. Supported read_mask paths are: - name - org_unit_id - user_id - user_email - user_device.device_id - user_device.audio_status_report - user_device.device_activity_report - user_device.network_bandwidth_report - user_device.peripherals_report ", + "description": "Read mask to specify which fields to return. Supported read_mask paths are: - name - org_unit_id - user_id - user_email - user_device.device_id - user_device.audio_status_report - user_device.device_activity_report - user_device.network_bandwidth_report - user_device.peripherals_report - user_device.app_report ", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1151,7 +1151,7 @@ "type": "string" }, "readMask": { - "description": "Read mask to specify which fields to return. Supported read_mask paths are: - name - org_unit_id - user_id - user_email - user_device.device_id - user_device.audio_status_report - user_device.device_activity_report - user_device.network_bandwidth_report - user_device.peripherals_report ", + "description": "Read mask to specify which fields to return. Supported read_mask paths are: - name - org_unit_id - user_id - user_email - user_device.device_id - user_device.audio_status_report - user_device.device_activity_report - user_device.network_bandwidth_report - user_device.peripherals_report - user_device.app_report ", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1172,7 +1172,7 @@ } } }, - "revision": "20240709", + "revision": "20240815", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index 9dd2e8e5d59..4bb53a28a9b 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -7311,7 +7311,8 @@ func (r *CustomersTelemetryUsersService) Get(name string) *CustomersTelemetryUse // fields to return. Supported read_mask paths are: - name - org_unit_id - // user_id - user_email - user_device.device_id - // user_device.audio_status_report - user_device.device_activity_report - -// user_device.network_bandwidth_report - user_device.peripherals_report +// user_device.network_bandwidth_report - user_device.peripherals_report - +// user_device.app_report func (c *CustomersTelemetryUsersGetCall) ReadMask(readMask string) *CustomersTelemetryUsersGetCall { c.urlParams_.Set("readMask", readMask) return c @@ -7451,7 +7452,8 @@ func (c *CustomersTelemetryUsersListCall) PageToken(pageToken string) *Customers // fields to return. Supported read_mask paths are: - name - org_unit_id - // user_id - user_email - user_device.device_id - // user_device.audio_status_report - user_device.device_activity_report - -// user_device.network_bandwidth_report - user_device.peripherals_report +// user_device.network_bandwidth_report - user_device.peripherals_report - +// user_device.app_report func (c *CustomersTelemetryUsersListCall) ReadMask(readMask string) *CustomersTelemetryUsersListCall { c.urlParams_.Set("readMask", readMask) return c diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index 48fefcfb342..2cef2427047 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -358,6 +358,59 @@ }, "operations": { "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "cloudasset.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "cloudasset.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", "flatPath": "v1/{v1Id}/{v1Id1}/operations/{operationsId}/{operationsId1}", @@ -1095,7 +1148,7 @@ } } }, - "revision": "20240803", + "revision": "20240823", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -1371,6 +1424,17 @@ }, "type": "object" }, + "AssetEnrichment": { + "description": "The enhanced metadata information for a resource.", + "id": "AssetEnrichment", + "properties": { + "resourceOwners": { + "$ref": "ResourceOwners", + "description": "The resource owners for a resource. Note that this field only contains the members that have \"roles/owner\" role in the resource's IAM Policy." + } + }, + "type": "object" + }, "AttachedResource": { "description": "Attached resource representation, which is defined by the corresponding service provider. It represents an attached resource's payload.", "id": "AttachedResource", @@ -1514,6 +1578,12 @@ }, "type": "object" }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, "ConditionContext": { "description": "The IAM conditions context.", "id": "ConditionContext", @@ -2072,13 +2142,17 @@ "METHOD_TYPE_UNSPECIFIED", "CREATE", "UPDATE", - "DELETE" + "DELETE", + "REMOVE_GRANT", + "GOVERN_TAGS" ], "enumDescriptions": [ "Unspecified. Will results in user error.", "Constraint applied when creating the resource.", "Constraint applied when updating the resource.", - "Constraint applied when deleting the resource." + "Constraint applied when deleting the resource.", + "Constraint applied when removing an IAM grant.", + "Constraint applied when enforcing forced tagging." ], "type": "string" }, @@ -4075,6 +4149,20 @@ }, "type": "object" }, + "ResourceOwners": { + "description": "The resource owners information.", + "id": "ResourceOwners", + "properties": { + "resourceOwners": { + "description": "List of resource owners.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ResourceSearchResult": { "description": "A result of Resource Search, containing information of a cloud resource.", "id": "ResourceSearchResult", @@ -4118,6 +4206,13 @@ }, "type": "array" }, + "enrichments": { + "description": "Enrichments of the asset. Currently supported enrichment types with SearchAllResources API: * RESOURCE_OWNERS The corresponding read masks in order to get the enrichment: * enrichments.resource_owners The corresponding required permissions: * cloudasset.assets.searchEnrichmentResourceOwners Example query to get resource owner enrichment: scope: \"projects/my-project\" query: \"name: my-project\" assetTypes: \"cloudresourcemanager.googleapis.com/Project\" readMask: { paths: \"asset_type\" paths: \"name\" paths: \"enrichments.resource_owners\" }", + "items": { + "$ref": "AssetEnrichment" + }, + "type": "array" + }, "folders": { "description": "The folder(s) that this resource belongs to, in the form of folders/{FOLDER_NUMBER}. This field is available when the resource belongs to one or more folders. To search against `folders`: * Use a field query. Example: `folders:(123 OR 456)` * Use a free text query. Example: `123` * Specify the `scope` field as this folder in your search request.", "items": { diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index 2ed3f555ba6..317bf5005ea 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -635,6 +635,30 @@ func (s Asset) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AssetEnrichment: The enhanced metadata information for a resource. +type AssetEnrichment struct { + // ResourceOwners: The resource owners for a resource. Note that this field + // only contains the members that have "roles/owner" role in the resource's IAM + // Policy. + ResourceOwners *ResourceOwners `json:"resourceOwners,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResourceOwners") 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. "ResourceOwners") 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 AssetEnrichment) MarshalJSON() ([]byte, error) { + type NoMethod AssetEnrichment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AttachedResource: Attached resource representation, which is defined by the // corresponding service provider. It represents an attached resource's // payload. @@ -974,6 +998,10 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + // ConditionContext: The IAM conditions context. type ConditionContext struct { // AccessTime: The hypothetical access timestamp to evaluate IAM conditions. @@ -1806,6 +1834,8 @@ type GoogleCloudAssetV1CustomConstraint struct { // "CREATE" - Constraint applied when creating the resource. // "UPDATE" - Constraint applied when updating the resource. // "DELETE" - Constraint applied when deleting the resource. + // "REMOVE_GRANT" - Constraint applied when removing an IAM grant. + // "GOVERN_TAGS" - Constraint applied when enforcing forced tagging. MethodTypes []string `json:"methodTypes,omitempty"` // Name: Name of the constraint. This is unique within the organization. Format // of the name should be * @@ -4949,6 +4979,28 @@ func (s Resource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ResourceOwners: The resource owners information. +type ResourceOwners struct { + // ResourceOwners: List of resource owners. + ResourceOwners []string `json:"resourceOwners,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResourceOwners") 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. "ResourceOwners") 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 ResourceOwners) MarshalJSON() ([]byte, error) { + type NoMethod ResourceOwners + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ResourceSearchResult: A result of Resource Search, containing information of // a cloud resource. type ResourceSearchResult struct { @@ -5009,6 +5061,16 @@ type ResourceSearchResult struct { // `effectiveTagValues="123456789/env/prod" - // `effectiveTagValueIds="tagValues/456" EffectiveTags []*EffectiveTagDetails `json:"effectiveTags,omitempty"` + // Enrichments: Enrichments of the asset. Currently supported enrichment types + // with SearchAllResources API: * RESOURCE_OWNERS The corresponding read masks + // in order to get the enrichment: * enrichments.resource_owners The + // corresponding required permissions: * + // cloudasset.assets.searchEnrichmentResourceOwners Example query to get + // resource owner enrichment: scope: "projects/my-project" query: "name: + // my-project" assetTypes: "cloudresourcemanager.googleapis.com/Project" + // readMask: { paths: "asset_type" paths: "name" paths: + // "enrichments.resource_owners" } + Enrichments []*AssetEnrichment `json:"enrichments,omitempty"` // Folders: The folder(s) that this resource belongs to, in the form of // folders/{FOLDER_NUMBER}. This field is available when the resource belongs // to one or more folders. To search against `folders`: * Use a field query. @@ -6674,6 +6736,213 @@ func (c *FeedsPatchCall) Do(opts ...googleapi.CallOption) (*Feed, error) { return ret, nil } +type OperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall { + c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + 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 *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { + 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 *OperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudasset.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type OperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that the +// client is no longer interested in the operation result. It does not cancel +// the operation. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *OperationsService) Delete(name string) *OperationsDeleteCall { + c := &OperationsDeleteCall{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 *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { + 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 *OperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudasset.operations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type OperationsGetCall struct { s *Service name string diff --git a/cloudcontrolspartner/v1/cloudcontrolspartner-api.json b/cloudcontrolspartner/v1/cloudcontrolspartner-api.json index 650444a3e2e..0b3c7c3eecb 100644 --- a/cloudcontrolspartner/v1/cloudcontrolspartner-api.json +++ b/cloudcontrolspartner/v1/cloudcontrolspartner-api.json @@ -484,7 +484,7 @@ } } }, - "revision": "20240731", + "revision": "20240814", "rootUrl": "https://cloudcontrolspartner.googleapis.com/", "schemas": { "AccessApprovalRequest": { @@ -598,7 +598,7 @@ "readOnly": true }, "displayName": { - "description": "Optional. The customer organization's display name. E.g. \"Google\".", + "description": "The customer organization's display name. E.g. \"Google\".", "type": "string" }, "isOnboarded": { diff --git a/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go b/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go index 8bde6530964..bb697624ea9 100644 --- a/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go +++ b/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go @@ -360,8 +360,7 @@ type Customer struct { // CustomerOnboardingState: Output only. Container for customer onboarding // steps CustomerOnboardingState *CustomerOnboardingState `json:"customerOnboardingState,omitempty"` - // DisplayName: Optional. The customer organization's display name. E.g. - // "Google". + // DisplayName: The customer organization's display name. E.g. "Google". DisplayName string `json:"displayName,omitempty"` // IsOnboarded: Output only. Indicates whether a customer is fully onboarded IsOnboarded bool `json:"isOnboarded,omitempty"` diff --git a/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json b/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json index 8cb6223cdec..b4041f398f9 100644 --- a/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json +++ b/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json @@ -484,7 +484,7 @@ } } }, - "revision": "20240731", + "revision": "20240814", "rootUrl": "https://cloudcontrolspartner.googleapis.com/", "schemas": { "AccessApprovalRequest": { @@ -598,7 +598,7 @@ "readOnly": true }, "displayName": { - "description": "Optional. The customer organization's display name. E.g. \"Google\".", + "description": "The customer organization's display name. E.g. \"Google\".", "type": "string" }, "isOnboarded": { diff --git a/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go b/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go index 57a3e92e1ea..6bceb50671e 100644 --- a/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go +++ b/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go @@ -360,8 +360,7 @@ type Customer struct { // CustomerOnboardingState: Output only. Container for customer onboarding // steps CustomerOnboardingState *CustomerOnboardingState `json:"customerOnboardingState,omitempty"` - // DisplayName: Optional. The customer organization's display name. E.g. - // "Google". + // DisplayName: The customer organization's display name. E.g. "Google". DisplayName string `json:"displayName,omitempty"` // IsOnboarded: Output only. Indicates whether a customer is fully onboarded IsOnboarded bool `json:"isOnboarded,omitempty"` diff --git a/clouddeploy/v1/clouddeploy-api.json b/clouddeploy/v1/clouddeploy-api.json index bc82f14532a..384221014d1 100644 --- a/clouddeploy/v1/clouddeploy-api.json +++ b/clouddeploy/v1/clouddeploy-api.json @@ -2065,7 +2065,7 @@ } } }, - "revision": "20240728", + "revision": "20240809", "rootUrl": "https://clouddeploy.googleapis.com/", "schemas": { "AbandonReleaseRequest": { @@ -4602,7 +4602,7 @@ "type": "string" }, "destinationTargetId": { - "description": "Optional. The ID of the stage in the pipeline to which this `Release` is deploying. If unspecified, default it to the next stage in the promotion flow. The value of this field could be one of the following: * The last segment of a target name. It only needs the ID to determine if the target is one of the stages in the promotion sequence defined in the pipeline. * \"@next\", the next target in the promotion sequence.", + "description": "Optional. The ID of the stage in the pipeline to which this `Release` is deploying. If unspecified, default it to the next stage in the promotion flow. The value of this field could be one of the following: * The last segment of a target name * \"@next\", the next target in the promotion sequence", "type": "string" }, "id": { @@ -5995,7 +5995,7 @@ "id": "TargetAttribute", "properties": { "id": { - "description": "ID of the `Target`. The value of this field could be one of the following: * The last segment of a target name. It only needs the ID to determine which target is being referred to * \"*\", all targets in a location.", + "description": "ID of the `Target`. The value of this field could be one of the following: * The last segment of a target name * \"*\", all targets in a location", "type": "string" }, "labels": { diff --git a/clouddeploy/v1/clouddeploy-gen.go b/clouddeploy/v1/clouddeploy-gen.go index e57bcfdac94..6b8d31a8f48 100644 --- a/clouddeploy/v1/clouddeploy-gen.go +++ b/clouddeploy/v1/clouddeploy-gen.go @@ -3360,9 +3360,8 @@ type PromoteReleaseRule struct { // DestinationTargetId: Optional. The ID of the stage in the pipeline to which // this `Release` is deploying. If unspecified, default it to the next stage in // the promotion flow. The value of this field could be one of the following: * - // The last segment of a target name. It only needs the ID to determine if the - // target is one of the stages in the promotion sequence defined in the - // pipeline. * "@next", the next target in the promotion sequence. + // The last segment of a target name * "@next", the next target in the + // promotion sequence DestinationTargetId string `json:"destinationTargetId,omitempty"` // Id: Required. ID of the rule. This id must be unique in the `Automation` // resource to which this rule belongs. The format is @@ -4777,9 +4776,8 @@ func (s TargetArtifact) MarshalJSON() ([]byte, error) { // TargetAttribute: Contains criteria for selecting Targets. type TargetAttribute struct { // Id: ID of the `Target`. The value of this field could be one of the - // following: * The last segment of a target name. It only needs the ID to - // determine which target is being referred to * "*", all targets in a - // location. + // following: * The last segment of a target name * "*", all targets in a + // location Id string `json:"id,omitempty"` // Labels: Target labels. Labels map[string]string `json:"labels,omitempty"` diff --git a/cloudidentity/v1/cloudidentity-api.json b/cloudidentity/v1/cloudidentity-api.json index 248632d04ed..02a214120c3 100644 --- a/cloudidentity/v1/cloudidentity-api.json +++ b/cloudidentity/v1/cloudidentity-api.json @@ -422,7 +422,7 @@ ], "enumDescriptions": [ "Default value. The value is unused.", - "This view contains all devices imported by the company admin. Each device in the response contains all information specified by the company admin when importing the device (i.e. asset tags). This includes devices that may be unaassigned or assigned to users.", + "This view contains all devices imported by the company admin. Each device in the response contains all information specified by the company admin when importing the device (i.e. asset tags). This includes devices that may be unassigned or assigned to users.", "This view contains all devices with at least one user registered on the device. Each device in the response contains all device information, except for asset tags." ], "location": "query", @@ -1990,7 +1990,7 @@ } } }, - "revision": "20240611", + "revision": "20240820", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index 9ee017a3f20..1116a904dbe 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -4309,7 +4309,7 @@ func (c *DevicesListCall) PageToken(pageToken string) *DevicesListCall { // // company admin. Each device in the response contains all information // specified by the company admin when importing the device (i.e. asset tags). -// This includes devices that may be unaassigned or assigned to users. +// This includes devices that may be unassigned or assigned to users. // // "USER_ASSIGNED_DEVICES" - This view contains all devices with at least one // diff --git a/cloudkms/v1/cloudkms-api.json b/cloudkms/v1/cloudkms-api.json index 6313094275c..e2d4c7fa9c1 100644 --- a/cloudkms/v1/cloudkms-api.json +++ b/cloudkms/v1/cloudkms-api.json @@ -859,6 +859,17 @@ "location": "query", "type": "string" }, + "pageSize": { + "description": "Optional. Optional limit on the number of KeyHandles to include in the response. The service may return fewer than this value. Further KeyHandles can subsequently be obtained by including the ListKeyHandlesResponse.next_page_token in a subsequent request. If unspecified, at most KeyHandles 100 will be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Optional pagination token, returned earlier via ListKeyHandlesResponse.next_page_token.", + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Name of the resource project and location from which to list KeyHandles, e.g. `projects/{PROJECT_ID}/locations/{LOCATION}`.", "location": "path", @@ -2101,7 +2112,7 @@ } } }, - "revision": "20240801", + "revision": "20240808", "rootUrl": "https://cloudkms.googleapis.com/", "schemas": { "AsymmetricDecryptRequest": { @@ -2292,6 +2303,23 @@ "name": { "description": "Identifier. Name of the AutokeyConfig resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`.", "type": "string" + }, + "state": { + "description": "Output only. The state for the AutokeyConfig.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "KEY_PROJECT_DELETED", + "UNINITIALIZED" + ], + "enumDescriptions": [ + "The state of the AutokeyConfig is unspecified.", + "The AutokeyConfig is currently active.", + "A previously configured key project has been deleted and the current AutokeyConfig is unusable.", + "The AutokeyConfig is not yet initialized or has been reset to its default uninitialized state." + ], + "readOnly": true, + "type": "string" } }, "type": "object" @@ -2943,7 +2971,7 @@ "type": "string" }, "serviceResolvers": { - "description": "A list of ServiceResolvers where the EKM can be reached. There should be one ServiceResolver per EKM replica. Currently, only a single ServiceResolver is supported.", + "description": "Optional. A list of ServiceResolvers where the EKM can be reached. There should be one ServiceResolver per EKM replica. Currently, only a single ServiceResolver is supported.", "items": { "$ref": "ServiceResolver" }, @@ -3534,6 +3562,10 @@ "$ref": "KeyHandle" }, "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in ListKeyHandlesRequest.page_token to retrieve the next page of results.", + "type": "string" } }, "type": "object" diff --git a/cloudkms/v1/cloudkms-gen.go b/cloudkms/v1/cloudkms-gen.go index f0feb4b5373..5194747f6cb 100644 --- a/cloudkms/v1/cloudkms-gen.go +++ b/cloudkms/v1/cloudkms-gen.go @@ -603,6 +603,16 @@ type AutokeyConfig struct { // Name: Identifier. Name of the AutokeyConfig resource, e.g. // `folders/{FOLDER_NUMBER}/autokeyConfig`. Name string `json:"name,omitempty"` + // State: Output only. The state for the AutokeyConfig. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the AutokeyConfig is unspecified. + // "ACTIVE" - The AutokeyConfig is currently active. + // "KEY_PROJECT_DELETED" - A previously configured key project has been + // deleted and the current AutokeyConfig is unusable. + // "UNINITIALIZED" - The AutokeyConfig is not yet initialized or has been + // reset to its default uninitialized state. + State string `json:"state,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1380,9 +1390,9 @@ type EkmConnection struct { // Name: Output only. The resource name for the EkmConnection in the format // `projects/*/locations/*/ekmConnections/*`. Name string `json:"name,omitempty"` - // ServiceResolvers: A list of ServiceResolvers where the EKM can be reached. - // There should be one ServiceResolver per EKM replica. Currently, only a - // single ServiceResolver is supported. + // ServiceResolvers: Optional. A list of ServiceResolvers where the EKM can be + // reached. There should be one ServiceResolver per EKM replica. Currently, + // only a single ServiceResolver is supported. ServiceResolvers []*ServiceResolver `json:"serviceResolvers,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -2232,6 +2242,9 @@ func (s ListImportJobsResponse) MarshalJSON() ([]byte, error) { type ListKeyHandlesResponse struct { // KeyHandles: Resulting KeyHandles. KeyHandles []*KeyHandle `json:"keyHandles,omitempty"` + // NextPageToken: A token to retrieve next page of results. Pass this value in + // ListKeyHandlesRequest.page_token to retrieve the next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -5849,6 +5862,23 @@ func (c *ProjectsLocationsKeyHandlesListCall) Filter(filter string) *ProjectsLoc return c } +// PageSize sets the optional parameter "pageSize": Optional limit on the +// number of KeyHandles to include in the response. The service may return +// fewer than this value. Further KeyHandles can subsequently be obtained by +// including the ListKeyHandlesResponse.next_page_token in a subsequent +// request. If unspecified, at most KeyHandles 100 will be returned. +func (c *ProjectsLocationsKeyHandlesListCall) PageSize(pageSize int64) *ProjectsLocationsKeyHandlesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Optional pagination +// token, returned earlier via ListKeyHandlesResponse.next_page_token. +func (c *ProjectsLocationsKeyHandlesListCall) PageToken(pageToken string) *ProjectsLocationsKeyHandlesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -5939,6 +5969,27 @@ func (c *ProjectsLocationsKeyHandlesListCall) Do(opts ...googleapi.CallOption) ( 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 *ProjectsLocationsKeyHandlesListCall) Pages(ctx context.Context, f func(*ListKeyHandlesResponse) 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 ProjectsLocationsKeyRingsCreateCall struct { s *Service parent string diff --git a/cloudtasks/v2/cloudtasks-api.json b/cloudtasks/v2/cloudtasks-api.json index 7b8394e3dbf..4ae0911fb0b 100644 --- a/cloudtasks/v2/cloudtasks-api.json +++ b/cloudtasks/v2/cloudtasks-api.json @@ -779,7 +779,7 @@ } } }, - "revision": "20240223", + "revision": "20240808", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpRequest": { @@ -1164,11 +1164,11 @@ }, "oauthToken": { "$ref": "OAuthToken", - "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as the `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com." + "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) is generated and attached as the `Authorization` header in the HTTP request. This type of authorization should generally be used only when calling Google APIs hosted on *.googleapis.com. Note that both the service account email and the scope MUST be specified when using the queue-level authorization override." }, "oidcToken": { "$ref": "OidcToken", - "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself." + "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token is generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself. Note that both the service account email and the audience MUST be specified when using the queue-level authorization override." }, "uriOverride": { "$ref": "UriOverride", diff --git a/cloudtasks/v2/cloudtasks-gen.go b/cloudtasks/v2/cloudtasks-gen.go index 2df53ac975e..6b2383e761b 100644 --- a/cloudtasks/v2/cloudtasks-gen.go +++ b/cloudtasks/v2/cloudtasks-gen.go @@ -984,16 +984,19 @@ type HttpTarget struct { // "OPTIONS" - HTTP OPTIONS HttpMethod string `json:"httpMethod,omitempty"` // OauthToken: If specified, an OAuth token - // (https://developers.google.com/identity/protocols/OAuth2) will be generated - // and attached as the `Authorization` header in the HTTP request. This type of - // authorization should generally only be used when calling Google APIs hosted - // on *.googleapis.com. + // (https://developers.google.com/identity/protocols/OAuth2) is generated and + // attached as the `Authorization` header in the HTTP request. This type of + // authorization should generally be used only when calling Google APIs hosted + // on *.googleapis.com. Note that both the service account email and the scope + // MUST be specified when using the queue-level authorization override. OauthToken *OAuthToken `json:"oauthToken,omitempty"` // OidcToken: If specified, an OIDC - // (https://developers.google.com/identity/protocols/OpenIDConnect) token will - // be generated and attached as an `Authorization` header in the HTTP request. + // (https://developers.google.com/identity/protocols/OpenIDConnect) token is + // generated and attached as an `Authorization` header in the HTTP request. // This type of authorization can be used for many scenarios, including calling // Cloud Run, or endpoints where you intend to validate the token yourself. + // Note that both the service account email and the audience MUST be specified + // when using the queue-level authorization override. OidcToken *OidcToken `json:"oidcToken,omitempty"` // UriOverride: URI override. When specified, overrides the execution URI for // all the tasks in the queue. diff --git a/cloudtasks/v2beta2/cloudtasks-api.json b/cloudtasks/v2beta2/cloudtasks-api.json index 4131263c9cb..3f86a2421a1 100644 --- a/cloudtasks/v2beta2/cloudtasks-api.json +++ b/cloudtasks/v2beta2/cloudtasks-api.json @@ -935,7 +935,7 @@ } } }, - "revision": "20240223", + "revision": "20240808", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AcknowledgeTaskRequest": { @@ -1369,11 +1369,11 @@ }, "oauthToken": { "$ref": "OAuthToken", - "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com." + "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) is generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally be used only when calling Google APIs hosted on *.googleapis.com. Note that both the service account email and the scope MUST be specified when using the queue-level authorization override." }, "oidcToken": { "$ref": "OidcToken", - "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself." + "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token is generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself. Note that both the service account email and the audience MUST be specified when using the queue-level authorization override." }, "uriOverride": { "$ref": "UriOverride", diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index 8272472ae77..c957b7e6ff0 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -1111,16 +1111,19 @@ type HttpTarget struct { // "OPTIONS" - HTTP OPTIONS HttpMethod string `json:"httpMethod,omitempty"` // OauthToken: If specified, an OAuth token - // (https://developers.google.com/identity/protocols/OAuth2) will be generated - // and attached as an `Authorization` header in the HTTP request. This type of - // authorization should generally only be used when calling Google APIs hosted - // on *.googleapis.com. + // (https://developers.google.com/identity/protocols/OAuth2) is generated and + // attached as an `Authorization` header in the HTTP request. This type of + // authorization should generally be used only when calling Google APIs hosted + // on *.googleapis.com. Note that both the service account email and the scope + // MUST be specified when using the queue-level authorization override. OauthToken *OAuthToken `json:"oauthToken,omitempty"` // OidcToken: If specified, an OIDC - // (https://developers.google.com/identity/protocols/OpenIDConnect) token will - // be generated and attached as an `Authorization` header in the HTTP request. + // (https://developers.google.com/identity/protocols/OpenIDConnect) token is + // generated and attached as an `Authorization` header in the HTTP request. // This type of authorization can be used for many scenarios, including calling // Cloud Run, or endpoints where you intend to validate the token yourself. + // Note that both the service account email and the audience MUST be specified + // when using the queue-level authorization override. OidcToken *OidcToken `json:"oidcToken,omitempty"` // UriOverride: Uri override. When specified, overrides the execution Uri for // all the tasks in the queue. diff --git a/cloudtasks/v2beta3/cloudtasks-api.json b/cloudtasks/v2beta3/cloudtasks-api.json index 8c84008e3dc..87f782a26fc 100644 --- a/cloudtasks/v2beta3/cloudtasks-api.json +++ b/cloudtasks/v2beta3/cloudtasks-api.json @@ -791,7 +791,7 @@ } } }, - "revision": "20240223", + "revision": "20240808", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpQueue": { @@ -1187,11 +1187,11 @@ }, "oauthToken": { "$ref": "OAuthToken", - "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as the `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com." + "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) is generated and attached as the `Authorization` header in the HTTP request. This type of authorization should generally be used only when calling Google APIs hosted on *.googleapis.com. Note that both the service account email and the scope MUST be specified when using the queue-level authorization override." }, "oidcToken": { "$ref": "OidcToken", - "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself." + "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token is generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself. Note that both the service account email and the audience MUST be specified when using the queue-level authorization override." }, "uriOverride": { "$ref": "UriOverride", diff --git a/cloudtasks/v2beta3/cloudtasks-gen.go b/cloudtasks/v2beta3/cloudtasks-gen.go index 4dd9fde16ce..610f158e8a5 100644 --- a/cloudtasks/v2beta3/cloudtasks-gen.go +++ b/cloudtasks/v2beta3/cloudtasks-gen.go @@ -1012,16 +1012,19 @@ type HttpTarget struct { // "OPTIONS" - HTTP OPTIONS HttpMethod string `json:"httpMethod,omitempty"` // OauthToken: If specified, an OAuth token - // (https://developers.google.com/identity/protocols/OAuth2) will be generated - // and attached as the `Authorization` header in the HTTP request. This type of - // authorization should generally only be used when calling Google APIs hosted - // on *.googleapis.com. + // (https://developers.google.com/identity/protocols/OAuth2) is generated and + // attached as the `Authorization` header in the HTTP request. This type of + // authorization should generally be used only when calling Google APIs hosted + // on *.googleapis.com. Note that both the service account email and the scope + // MUST be specified when using the queue-level authorization override. OauthToken *OAuthToken `json:"oauthToken,omitempty"` // OidcToken: If specified, an OIDC - // (https://developers.google.com/identity/protocols/OpenIDConnect) token will - // be generated and attached as an `Authorization` header in the HTTP request. + // (https://developers.google.com/identity/protocols/OpenIDConnect) token is + // generated and attached as an `Authorization` header in the HTTP request. // This type of authorization can be used for many scenarios, including calling // Cloud Run, or endpoints where you intend to validate the token yourself. + // Note that both the service account email and the audience MUST be specified + // when using the queue-level authorization override. OidcToken *OidcToken `json:"oidcToken,omitempty"` // UriOverride: URI override. When specified, overrides the execution URI for // all the tasks in the queue. diff --git a/cloudtrace/v1/cloudtrace-api.json b/cloudtrace/v1/cloudtrace-api.json index 7c87ead472f..3c14bffdfbb 100644 --- a/cloudtrace/v1/cloudtrace-api.json +++ b/cloudtrace/v1/cloudtrace-api.json @@ -257,7 +257,7 @@ } } }, - "revision": "20240102", + "revision": "20240816", "rootUrl": "https://cloudtrace.googleapis.com/", "schemas": { "Empty": { @@ -333,7 +333,7 @@ "additionalProperties": { "type": "string" }, - "description": "Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 kilobytes (10MB for `/stacktrace` values). Some predefined label keys exist, or you may create your own. When creating your own, we recommend the following formats: * `/category/product/key` for agents of well-known products (e.g. `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * `/component` * `/error/message` * `/error/name` * `/http/client_city` * `/http/client_country` * `/http/client_protocol` * `/http/client_region` * `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * `/http/request/size` * `/http/response/size` * `/http/route` * `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * `/stacktrace` * `/tid`", + "description": "Collection of labels associated with the span. Label keys must be less than 128 bytes. Label values must be less than 16 KiB. Some keys might have predefined meaning, and you can also create your own. For more information, see [Cloud Trace labels](https://cloud.google.com/trace/docs/trace-labels).", "type": "object" }, "name": { diff --git a/cloudtrace/v1/cloudtrace-gen.go b/cloudtrace/v1/cloudtrace-gen.go index 17eaa315f8e..83ef93afed1 100644 --- a/cloudtrace/v1/cloudtrace-gen.go +++ b/cloudtrace/v1/cloudtrace-gen.go @@ -281,18 +281,10 @@ type TraceSpan struct { // around an RPC or other remote request. Kind string `json:"kind,omitempty"` // Labels: Collection of labels associated with the span. Label keys must be - // less than 128 bytes. Label values must be less than 16 kilobytes (10MB for - // `/stacktrace` values). Some predefined label keys exist, or you may create - // your own. When creating your own, we recommend the following formats: * - // `/category/product/key` for agents of well-known products (e.g. - // `/db/mongodb/read_size`). * `short_host/path/key` for domain-specific keys - // (e.g. `foo.com/myproduct/bar`) Predefined labels include: * `/agent` * - // `/component` * `/error/message` * `/error/name` * `/http/client_city` * - // `/http/client_country` * `/http/client_protocol` * `/http/client_region` * - // `/http/host` * `/http/method` * `/http/path` * `/http/redirected_url` * - // `/http/request/size` * `/http/response/size` * `/http/route` * - // `/http/status_code` * `/http/url` * `/http/user_agent` * `/pid` * - // `/stacktrace` * `/tid` + // less than 128 bytes. Label values must be less than 16 KiB. Some keys might + // have predefined meaning, and you can also create your own. For more + // information, see Cloud Trace labels + // (https://cloud.google.com/trace/docs/trace-labels). Labels map[string]string `json:"labels,omitempty"` // Name: Name of the span. Must be less than 128 bytes. The span name is // sanitized and displayed in the Trace tool in the Google Cloud Platform diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 11980894ed0..17560ac82d8 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -29159,204 +29159,6 @@ } } }, - "regionMultiMigs": { - "methods": { - "delete": { - "description": "Deletes a regional multiMIG in the specified project.", - "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "httpMethod": "DELETE", - "id": "compute.regionMultiMigs.delete", - "parameterOrder": [ - "project", - "region", - "multiMig" - ], - "parameters": { - "multiMig": { - "description": "Name of the multiMIG to delete.", - "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": "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" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "get": { - "description": "Returns the specified MultiMIG resource.", - "flatPath": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "httpMethod": "GET", - "id": "compute.regionMultiMigs.get", - "parameterOrder": [ - "project", - "region", - "multiMig" - ], - "parameters": { - "multiMig": { - "description": "Name of the MultiMig 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" - }, - "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" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs/{multiMig}", - "response": { - "$ref": "MultiMig" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - }, - "insert": { - "description": "Creates a regional multiMIG in the specified project.", - "flatPath": "projects/{project}/regions/{region}/multiMigs", - "httpMethod": "POST", - "id": "compute.regionMultiMigs.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 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" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs", - "request": { - "$ref": "MultiMig" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute" - ] - }, - "list": { - "description": "Retrieves a list of MultiMIGs in a project and region.", - "flatPath": "projects/{project}/regions/{region}/multiMigs", - "httpMethod": "GET", - "id": "compute.regionMultiMigs.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 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" - } - }, - "path": "projects/{project}/regions/{region}/multiMigs", - "response": { - "$ref": "MultiMigsList" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" - ] - } - } - }, "regionNetworkEndpointGroups": { "methods": { "attachNetworkEndpoints": { @@ -45278,7 +45080,7 @@ } } }, - "revision": "20240730", + "revision": "20240805", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -48691,7 +48493,7 @@ "type": "number" }, "name": { - "description": "Name of a custom utilization signal. The name must be 1-24 characters long, and comply with RFC1035. Specifically, 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, lowercase letter, or digit, except the last character, which cannot be a dash. 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 comply with relaxed RFC1035. Specifically, 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" } }, @@ -55868,7 +55670,6 @@ }, "timestamp": { "description": "Timestamp when the matching usage was calculated", - "format": "google-datetime", "type": "string" } }, @@ -69832,286 +69633,6 @@ }, "type": "object" }, - "MultiMig": { - "description": "MultiMIG represents a group of Managed Instance Groups.", - "id": "MultiMig", - "properties": { - "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" - }, - "id": { - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#multiMig", - "description": "[Output Only] Type of the resource. Always compute#multiMig for MultiMIGs.", - "type": "string" - }, - "locationPolicy": { - "$ref": "MultiMigLocationPolicy" - }, - "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" - }, - "parts": { - "additionalProperties": { - "$ref": "MultiMigPart" - }, - "description": "User-provided names for Parts of MultiMIG and the Parts themselves.", - "type": "object" - }, - "region": { - "description": "[Output Only] URL of the region where the resource resides. Only applicable for regional resources. 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" - }, - "schedulingPolicy": { - "$ref": "MultiMigSchedulingPolicy", - "description": "Policy for handling provisioning and other scheduling-related events." - }, - "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" - }, - "status": { - "$ref": "MultiMigStatus" - } - }, - "type": "object" - }, - "MultiMigLocationPolicy": { - "description": "Policy regarding where to create MIGs Initially only zonal MIGs in the same zone are supported.", - "id": "MultiMigLocationPolicy", - "properties": { - "provisioningZones": { - "description": "List of zones where MIGs will be provisioned. Should be valid RFC1035 name", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "MultiMigPart": { - "description": "Config for an MMIG part.", - "id": "MultiMigPart", - "properties": { - "instanceGroupManager": { - "description": "Link to an existing InstanceGroupManager that will be adopted by a MultiMIG.", - "type": "string" - }, - "instanceGroupManagerProperties": { - "$ref": "InstanceGroupManager", - "description": "InstanceGroupManager to be created by the multiMig" - } - }, - "type": "object" - }, - "MultiMigSchedulingPolicy": { - "description": "Policy for handling provisioning and other scheduling-related events.", - "id": "MultiMigSchedulingPolicy", - "properties": { - "provisioning": { - "description": "How provisioning of MIGs should be scheduled (coordinated or not)", - "enum": [ - "ANY", - "COOORDINATED" - ], - "enumDescriptions": [ - "Allows idependent lifecycles of parts.", - "Requires all parts at the same time." - ], - "type": "string" - } - }, - "type": "object" - }, - "MultiMigStatus": { - "id": "MultiMigStatus", - "properties": { - "memberInstanceGroupManagers": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "MultiMigsList": { - "id": "MultiMigsList", - "properties": { - "etag": { - "type": "string" - }, - "id": { - "description": "Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of MultiMig resources.", - "items": { - "$ref": "MultiMig" - }, - "type": "array" - }, - "kind": { - "default": "compute#multiMigList", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This token allows you to get the next page of results for 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": "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", - "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 - ], - "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", - "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" - }, "MutualTls": { "description": "[Deprecated] Configuration for the mutual Tls mode for peer authentication. Configuration for the mutual Tls mode for peer authentication.", "id": "MutualTls", @@ -100807,7 +100328,7 @@ "type": "object" }, "localTrafficSelector": { - "description": "Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.", + "description": "Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.", "items": { "type": "string" }, @@ -100837,7 +100358,7 @@ "type": "string" }, "peerIp": { - "description": "IP address of the peer VPN gateway. Only IPv4 is supported.", + "description": "IP address of the peer VPN gateway. Only IPv4 is supported. This field can be set only for Classic VPN tunnels.", "type": "string" }, "region": { @@ -100845,7 +100366,7 @@ "type": "string" }, "remoteTrafficSelector": { - "description": "Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", + "description": "Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.", "items": { "type": "string" }, @@ -100902,7 +100423,7 @@ "type": "string" }, "targetVpnGateway": { - "description": "URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", + "description": "URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This field can be set only for Classic VPN tunnels.", "type": "string" }, "vpnGateway": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index c880afa9b26..88bed026ce1 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -232,7 +232,6 @@ func New(client *http.Client) (*Service, error) { s.RegionInstances = NewRegionInstancesService(s) s.RegionInstantSnapshotGroups = NewRegionInstantSnapshotGroupsService(s) s.RegionInstantSnapshots = NewRegionInstantSnapshotsService(s) - s.RegionMultiMigs = NewRegionMultiMigsService(s) s.RegionNetworkEndpointGroups = NewRegionNetworkEndpointGroupsService(s) s.RegionNetworkFirewallPolicies = NewRegionNetworkFirewallPoliciesService(s) s.RegionNotificationEndpoints = NewRegionNotificationEndpointsService(s) @@ -423,8 +422,6 @@ type Service struct { RegionInstantSnapshots *RegionInstantSnapshotsService - RegionMultiMigs *RegionMultiMigsService - RegionNetworkEndpointGroups *RegionNetworkEndpointGroupsService RegionNetworkFirewallPolicies *RegionNetworkFirewallPoliciesService @@ -1147,15 +1144,6 @@ type RegionInstantSnapshotsService struct { s *Service } -func NewRegionMultiMigsService(s *Service) *RegionMultiMigsService { - rs := &RegionMultiMigsService{s: s} - return rs -} - -type RegionMultiMigsService struct { - s *Service -} - func NewRegionNetworkEndpointGroupsService(s *Service) *RegionNetworkEndpointGroupsService { rs := &RegionNetworkEndpointGroupsService{s: s} return rs @@ -5461,15 +5449,16 @@ 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 - // long, and comply with RFC1035. Specifically, the name must be 1-24 - // characters long and match the regular expression a-z ([-a-z0-9]*[a-z0-9])? + // Name: Name of a custom utilization signal. The name must be 1-64 characters + // long, and comply with relaxed RFC1035. Specifically, 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, lowercase letter, or digit, except the - // last character, which cannot be a dash. 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. + // 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. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "DryRun") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -30013,316 +30002,6 @@ func (s Money) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MultiMig: MultiMIG represents a group of Managed Instance Groups. -type MultiMig 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"` - // Id: [Output Only] The unique identifier for the resource. This identifier is - // defined by the server. - Id uint64 `json:"id,omitempty,string"` - // Kind: [Output Only] Type of the resource. Always compute#multiMig for - // MultiMIGs. - Kind string `json:"kind,omitempty"` - LocationPolicy *MultiMigLocationPolicy `json:"locationPolicy,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"` - // Parts: User-provided names for Parts of MultiMIG and the Parts themselves. - Parts map[string]MultiMigPart `json:"parts,omitempty"` - // Region: [Output Only] URL of the region where the resource resides. Only - // applicable for regional resources. 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"` - // SchedulingPolicy: Policy for handling provisioning and other - // scheduling-related events. - SchedulingPolicy *MultiMigSchedulingPolicy `json:"schedulingPolicy,omitempty"` - // SelfLink: [Output only] Server-defined URL for the 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 *MultiMigStatus `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 MultiMig) MarshalJSON() ([]byte, error) { - type NoMethod MultiMig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigLocationPolicy: Policy regarding where to create MIGs Initially only -// zonal MIGs in the same zone are supported. -type MultiMigLocationPolicy struct { - // ProvisioningZones: List of zones where MIGs will be provisioned. Should be - // valid RFC1035 name - ProvisioningZones []string `json:"provisioningZones,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProvisioningZones") 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. "ProvisioningZones") 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 MultiMigLocationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigLocationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigPart: Config for an MMIG part. -type MultiMigPart struct { - // InstanceGroupManager: Link to an existing InstanceGroupManager that will be - // adopted by a MultiMIG. - InstanceGroupManager string `json:"instanceGroupManager,omitempty"` - // InstanceGroupManagerProperties: InstanceGroupManager to be created by the - // multiMig - InstanceGroupManagerProperties *InstanceGroupManager `json:"instanceGroupManagerProperties,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 MultiMigPart) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigPart - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigSchedulingPolicy: Policy for handling provisioning and other -// scheduling-related events. -type MultiMigSchedulingPolicy struct { - // Provisioning: How provisioning of MIGs should be scheduled (coordinated or - // not) - // - // Possible values: - // "ANY" - Allows idependent lifecycles of parts. - // "COOORDINATED" - Requires all parts at the same time. - Provisioning string `json:"provisioning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Provisioning") 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. "Provisioning") 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 MultiMigSchedulingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigSchedulingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigStatus struct { - MemberInstanceGroupManagers []string `json:"memberInstanceGroupManagers,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "MemberInstanceGroupManagers") 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. "MemberInstanceGroupManagers") 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 MultiMigStatus) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigsList struct { - Etag string `json:"etag,omitempty"` - // Id: Unique identifier for the resource; defined by the server. - Id string `json:"id,omitempty"` - // Items: A list of MultiMig resources. - Items []*MultiMig `json:"items,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results for - // 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: Informational warning message. - Warning *MultiMigsListWarning `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 MultiMigsList) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsList - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigsListWarning: Informational warning message. -type MultiMigsListWarning 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 - // "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 []*MultiMigsListWarningData `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 MultiMigsListWarning) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsListWarning - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MultiMigsListWarningData 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 MultiMigsListWarningData) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigsListWarningData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // MutualTls: [Deprecated] Configuration for the mutual Tls mode for peer // authentication. Configuration for the mutual Tls mode for peer // authentication. @@ -63318,7 +62997,8 @@ type VpnTunnel struct { // LocalTrafficSelector: Local traffic selector to use when establishing the // VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted // string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 - // is supported. + // is supported for Classic VPN tunnels. This field is output only for HA VPN + // tunnels. LocalTrafficSelector []string `json:"localTrafficSelector,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. @@ -63344,7 +63024,8 @@ type VpnTunnel struct { // provided, the VPN tunnel will automatically use the same vpnGatewayInterface // ID in the peer Google Cloud VPN gateway. PeerGcpGateway string `json:"peerGcpGateway,omitempty"` - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. + // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. This + // field can be set only for Classic VPN tunnels. PeerIp string `json:"peerIp,omitempty"` // Region: [Output Only] URL of the region where the VPN tunnel resides. You // must specify this field as part of the HTTP request URL. It is not settable @@ -63353,7 +63034,8 @@ type VpnTunnel struct { // RemoteTrafficSelector: Remote traffic selectors to use when establishing the // VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted // string, for example: 192.168.0.0/16. The ranges should be disjoint. Only - // IPv4 is supported. + // IPv4 is supported for Classic VPN tunnels. This field is output only for HA + // VPN tunnels. RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` // Router: URL of the router resource to be used for dynamic routing. Router string `json:"router,omitempty"` @@ -63405,7 +63087,8 @@ type VpnTunnel struct { // resources are needed to setup VPN tunnel. Status string `json:"status,omitempty"` // TargetVpnGateway: URL of the Target VPN gateway with which this VPN tunnel - // is associated. Provided by the client when the VPN tunnel is created. + // is associated. Provided by the client when the VPN tunnel is created. This + // field can be set only for Classic VPN tunnels. TargetVpnGateway string `json:"targetVpnGateway,omitempty"` // VpnGateway: URL of the VPN gateway with which this VPN tunnel is associated. // Provided by the client when the VPN tunnel is created. This must be used diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index c367a0a63bc..bcdbbfc8a57 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -14782,569 +14782,6 @@ func (c *RegionInstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.Call return ret, nil } -type RegionMultiMigsDeleteCall struct { - s *Service - project string - region string - multiMig string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a regional multiMIG in the specified project. -// -// - multiMig: Name of the multiMIG to delete. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Delete(project string, region string, multiMig string) *RegionMultiMigsDeleteCall { - c := &RegionMultiMigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multiMig = multiMig - 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 *RegionMultiMigsDeleteCall) RequestId(requestId string) *RegionMultiMigsDeleteCall { - 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 *RegionMultiMigsDeleteCall) Fields(s ...googleapi.Field) *RegionMultiMigsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsDeleteCall) Context(ctx context.Context) *RegionMultiMigsDeleteCall { - 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 *RegionMultiMigsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "multiMig": c.multiMig, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.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 *RegionMultiMigsDeleteCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type RegionMultiMigsGetCall struct { - s *Service - project string - region string - multiMig string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns the specified MultiMIG resource. -// -// - multiMig: Name of the MultiMig resource to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Get(project string, region string, multiMig string) *RegionMultiMigsGetCall { - c := &RegionMultiMigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multiMig = multiMig - 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 *RegionMultiMigsGetCall) Fields(s ...googleapi.Field) *RegionMultiMigsGetCall { - 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 *RegionMultiMigsGetCall) IfNoneMatch(entityTag string) *RegionMultiMigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsGetCall) Context(ctx context.Context) *RegionMultiMigsGetCall { - 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 *RegionMultiMigsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs/{multiMig}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "multiMig": c.multiMig, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *MultiMig.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 *RegionMultiMigsGetCall) Do(opts ...googleapi.CallOption) (*MultiMig, 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 := &MultiMig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type RegionMultiMigsInsertCall struct { - s *Service - project string - region string - multimig *MultiMig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional multiMIG in the specified project. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) Insert(project string, region string, multimig *MultiMig) *RegionMultiMigsInsertCall { - c := &RegionMultiMigsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.multimig = multimig - 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 *RegionMultiMigsInsertCall) RequestId(requestId string) *RegionMultiMigsInsertCall { - 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 *RegionMultiMigsInsertCall) Fields(s ...googleapi.Field) *RegionMultiMigsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsInsertCall) Context(ctx context.Context) *RegionMultiMigsInsertCall { - 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 *RegionMultiMigsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.multimig) - 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}/multiMigs") - 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, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.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 *RegionMultiMigsInsertCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type RegionMultiMigsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves a list of MultiMIGs in a project and region. -// -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionMultiMigsService) List(project string, region string) *RegionMultiMigsListCall { - c := &RegionMultiMigsListCall{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 *RegionMultiMigsListCall) Filter(filter string) *RegionMultiMigsListCall { - 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 *RegionMultiMigsListCall) MaxResults(maxResults int64) *RegionMultiMigsListCall { - 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 *RegionMultiMigsListCall) OrderBy(orderBy string) *RegionMultiMigsListCall { - 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 *RegionMultiMigsListCall) PageToken(pageToken string) *RegionMultiMigsListCall { - 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 *RegionMultiMigsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionMultiMigsListCall { - 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 *RegionMultiMigsListCall) Fields(s ...googleapi.Field) *RegionMultiMigsListCall { - 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 *RegionMultiMigsListCall) IfNoneMatch(entityTag string) *RegionMultiMigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionMultiMigsListCall) Context(ctx context.Context) *RegionMultiMigsListCall { - 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 *RegionMultiMigsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionMultiMigsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/multiMigs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionMultiMigs.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *MultiMigsList.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 *RegionMultiMigsListCall) Do(opts ...googleapi.CallOption) (*MultiMigsList, 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 := &MultiMigsList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - 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 *RegionMultiMigsListCall) Pages(ctx context.Context, f func(*MultiMigsList) 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 RegionNetworkEndpointGroupsAttachNetworkEndpointsCall struct { s *Service project string diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 8d637ea3da6..f0c1d2b9095 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -41911,7 +41911,7 @@ } } }, - "revision": "20240730", + "revision": "20240813", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -45076,6 +45076,25 @@ "description": "If true, enables Cloud CDN for the backend service of a global external Application Load Balancer.", "type": "boolean" }, + "externalManagedMigrationState": { + "description": "Specifies the canary migration state. Possible values are PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate traffic by percentage using externalManagedMigrationTestingPercentage. Rolling back a migration requires the states to be set in reverse order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC at the same time. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some traffic back to EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL.", + "enum": [ + "PREPARE", + "TEST_ALL_TRAFFIC", + "TEST_BY_PERCENTAGE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "externalManagedMigrationTestingPercentage": { + "description": "Determines the fraction of requests that should be processed by the Global external Application Load Balancer. The value of this field must be in the range [0, 100]. Session affinity options will slightly affect this routing behavior, for more details, see: Session Affinity. This value can only be set if the loadBalancingScheme in the BackendService is set to EXTERNAL (when using the classic Application Load Balancer) and the migration state is TEST_BY_PERCENTAGE.", + "format": "float", + "type": "number" + }, "failoverPolicy": { "$ref": "BackendServiceFailoverPolicy", "description": "Requires at least one backend instance group to be defined as a backup (failover) backend. For load balancers that have configurable failover: [Internal passthrough Network Load Balancers](https://cloud.google.com/load-balancing/docs/internal/failover-overview) and [external passthrough Network Load Balancers](https://cloud.google.com/load-balancing/docs/network/networklb-failover-overview)." @@ -50764,6 +50783,25 @@ "description": "An optional description of this resource. Provide this property when you create the resource.", "type": "string" }, + "externalManagedBackendBucketMigrationState": { + "description": "Specifies the canary migration state for the backend buckets attached to this forwarding rule. Possible values are PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate traffic to backend buckets attached to this forwarding rule by percentage using externalManagedBackendBucketMigrationTestingPercentage. Rolling back a migration requires the states to be set in reverse order. So changing the scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to be set to TEST_ALL_TRAFFIC at the same time. Optionally, the TEST_BY_PERCENTAGE state can be used to migrate some traffic back to EXTERNAL or PREPARE can be used to migrate all traffic back to EXTERNAL.", + "enum": [ + "PREPARE", + "TEST_ALL_TRAFFIC", + "TEST_BY_PERCENTAGE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "externalManagedBackendBucketMigrationTestingPercentage": { + "description": "Determines the fraction of requests to backend buckets that should be processed by the global external Application Load Balancer. The value of this field must be in the range [0, 100]. This value can only be set if the loadBalancingScheme in the BackendService is set to EXTERNAL (when using the classic Application Load Balancer) and the migration state is TEST_BY_PERCENTAGE.", + "format": "float", + "type": "number" + }, "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 ForwardingRule. Include the fingerprint in patch request to ensure that you do not overwrite changes that were applied from another concurrent request. To see the latest fingerprint, make a get() request to retrieve a ForwardingRule.", "format": "byte", @@ -51492,10 +51530,6 @@ "$ref": "ShareSettings", "description": "List of Projects/Folders to share with." }, - "specificReservationRequired": { - "description": "Indicates whether the auto-created reservation can be consumed by VMs with affinity for \"any\" reservation. If the field is set, then only VMs that target the reservation by name can consume from the delivered reservation. If set to true,the delivered resevervation will have the same name as the future reservation.", - "type": "boolean" - }, "specificSkuProperties": { "$ref": "FutureReservationSpecificSKUProperties", "description": "Future Reservation configuration to indicate instance properties and total count." @@ -51629,7 +51663,6 @@ }, "timestamp": { "description": "Timestamp when the matching usage was calculated", - "format": "google-datetime", "type": "string" } }, @@ -63080,6 +63113,20 @@ }, "type": "array" }, + "architecture": { + "description": "[Output Only] The architecture of the machine type.", + "enum": [ + "ARCHITECTURE_UNSPECIFIED", + "ARM64", + "X86_64" + ], + "enumDescriptions": [ + "Default value indicating Architecture is not set.", + "Machines with architecture ARM64", + "Machines with architecture X86_64" + ], + "type": "string" + }, "bundledLocalSsds": { "$ref": "BundledLocalSsds", "description": "[Output Only] The configuration of bundled local SSD for the machine type." @@ -90769,7 +90816,7 @@ "type": "object" }, "localTrafficSelector": { - "description": "Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.", + "description": "Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.", "items": { "type": "string" }, @@ -90799,7 +90846,7 @@ "type": "string" }, "peerIp": { - "description": "IP address of the peer VPN gateway. Only IPv4 is supported.", + "description": "IP address of the peer VPN gateway. Only IPv4 is supported. This field can be set only for Classic VPN tunnels.", "type": "string" }, "region": { @@ -90807,7 +90854,7 @@ "type": "string" }, "remoteTrafficSelector": { - "description": "Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", + "description": "Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.", "items": { "type": "string" }, @@ -90864,7 +90911,7 @@ "type": "string" }, "targetVpnGateway": { - "description": "URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", + "description": "URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This field can be set only for Classic VPN tunnels.", "type": "string" }, "vpnGateway": { diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index 58e51fc12bc..4c374d9a529 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -5082,6 +5082,33 @@ type BackendService struct { // EnableCDN: If true, enables Cloud CDN for the backend service of a global // external Application Load Balancer. EnableCDN bool `json:"enableCDN,omitempty"` + // ExternalManagedMigrationState: Specifies the canary migration state. + // Possible values are PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To + // begin the migration from EXTERNAL to EXTERNAL_MANAGED, the state must be + // changed to PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the + // loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the + // TEST_BY_PERCENTAGE state can be used to migrate traffic by percentage using + // externalManagedMigrationTestingPercentage. Rolling back a migration requires + // the states to be set in reverse order. So changing the scheme from + // EXTERNAL_MANAGED to EXTERNAL requires the state to be set to + // TEST_ALL_TRAFFIC at the same time. Optionally, the TEST_BY_PERCENTAGE state + // can be used to migrate some traffic back to EXTERNAL or PREPARE can be used + // to migrate all traffic back to EXTERNAL. + // + // Possible values: + // "PREPARE" + // "TEST_ALL_TRAFFIC" + // "TEST_BY_PERCENTAGE" + ExternalManagedMigrationState string `json:"externalManagedMigrationState,omitempty"` + // ExternalManagedMigrationTestingPercentage: Determines the fraction of + // requests that should be processed by the Global external Application Load + // Balancer. The value of this field must be in the range [0, 100]. Session + // affinity options will slightly affect this routing behavior, for more + // details, see: Session Affinity. This value can only be set if the + // loadBalancingScheme in the BackendService is set to EXTERNAL (when using the + // classic Application Load Balancer) and the migration state is + // TEST_BY_PERCENTAGE. + ExternalManagedMigrationTestingPercentage float64 `json:"externalManagedMigrationTestingPercentage,omitempty"` // FailoverPolicy: Requires at least one backend instance group to be defined // as a backup (failover) backend. For load balancers that have configurable // failover: Internal passthrough Network Load Balancers @@ -5412,6 +5439,20 @@ func (s BackendService) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *BackendService) UnmarshalJSON(data []byte) error { + type NoMethod BackendService + var s1 struct { + ExternalManagedMigrationTestingPercentage gensupport.JSONFloat64 `json:"externalManagedMigrationTestingPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExternalManagedMigrationTestingPercentage = float64(s1.ExternalManagedMigrationTestingPercentage) + return nil +} + // BackendServiceAggregatedList: Contains a list of BackendServicesScopedList. type BackendServiceAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the server. @@ -11773,6 +11814,33 @@ type ForwardingRule struct { // Description: An optional description of this resource. Provide this property // when you create the resource. Description string `json:"description,omitempty"` + // ExternalManagedBackendBucketMigrationState: Specifies the canary migration + // state for the backend buckets attached to this forwarding rule. Possible + // values are PREPARE, TEST_BY_PERCENTAGE, and TEST_ALL_TRAFFIC. To begin the + // migration from EXTERNAL to EXTERNAL_MANAGED, the state must be changed to + // PREPARE. The state must be changed to TEST_ALL_TRAFFIC before the + // loadBalancingScheme can be changed to EXTERNAL_MANAGED. Optionally, the + // TEST_BY_PERCENTAGE state can be used to migrate traffic to backend buckets + // attached to this forwarding rule by percentage using + // externalManagedBackendBucketMigrationTestingPercentage. Rolling back a + // migration requires the states to be set in reverse order. So changing the + // scheme from EXTERNAL_MANAGED to EXTERNAL requires the state to be set to + // TEST_ALL_TRAFFIC at the same time. Optionally, the TEST_BY_PERCENTAGE state + // can be used to migrate some traffic back to EXTERNAL or PREPARE can be used + // to migrate all traffic back to EXTERNAL. + // + // Possible values: + // "PREPARE" + // "TEST_ALL_TRAFFIC" + // "TEST_BY_PERCENTAGE" + ExternalManagedBackendBucketMigrationState string `json:"externalManagedBackendBucketMigrationState,omitempty"` + // ExternalManagedBackendBucketMigrationTestingPercentage: Determines the + // fraction of requests to backend buckets that should be processed by the + // global external Application Load Balancer. The value of this field must be + // in the range [0, 100]. This value can only be set if the loadBalancingScheme + // in the BackendService is set to EXTERNAL (when using the classic Application + // Load Balancer) and the migration state is TEST_BY_PERCENTAGE. + ExternalManagedBackendBucketMigrationTestingPercentage float64 `json:"externalManagedBackendBucketMigrationTestingPercentage,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 ForwardingRule. Include the fingerprint in patch @@ -12002,6 +12070,20 @@ func (s ForwardingRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *ForwardingRule) UnmarshalJSON(data []byte) error { + type NoMethod ForwardingRule + var s1 struct { + ExternalManagedBackendBucketMigrationTestingPercentage gensupport.JSONFloat64 `json:"externalManagedBackendBucketMigrationTestingPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExternalManagedBackendBucketMigrationTestingPercentage = float64(s1.ExternalManagedBackendBucketMigrationTestingPercentage) + return nil +} + type ForwardingRuleAggregatedList struct { // Id: [Output Only] Unique identifier for the resource; defined by the server. Id string `json:"id,omitempty"` @@ -12562,12 +12644,6 @@ type FutureReservation struct { SelfLinkWithId string `json:"selfLinkWithId,omitempty"` // ShareSettings: List of Projects/Folders to share with. ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificReservationRequired: Indicates whether the auto-created reservation - // can be consumed by VMs with affinity for "any" reservation. If the field is - // set, then only VMs that target the reservation by name can consume from the - // delivered reservation. If set to true,the delivered resevervation will have - // the same name as the future reservation. - SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` // SpecificSkuProperties: Future Reservation configuration to indicate instance // properties and total count. SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` @@ -25899,6 +25975,14 @@ type MachineType struct { // Accelerators: [Output Only] A list of accelerator configurations assigned to // this machine type. Accelerators []*MachineTypeAccelerators `json:"accelerators,omitempty"` + // Architecture: [Output Only] The architecture of the machine type. + // + // Possible values: + // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not + // set. + // "ARM64" - Machines with architecture ARM64 + // "X86_64" - Machines with architecture X86_64 + Architecture string `json:"architecture,omitempty"` // BundledLocalSsds: [Output Only] The configuration of bundled local SSD for // the machine type. BundledLocalSsds *BundledLocalSsds `json:"bundledLocalSsds,omitempty"` @@ -56089,7 +56173,8 @@ type VpnTunnel struct { // LocalTrafficSelector: Local traffic selector to use when establishing the // VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted // string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 - // is supported. + // is supported for Classic VPN tunnels. This field is output only for HA VPN + // tunnels. LocalTrafficSelector []string `json:"localTrafficSelector,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. @@ -56115,7 +56200,8 @@ type VpnTunnel struct { // provided, the VPN tunnel will automatically use the same vpnGatewayInterface // ID in the peer Google Cloud VPN gateway. PeerGcpGateway string `json:"peerGcpGateway,omitempty"` - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. + // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. This + // field can be set only for Classic VPN tunnels. PeerIp string `json:"peerIp,omitempty"` // Region: [Output Only] URL of the region where the VPN tunnel resides. You // must specify this field as part of the HTTP request URL. It is not settable @@ -56124,7 +56210,8 @@ type VpnTunnel struct { // RemoteTrafficSelector: Remote traffic selectors to use when establishing the // VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted // string, for example: 192.168.0.0/16. The ranges should be disjoint. Only - // IPv4 is supported. + // IPv4 is supported for Classic VPN tunnels. This field is output only for HA + // VPN tunnels. RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` // Router: URL of the router resource to be used for dynamic routing. Router string `json:"router,omitempty"` @@ -56176,7 +56263,8 @@ type VpnTunnel struct { // resources are needed to setup VPN tunnel. Status string `json:"status,omitempty"` // TargetVpnGateway: URL of the Target VPN gateway with which this VPN tunnel - // is associated. Provided by the client when the VPN tunnel is created. + // is associated. Provided by the client when the VPN tunnel is created. This + // field can be set only for Classic VPN tunnels. TargetVpnGateway string `json:"targetVpnGateway,omitempty"` // VpnGateway: URL of the VPN gateway with which this VPN tunnel is associated. // Provided by the client when the VPN tunnel is created. This must be used diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index ea9fac9e3b3..7699dd712d6 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -37779,7 +37779,7 @@ } } }, - "revision": "20240730", + "revision": "20240813", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -47048,10 +47048,6 @@ "$ref": "ShareSettings", "description": "List of Projects/Folders to share with." }, - "specificReservationRequired": { - "description": "Indicates whether the auto-created reservation can be consumed by VMs with affinity for \"any\" reservation. If the field is set, then only VMs that target the reservation by name can consume from the delivered reservation. If set to true,the delivered resevervation will have the same name as the future reservation.", - "type": "boolean" - }, "specificSkuProperties": { "$ref": "FutureReservationSpecificSKUProperties", "description": "Future Reservation configuration to indicate instance properties and total count." @@ -47185,7 +47181,6 @@ }, "timestamp": { "description": "Timestamp when the matching usage was calculated", - "format": "google-datetime", "type": "string" } }, @@ -58195,6 +58190,20 @@ }, "type": "array" }, + "architecture": { + "description": "[Output Only] The architecture of the machine type.", + "enum": [ + "ARCHITECTURE_UNSPECIFIED", + "ARM64", + "X86_64" + ], + "enumDescriptions": [ + "Default value indicating Architecture is not set.", + "Machines with architecture ARM64", + "Machines with architecture X86_64" + ], + "type": "string" + }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" @@ -84498,7 +84507,7 @@ "type": "object" }, "localTrafficSelector": { - "description": "Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported.", + "description": "Local traffic selector to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.", "items": { "type": "string" }, @@ -84528,7 +84537,7 @@ "type": "string" }, "peerIp": { - "description": "IP address of the peer VPN gateway. Only IPv4 is supported.", + "description": "IP address of the peer VPN gateway. Only IPv4 is supported. This field can be set only for Classic VPN tunnels.", "type": "string" }, "region": { @@ -84536,7 +84545,7 @@ "type": "string" }, "remoteTrafficSelector": { - "description": "Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported.", + "description": "Remote traffic selectors to use when establishing the VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint. Only IPv4 is supported for Classic VPN tunnels. This field is output only for HA VPN tunnels.", "items": { "type": "string" }, @@ -84593,7 +84602,7 @@ "type": "string" }, "targetVpnGateway": { - "description": "URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", + "description": "URL of the Target VPN gateway with which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created. This field can be set only for Classic VPN tunnels.", "type": "string" }, "vpnGateway": { diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index d05761b66b9..9ea1149d2bd 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -12188,12 +12188,6 @@ type FutureReservation struct { SelfLinkWithId string `json:"selfLinkWithId,omitempty"` // ShareSettings: List of Projects/Folders to share with. ShareSettings *ShareSettings `json:"shareSettings,omitempty"` - // SpecificReservationRequired: Indicates whether the auto-created reservation - // can be consumed by VMs with affinity for "any" reservation. If the field is - // set, then only VMs that target the reservation by name can consume from the - // delivered reservation. If set to true,the delivered resevervation will have - // the same name as the future reservation. - SpecificReservationRequired bool `json:"specificReservationRequired,omitempty"` // SpecificSkuProperties: Future Reservation configuration to indicate instance // properties and total count. SpecificSkuProperties *FutureReservationSpecificSKUProperties `json:"specificSkuProperties,omitempty"` @@ -24967,6 +24961,14 @@ type MachineType struct { // Accelerators: [Output Only] A list of accelerator configurations assigned to // this machine type. Accelerators []*MachineTypeAccelerators `json:"accelerators,omitempty"` + // Architecture: [Output Only] The architecture of the machine type. + // + // Possible values: + // "ARCHITECTURE_UNSPECIFIED" - Default value indicating Architecture is not + // set. + // "ARM64" - Machines with architecture ARM64 + // "X86_64" - Machines with architecture X86_64 + Architecture string `json:"architecture,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Deprecated -- [Output Only] The deprecation status associated with this @@ -53582,7 +53584,8 @@ type VpnTunnel struct { // LocalTrafficSelector: Local traffic selector to use when establishing the // VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted // string, for example: 192.168.0.0/16. The ranges must be disjoint. Only IPv4 - // is supported. + // is supported for Classic VPN tunnels. This field is output only for HA VPN + // tunnels. LocalTrafficSelector []string `json:"localTrafficSelector,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. @@ -53608,7 +53611,8 @@ type VpnTunnel struct { // provided, the VPN tunnel will automatically use the same vpnGatewayInterface // ID in the peer Google Cloud VPN gateway. PeerGcpGateway string `json:"peerGcpGateway,omitempty"` - // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. + // PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported. This + // field can be set only for Classic VPN tunnels. PeerIp string `json:"peerIp,omitempty"` // Region: [Output Only] URL of the region where the VPN tunnel resides. You // must specify this field as part of the HTTP request URL. It is not settable @@ -53617,7 +53621,8 @@ type VpnTunnel struct { // RemoteTrafficSelector: Remote traffic selectors to use when establishing the // VPN tunnel with the peer VPN gateway. The value should be a CIDR formatted // string, for example: 192.168.0.0/16. The ranges should be disjoint. Only - // IPv4 is supported. + // IPv4 is supported for Classic VPN tunnels. This field is output only for HA + // VPN tunnels. RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"` // Router: URL of the router resource to be used for dynamic routing. Router string `json:"router,omitempty"` @@ -53669,7 +53674,8 @@ type VpnTunnel struct { // resources are needed to setup VPN tunnel. Status string `json:"status,omitempty"` // TargetVpnGateway: URL of the Target VPN gateway with which this VPN tunnel - // is associated. Provided by the client when the VPN tunnel is created. + // is associated. Provided by the client when the VPN tunnel is created. This + // field can be set only for Classic VPN tunnels. TargetVpnGateway string `json:"targetVpnGateway,omitempty"` // VpnGateway: URL of the VPN gateway with which this VPN tunnel is associated. // Provided by the client when the VPN tunnel is created. This must be used diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 547b75bf1f0..0a33fb67cd4 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1320,6 +1320,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/endpointAttachments/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. Specifies which fields of the EndpointAttachment are returned in the response. Defaults to `ENDPOINT_ATTACHMENT_VIEW_BASIC` view.", + "enum": [ + "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED", + "ENDPOINT_ATTACHMENT_VIEW_BASIC", + "ENDPOINT_ATTACHMENT_VIEW_FULL" + ], + "enumDescriptions": [ + "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED.", + "Do not include status.", + "Includes Status." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -1366,6 +1381,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. Specifies which fields of the EndpointAttachment are returned in the response. Defaults to `ENDPOINT_ATTACHMENT_VIEW_BASIC` view.", + "enum": [ + "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED", + "ENDPOINT_ATTACHMENT_VIEW_BASIC", + "ENDPOINT_ATTACHMENT_VIEW_FULL" + ], + "enumDescriptions": [ + "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED.", + "Do not include status.", + "Includes Status." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/endpointAttachments", @@ -2427,7 +2457,7 @@ } } }, - "revision": "20240729", + "revision": "20240822", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2582,6 +2612,10 @@ "displayName": { "description": "Display name for authentication template.", "type": "string" + }, + "isDefault": { + "description": "Whether the auth config is the default one.", + "type": "boolean" } }, "type": "object" @@ -2925,6 +2959,11 @@ "description": "Output only. Eventing Runtime Data.", "readOnly": true }, + "host": { + "description": "Output only. The name of the Hostname of the Service Directory service with TLS.", + "readOnly": true, + "type": "string" + }, "imageLocation": { "description": "Output only. GCR location where the runtime image is stored. formatted like: gcr.io/{bucketName}/{imageName}", "readOnly": true, @@ -2996,6 +3035,11 @@ "description": "Optional. Suspended indicates if a user has suspended a connection or not.", "type": "boolean" }, + "tlsServiceDirectory": { + "description": "Output only. The name of the Service Directory service with TLS.", + "readOnly": true, + "type": "string" + }, "updateTime": { "description": "Output only. Updated time.", "format": "google-datetime", @@ -3344,6 +3388,11 @@ "description": "Output only. Eventing configuration supported by the Connector.", "readOnly": true }, + "isAsyncOperationsSupported": { + "description": "Output only. Is async operations supported.", + "readOnly": true, + "type": "boolean" + }, "isCustomActionsSupported": { "description": "Output only. Is custom actions supported.", "readOnly": true, @@ -4039,6 +4088,31 @@ "description": "Required. The path of the service attachment", "type": "string" }, + "state": { + "description": "Output only. The Private Service Connect Connection Endpoint State. This value is only available in the Full view.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "ACCEPTED", + "REJECTED", + "CLOSED", + "FROZEN", + "NEEDS_ATTENTION", + "ACCEPTED_NOT_PROGRAMMED" + ], + "enumDescriptions": [ + "STATE_UNSPECIFIED.", + "The endpoint is pending acceptance by the producer.", + "The endpoint has been accepted by the producer.", + "The endpoint has been rejected by the producer.", + "The endpoint has been closed by the producer and will not serve traffic going forward.", + "The endpoint has been frozen by the producer and will not serve traffic.", + "The endpoint has been accepted by the producer, but it is not ready to serve the traffic due to producer side issues.", + "The endpoint has been accepted by the producer, but it cannot be programmed to the data plane due to invariant violation." + ], + "readOnly": true, + "type": "string" + }, "updateTime": { "description": "Output only. Updated time.", "format": "google-datetime", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 3ff31197752..d638a811167 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -527,6 +527,8 @@ type AuthConfigTemplate struct { Description string `json:"description,omitempty"` // DisplayName: Display name for authentication template. DisplayName string `json:"displayName,omitempty"` + // IsDefault: Whether the auth config is the default one. + IsDefault bool `json:"isDefault,omitempty"` // ForceSendFields is a list of field names (e.g. "AuthKey") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -886,6 +888,9 @@ type Connection struct { EventingEnablementType string `json:"eventingEnablementType,omitempty"` // EventingRuntimeData: Output only. Eventing Runtime Data. EventingRuntimeData *EventingRuntimeData `json:"eventingRuntimeData,omitempty"` + // Host: Output only. The name of the Hostname of the Service Directory service + // with TLS. + Host string `json:"host,omitempty"` // ImageLocation: Output only. GCR location where the runtime image is stored. // formatted like: gcr.io/{bucketName}/{imageName} ImageLocation string `json:"imageLocation,omitempty"` @@ -929,6 +934,9 @@ type Connection struct { // Suspended: Optional. Suspended indicates if a user has suspended a // connection or not. Suspended bool `json:"suspended,omitempty"` + // TlsServiceDirectory: Output only. The name of the Service Directory service + // with TLS. + TlsServiceDirectory string `json:"tlsServiceDirectory,omitempty"` // UpdateTime: Output only. Updated time. UpdateTime string `json:"updateTime,omitempty"` @@ -1192,6 +1200,8 @@ type ConnectorVersion struct { // EventingConfigTemplate: Output only. Eventing configuration supported by the // Connector. EventingConfigTemplate *EventingConfigTemplate `json:"eventingConfigTemplate,omitempty"` + // IsAsyncOperationsSupported: Output only. Is async operations supported. + IsAsyncOperationsSupported bool `json:"isAsyncOperationsSupported,omitempty"` // IsCustomActionsSupported: Output only. Is custom actions supported. IsCustomActionsSupported bool `json:"isCustomActionsSupported,omitempty"` // IsCustomEntitiesSupported: Output only. Is custom entities supported. @@ -1855,6 +1865,24 @@ type EndpointAttachment struct { Name string `json:"name,omitempty"` // ServiceAttachment: Required. The path of the service attachment ServiceAttachment string `json:"serviceAttachment,omitempty"` + // State: Output only. The Private Service Connect Connection Endpoint State. + // This value is only available in the Full view. + // + // Possible values: + // "STATE_UNSPECIFIED" - STATE_UNSPECIFIED. + // "PENDING" - The endpoint is pending acceptance by the producer. + // "ACCEPTED" - The endpoint has been accepted by the producer. + // "REJECTED" - The endpoint has been rejected by the producer. + // "CLOSED" - The endpoint has been closed by the producer and will not serve + // traffic going forward. + // "FROZEN" - The endpoint has been frozen by the producer and will not serve + // traffic. + // "NEEDS_ATTENTION" - The endpoint has been accepted by the producer, but it + // is not ready to serve the traffic due to producer side issues. + // "ACCEPTED_NOT_PROGRAMMED" - The endpoint has been accepted by the + // producer, but it cannot be programmed to the data plane due to invariant + // violation. + State string `json:"state,omitempty"` // UpdateTime: Output only. Updated time. UpdateTime string `json:"updateTime,omitempty"` @@ -9578,6 +9606,23 @@ func (r *ProjectsLocationsEndpointAttachmentsService) Get(name string) *Projects return c } +// View sets the optional parameter "view": Specifies which fields of the +// EndpointAttachment are returned in the response. Defaults to +// `ENDPOINT_ATTACHMENT_VIEW_BASIC` view. +// +// Possible values: +// +// "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED" - +// +// ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED. +// +// "ENDPOINT_ATTACHMENT_VIEW_BASIC" - Do not include status. +// "ENDPOINT_ATTACHMENT_VIEW_FULL" - Includes Status. +func (c *ProjectsLocationsEndpointAttachmentsGetCall) View(view string) *ProjectsLocationsEndpointAttachmentsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -9711,6 +9756,23 @@ func (c *ProjectsLocationsEndpointAttachmentsListCall) PageToken(pageToken strin return c } +// View sets the optional parameter "view": Specifies which fields of the +// EndpointAttachment are returned in the response. Defaults to +// `ENDPOINT_ATTACHMENT_VIEW_BASIC` view. +// +// Possible values: +// +// "ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED" - +// +// ENDPOINT_ATTACHMENT_VIEW_UNSPECIFIED. +// +// "ENDPOINT_ATTACHMENT_VIEW_BASIC" - Do not include status. +// "ENDPOINT_ATTACHMENT_VIEW_FULL" - Includes Status. +func (c *ProjectsLocationsEndpointAttachmentsListCall) View(view string) *ProjectsLocationsEndpointAttachmentsListCall { + c.urlParams_.Set("view", view) + 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/container/v1/container-api.json b/container/v1/container-api.json index 66819344202..13d79a4304e 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240722", + "revision": "20240806", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3369,6 +3369,10 @@ "$ref": "PrivateClusterConfig", "description": "Configuration for private cluster." }, + "rbacBindingConfig": { + "$ref": "RBACBindingConfig", + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." + }, "releaseChannel": { "$ref": "ReleaseChannel", "description": "Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version." @@ -3394,6 +3398,10 @@ "readOnly": true, "type": "boolean" }, + "secretManagerConfig": { + "$ref": "SecretManagerConfig", + "description": "Secret CSI driver configuration." + }, "securityPostureConfig": { "$ref": "SecurityPostureConfig", "description": "Enable/Disable Security Posture API features for the cluster." @@ -3752,6 +3760,10 @@ ], "type": "string" }, + "desiredRbacBindingConfig": { + "$ref": "RBACBindingConfig", + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." + }, "desiredReleaseChannel": { "$ref": "ReleaseChannel", "description": "The desired release channel configuration." @@ -3760,6 +3772,10 @@ "$ref": "ResourceUsageExportConfig", "description": "The desired configuration for exporting resource usage." }, + "desiredSecretManagerConfig": { + "$ref": "SecretManagerConfig", + "description": "Enable/Disable Secret Manager Config." + }, "desiredSecurityPostureConfig": { "$ref": "SecurityPostureConfig", "description": "Enable/Disable Security Posture API features for the cluster." @@ -4952,7 +4968,7 @@ "id": "MasterAuth", "properties": { "clientCertificate": { - "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint.", + "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. Issued only if client_certificate_config is set.", "readOnly": true, "type": "string" }, @@ -5482,6 +5498,13 @@ "description": "Spot flag for enabling Spot VM, which is a rebrand of the existing preemptible flag.", "type": "boolean" }, + "storagePools": { + "description": "List of Storage Pools where boot disks are provisioned.", + "items": { + "type": "string" + }, + "type": "array" + }, "tags": { "description": "The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035.", "items": { @@ -6301,6 +6324,21 @@ }, "type": "object" }, + "RBACBindingConfig": { + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.", + "id": "RBACBindingConfig", + "properties": { + "enableInsecureBindingSystemAuthenticated": { + "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjects system:authenticated.", + "type": "boolean" + }, + "enableInsecureBindingSystemUnauthenticated": { + "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjets system:anonymous or system:unauthenticated.", + "type": "boolean" + } + }, + "type": "object" + }, "RangeInfo": { "description": "RangeInfo contains the range name and the range utilization by this cluster.", "id": "RangeInfo", @@ -6621,6 +6659,17 @@ "properties": {}, "type": "object" }, + "SecretManagerConfig": { + "description": "SecretManagerConfig is config for secret manager enablement.", + "id": "SecretManagerConfig", + "properties": { + "enabled": { + "description": "Enable/Disable Secret Manager Config.", + "type": "boolean" + } + }, + "type": "object" + }, "SecurityBulletinEvent": { "description": "SecurityBulletinEvent is a notification sent to customers when a security bulletin has been posted that they are vulnerable to.", "id": "SecurityBulletinEvent", @@ -7581,6 +7630,13 @@ "$ref": "ResourceManagerTags", "description": "Desired resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Existing tags will be replaced with new values." }, + "storagePools": { + "description": "List of Storage Pools where boot disks are provisioned. Existing Storage Pools will be replaced with storage-pools.", + "items": { + "type": "string" + }, + "type": "array" + }, "tags": { "$ref": "NetworkTags", "description": "The desired network tags to be applied to all nodes in the node pool. If this field is not present, the tags will not be changed. Otherwise, the existing network tags will be *replaced* with the provided tags." diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 69e91b17e2e..34e54bc4346 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -1260,6 +1260,9 @@ type Cluster struct { ParentProductConfig *ParentProductConfig `json:"parentProductConfig,omitempty"` // PrivateClusterConfig: Configuration for private cluster. PrivateClusterConfig *PrivateClusterConfig `json:"privateClusterConfig,omitempty"` + // RbacBindingConfig: RBACBindingConfig allows user to restrict + // ClusterRoleBindings an RoleBindings that can be created. + RbacBindingConfig *RBACBindingConfig `json:"rbacBindingConfig,omitempty"` // ReleaseChannel: Release channel configuration. If left unspecified on // cluster creation and a version is specified, the cluster is enrolled in the // most mature release channel where the version is available (first checking @@ -1277,6 +1280,8 @@ type Cluster struct { SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` // SatisfiesPzs: Output only. Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + // SecretManagerConfig: Secret CSI driver configuration. + SecretManagerConfig *SecretManagerConfig `json:"secretManagerConfig,omitempty"` // SecurityPostureConfig: Enable/Disable Security Posture API features for the // cluster. SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` @@ -1606,11 +1611,16 @@ type ClusterUpdate struct { // "PRIVATE_IPV6_GOOGLE_ACCESS_BIDIRECTIONAL" - Enables private IPv6 access // to and from Google Services DesiredPrivateIpv6GoogleAccess string `json:"desiredPrivateIpv6GoogleAccess,omitempty"` + // DesiredRbacBindingConfig: RBACBindingConfig allows user to restrict + // ClusterRoleBindings an RoleBindings that can be created. + DesiredRbacBindingConfig *RBACBindingConfig `json:"desiredRbacBindingConfig,omitempty"` // DesiredReleaseChannel: The desired release channel configuration. DesiredReleaseChannel *ReleaseChannel `json:"desiredReleaseChannel,omitempty"` // DesiredResourceUsageExportConfig: The desired configuration for exporting // resource usage. DesiredResourceUsageExportConfig *ResourceUsageExportConfig `json:"desiredResourceUsageExportConfig,omitempty"` + // DesiredSecretManagerConfig: Enable/Disable Secret Manager Config. + DesiredSecretManagerConfig *SecretManagerConfig `json:"desiredSecretManagerConfig,omitempty"` // DesiredSecurityPostureConfig: Enable/Disable Security Posture API features // for the cluster. DesiredSecurityPostureConfig *SecurityPostureConfig `json:"desiredSecurityPostureConfig,omitempty"` @@ -3354,7 +3364,8 @@ func (s ManagedPrometheusConfig) MarshalJSON() ([]byte, error) { // certificates. type MasterAuth struct { // ClientCertificate: Output only. Base64-encoded public certificate used by - // clients to authenticate to the cluster endpoint. + // clients to authenticate to the cluster endpoint. Issued only if + // client_certificate_config is set. ClientCertificate string `json:"clientCertificate,omitempty"` // ClientCertificateConfig: Configuration for client certificate authentication // on the cluster. For clusters before v1.12, if no configuration is specified, @@ -3966,6 +3977,8 @@ type NodeConfig struct { // Spot: Spot flag for enabling Spot VM, which is a rebrand of the existing // preemptible flag. Spot bool `json:"spot,omitempty"` + // StoragePools: List of Storage Pools where boot disks are provisioned. + StoragePools []string `json:"storagePools,omitempty"` // Tags: The list of instance tags applied to all nodes. Tags are used to // identify valid sources or targets for network firewalls and are specified by // the client during cluster or node pool creation. Each tag within the list @@ -5004,6 +5017,36 @@ func (s QueuedProvisioning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RBACBindingConfig: RBACBindingConfig allows user to restrict +// ClusterRoleBindings an RoleBindings that can be created. +type RBACBindingConfig struct { + // EnableInsecureBindingSystemAuthenticated: Setting this to true will allow + // any ClusterRoleBinding and RoleBinding with subjects system:authenticated. + EnableInsecureBindingSystemAuthenticated bool `json:"enableInsecureBindingSystemAuthenticated,omitempty"` + // EnableInsecureBindingSystemUnauthenticated: Setting this to true will allow + // any ClusterRoleBinding and RoleBinding with subjets system:anonymous or + // system:unauthenticated. + EnableInsecureBindingSystemUnauthenticated bool `json:"enableInsecureBindingSystemUnauthenticated,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "EnableInsecureBindingSystemAuthenticated") 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. + // "EnableInsecureBindingSystemAuthenticated") 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 RBACBindingConfig) MarshalJSON() ([]byte, error) { + type NoMethod RBACBindingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RangeInfo: RangeInfo contains the range name and the range utilization by // this cluster. type RangeInfo struct { @@ -5497,6 +5540,29 @@ func (s SecondaryBootDisk) MarshalJSON() ([]byte, error) { type SecondaryBootDiskUpdateStrategy struct { } +// SecretManagerConfig: SecretManagerConfig is config for secret manager +// enablement. +type SecretManagerConfig struct { + // Enabled: Enable/Disable Secret Manager Config. + 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 SecretManagerConfig) MarshalJSON() ([]byte, error) { + type NoMethod SecretManagerConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SecurityBulletinEvent: SecurityBulletinEvent is a notification sent to // customers when a security bulletin has been posted that they are vulnerable // to. @@ -6715,6 +6781,9 @@ type UpdateNodePoolRequest struct { // attached to the nodes for managing Compute Engine firewalls using Network // Firewall Policies. Existing tags will be replaced with new values. ResourceManagerTags *ResourceManagerTags `json:"resourceManagerTags,omitempty"` + // StoragePools: List of Storage Pools where boot disks are provisioned. + // Existing Storage Pools will be replaced with storage-pools. + StoragePools []string `json:"storagePools,omitempty"` // Tags: The desired network tags to be applied to all nodes in the node pool. // If this field is not present, the tags will not be changed. Otherwise, the // existing network tags will be *replaced* with the provided tags. diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 10e0f18574b..81fe160d960 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20240722", + "revision": "20240806", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3505,6 +3505,10 @@ "deprecated": true, "description": "Deprecated: Use SecurityPostureConfig instead. Enable/Disable Protect API features for the cluster." }, + "rbacBindingConfig": { + "$ref": "RBACBindingConfig", + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." + }, "releaseChannel": { "$ref": "ReleaseChannel", "description": "Release channel configuration. If left unspecified on cluster creation and a version is specified, the cluster is enrolled in the most mature release channel where the version is available (first checking STABLE, then REGULAR, and finally RAPID). Otherwise, if no release channel configuration and no version is specified, the cluster is enrolled in the REGULAR channel with its default version." @@ -3948,6 +3952,10 @@ "deprecated": true, "description": "Deprecated: Use DesiredSecurityPostureConfig instead. Enable/Disable Protect API features for the cluster." }, + "desiredRbacBindingConfig": { + "$ref": "RBACBindingConfig", + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created." + }, "desiredReleaseChannel": { "$ref": "ReleaseChannel", "description": "The desired release channel configuration." @@ -5361,7 +5369,7 @@ "id": "MasterAuth", "properties": { "clientCertificate": { - "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint.", + "description": "Output only. Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. Issued only if client_certificate_config is set.", "readOnly": true, "type": "string" }, @@ -5930,6 +5938,13 @@ "description": "Spot flag for enabling Spot VM, which is a rebrand of the existing preemptible flag.", "type": "boolean" }, + "storagePools": { + "description": "List of Storage Pools where boot disks are provisioned.", + "items": { + "type": "string" + }, + "type": "array" + }, "tags": { "description": "The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035.", "items": { @@ -6822,6 +6837,21 @@ }, "type": "object" }, + "RBACBindingConfig": { + "description": "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created.", + "id": "RBACBindingConfig", + "properties": { + "enableInsecureBindingSystemAuthenticated": { + "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjects system:authenticated.", + "type": "boolean" + }, + "enableInsecureBindingSystemUnauthenticated": { + "description": "Setting this to true will allow any ClusterRoleBinding and RoleBinding with subjets system:anonymous or system:unauthenticated.", + "type": "boolean" + } + }, + "type": "object" + }, "RangeInfo": { "description": "RangeInfo contains the range name and the range utilization by this cluster.", "id": "RangeInfo", @@ -7160,7 +7190,7 @@ "id": "SecretManagerConfig", "properties": { "enabled": { - "description": "Whether the cluster is configured to use secret manager CSI component.", + "description": "Enable/Disable Secret Manager Config.", "type": "boolean" } }, @@ -8152,6 +8182,13 @@ "$ref": "ResourceManagerTags", "description": "Desired resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Existing tags will be replaced with new values." }, + "storagePools": { + "description": "List of Storage Pools where boot disks are provisioned. Existing Storage Pools will be replaced with storage-pools.", + "items": { + "type": "string" + }, + "type": "array" + }, "tags": { "$ref": "NetworkTags", "description": "The desired network tags to be applied to all nodes in the node pool. If this field is not present, the tags will not be changed. Otherwise, the existing network tags will be *replaced* with the provided tags." diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index d9bd4f26d70..31ccc5355f0 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -1376,6 +1376,9 @@ type Cluster struct { // ProtectConfig: Deprecated: Use SecurityPostureConfig instead. Enable/Disable // Protect API features for the cluster. ProtectConfig *ProtectConfig `json:"protectConfig,omitempty"` + // RbacBindingConfig: RBACBindingConfig allows user to restrict + // ClusterRoleBindings an RoleBindings that can be created. + RbacBindingConfig *RBACBindingConfig `json:"rbacBindingConfig,omitempty"` // ReleaseChannel: Release channel configuration. If left unspecified on // cluster creation and a version is specified, the cluster is enrolled in the // most mature release channel where the version is available (first checking @@ -1775,6 +1778,9 @@ type ClusterUpdate struct { // DesiredProtectConfig: Deprecated: Use DesiredSecurityPostureConfig instead. // Enable/Disable Protect API features for the cluster. DesiredProtectConfig *ProtectConfig `json:"desiredProtectConfig,omitempty"` + // DesiredRbacBindingConfig: RBACBindingConfig allows user to restrict + // ClusterRoleBindings an RoleBindings that can be created. + DesiredRbacBindingConfig *RBACBindingConfig `json:"desiredRbacBindingConfig,omitempty"` // DesiredReleaseChannel: The desired release channel configuration. DesiredReleaseChannel *ReleaseChannel `json:"desiredReleaseChannel,omitempty"` // DesiredResourceUsageExportConfig: The desired configuration for exporting @@ -3832,7 +3838,8 @@ type Master struct { // certificates. type MasterAuth struct { // ClientCertificate: Output only. Base64-encoded public certificate used by - // clients to authenticate to the cluster endpoint. + // clients to authenticate to the cluster endpoint. Issued only if + // client_certificate_config is set. ClientCertificate string `json:"clientCertificate,omitempty"` // ClientCertificateConfig: Configuration for client certificate authentication // on the cluster. For clusters before v1.12, if no configuration is specified, @@ -4458,6 +4465,8 @@ type NodeConfig struct { // Spot: Spot flag for enabling Spot VM, which is a rebrand of the existing // preemptible flag. Spot bool `json:"spot,omitempty"` + // StoragePools: List of Storage Pools where boot disks are provisioned. + StoragePools []string `json:"storagePools,omitempty"` // Tags: The list of instance tags applied to all nodes. Tags are used to // identify valid sources or targets for network firewalls and are specified by // the client during cluster or node pool creation. Each tag within the list @@ -5609,6 +5618,36 @@ func (s QueuedProvisioning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RBACBindingConfig: RBACBindingConfig allows user to restrict +// ClusterRoleBindings an RoleBindings that can be created. +type RBACBindingConfig struct { + // EnableInsecureBindingSystemAuthenticated: Setting this to true will allow + // any ClusterRoleBinding and RoleBinding with subjects system:authenticated. + EnableInsecureBindingSystemAuthenticated bool `json:"enableInsecureBindingSystemAuthenticated,omitempty"` + // EnableInsecureBindingSystemUnauthenticated: Setting this to true will allow + // any ClusterRoleBinding and RoleBinding with subjets system:anonymous or + // system:unauthenticated. + EnableInsecureBindingSystemUnauthenticated bool `json:"enableInsecureBindingSystemUnauthenticated,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "EnableInsecureBindingSystemAuthenticated") 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. + // "EnableInsecureBindingSystemAuthenticated") 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 RBACBindingConfig) MarshalJSON() ([]byte, error) { + type NoMethod RBACBindingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RangeInfo: RangeInfo contains the range name and the range utilization by // this cluster. type RangeInfo struct { @@ -6110,8 +6149,7 @@ type SecondaryBootDiskUpdateStrategy struct { // SecretManagerConfig: SecretManagerConfig is config for secret manager // enablement. type SecretManagerConfig struct { - // Enabled: Whether the cluster is configured to use secret manager CSI - // component. + // Enabled: Enable/Disable Secret Manager Config. 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 @@ -7377,6 +7415,9 @@ type UpdateNodePoolRequest struct { // attached to the nodes for managing Compute Engine firewalls using Network // Firewall Policies. Existing tags will be replaced with new values. ResourceManagerTags *ResourceManagerTags `json:"resourceManagerTags,omitempty"` + // StoragePools: List of Storage Pools where boot disks are provisioned. + // Existing Storage Pools will be replaced with storage-pools. + StoragePools []string `json:"storagePools,omitempty"` // Tags: The desired network tags to be applied to all nodes in the node pool. // If this field is not present, the tags will not be changed. Otherwise, the // existing network tags will be *replaced* with the provided tags. diff --git a/containeranalysis/v1/containeranalysis-api.json b/containeranalysis/v1/containeranalysis-api.json index 51dcb8cb5c0..cbdf115e2c1 100644 --- a/containeranalysis/v1/containeranalysis-api.json +++ b/containeranalysis/v1/containeranalysis-api.json @@ -16,10 +16,190 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-central2.rep.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://containeranalysis.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-central2.rep.googleapis.com/", + "location": "us-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east7.rep.googleapis.com/", + "location": "us-east7" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west4.rep.googleapis.com/", + "location": "us-west4" } ], "fullyEncodeReservedExpansion": true, @@ -229,6 +409,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}:getIamPolicy", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists notes for the specified project.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes", @@ -303,6 +511,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}:setIamPolicy", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notes/{notesId}:testIamPermissions", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.notes.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -461,6 +725,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}:getIamPolicy", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getNotes": { "description": "Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}/notes", @@ -590,6 +882,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}:setIamPolicy", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/occurrences/{occurrencesId}:testIamPermissions", + "httpMethod": "POST", + "id": "containeranalysis.projects.locations.occurrences.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/occurrences/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1307,7 +1655,7 @@ } } }, - "revision": "20240726", + "revision": "20240816", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { diff --git a/containeranalysis/v1/containeranalysis-gen.go b/containeranalysis/v1/containeranalysis-gen.go index 5c33c598bc4..842bd4cbffc 100644 --- a/containeranalysis/v1/containeranalysis-gen.go +++ b/containeranalysis/v1/containeranalysis-gen.go @@ -6745,6 +6745,114 @@ func (c *ProjectsLocationsNotesGetCall) Do(opts ...googleapi.CallOption) (*Note, return ret, nil } +type ProjectsLocationsNotesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a note or an occurrence +// resource. Requires `containeranalysis.notes.setIamPolicy` or +// `containeranalysis.occurrences.setIamPolicy` permission if the resource is a +// note or occurrence, respectively. The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsNotesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsNotesGetIamPolicyCall { + c := &ProjectsLocationsNotesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + 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 *ProjectsLocationsNotesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotesGetIamPolicyCall { + 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 *ProjectsLocationsNotesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.notes.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 *ProjectsLocationsNotesGetIamPolicyCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsNotesListCall struct { s *Service parent string @@ -7004,6 +7112,223 @@ func (c *ProjectsLocationsNotesPatchCall) Do(opts ...googleapi.CallOption) (*Not return ret, nil } +type ProjectsLocationsNotesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified note or +// occurrence. Requires `containeranalysis.notes.setIamPolicy` or +// `containeranalysis.occurrences.setIamPolicy` permission if the resource is a +// note or an occurrence, respectively. The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsNotesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsNotesSetIamPolicyCall { + c := &ProjectsLocationsNotesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + 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 *ProjectsLocationsNotesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotesSetIamPolicyCall { + 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 *ProjectsLocationsNotesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.notes.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 *ProjectsLocationsNotesSetIamPolicyCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsNotesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns the permissions that a caller has on the +// specified note or occurrence. Requires list permission on the project (for +// example, `containeranalysis.notes.list`). The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsNotesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsNotesTestIamPermissionsCall { + c := &ProjectsLocationsNotesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + 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 *ProjectsLocationsNotesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNotesTestIamPermissionsCall { + 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 *ProjectsLocationsNotesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.notes.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsNotesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsNotesOccurrencesListCall struct { s *Service name string @@ -7468,74 +7793,182 @@ type ProjectsLocationsOccurrencesGetCall struct { header_ http.Header } -// Get: Gets the specified occurrence. +// Get: Gets the specified occurrence. +// +// - name: The name of the occurrence in the form of +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. +func (r *ProjectsLocationsOccurrencesService) Get(name string) *ProjectsLocationsOccurrencesGetCall { + c := &ProjectsLocationsOccurrencesGetCall{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 *ProjectsLocationsOccurrencesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetCall { + 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 *ProjectsLocationsOccurrencesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOccurrencesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesGetCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetCall { + 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 *ProjectsLocationsOccurrencesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.occurrences.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Occurrence.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 *ProjectsLocationsOccurrencesGetCall) Do(opts ...googleapi.CallOption) (*Occurrence, 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 := &Occurrence{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOccurrencesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a note or an occurrence +// resource. Requires `containeranalysis.notes.setIamPolicy` or +// `containeranalysis.occurrences.setIamPolicy` permission if the resource is a +// note or occurrence, respectively. The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. // -// - name: The name of the occurrence in the form of -// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. -func (r *ProjectsLocationsOccurrencesService) Get(name string) *ProjectsLocationsOccurrencesGetCall { - c := &ProjectsLocationsOccurrencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsOccurrencesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsOccurrencesGetIamPolicyCall { + c := &ProjectsLocationsOccurrencesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest 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 *ProjectsLocationsOccurrencesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetCall { +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesGetIamPolicyCall { 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 *ProjectsLocationsOccurrencesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOccurrencesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOccurrencesGetCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetCall { +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesGetIamPolicyCall { 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 *ProjectsLocationsOccurrencesGetCall) Header() http.Header { +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOccurrencesGetCall) 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 *ProjectsLocationsOccurrencesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "containeranalysis.projects.locations.occurrences.get" call. +// Do executes the "containeranalysis.projects.locations.occurrences.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Occurrence.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 *ProjectsLocationsOccurrencesGetCall) Do(opts ...googleapi.CallOption) (*Occurrence, error) { +func (c *ProjectsLocationsOccurrencesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7554,7 +7987,7 @@ func (c *ProjectsLocationsOccurrencesGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Occurrence{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8052,6 +8485,223 @@ func (c *ProjectsLocationsOccurrencesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsOccurrencesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified note or +// occurrence. Requires `containeranalysis.notes.setIamPolicy` or +// `containeranalysis.occurrences.setIamPolicy` permission if the resource is a +// note or an occurrence, respectively. The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsOccurrencesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsOccurrencesSetIamPolicyCall { + c := &ProjectsLocationsOccurrencesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + 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 *ProjectsLocationsOccurrencesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesSetIamPolicyCall { + 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 *ProjectsLocationsOccurrencesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.occurrences.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 *ProjectsLocationsOccurrencesSetIamPolicyCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOccurrencesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns the permissions that a caller has on the +// specified note or occurrence. Requires list permission on the project (for +// example, `containeranalysis.notes.list`). The resource takes the format +// `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and +// `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsOccurrencesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsOccurrencesTestIamPermissionsCall { + c := &ProjectsLocationsOccurrencesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + 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 *ProjectsLocationsOccurrencesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsOccurrencesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOccurrencesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsOccurrencesTestIamPermissionsCall { + 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 *ProjectsLocationsOccurrencesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOccurrencesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "containeranalysis.projects.locations.occurrences.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsOccurrencesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsResourcesExportSBOMCall struct { s *Service name string diff --git a/containeranalysis/v1alpha1/containeranalysis-api.json b/containeranalysis/v1alpha1/containeranalysis-api.json index 974425258f2..3d778c1e716 100644 --- a/containeranalysis/v1alpha1/containeranalysis-api.json +++ b/containeranalysis/v1alpha1/containeranalysis-api.json @@ -16,10 +16,190 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-central2.rep.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://containeranalysis.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-central2.rep.googleapis.com/", + "location": "us-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east7.rep.googleapis.com/", + "location": "us-east7" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west4.rep.googleapis.com/", + "location": "us-west4" } ], "fullyEncodeReservedExpansion": true, @@ -1240,7 +1420,7 @@ } } }, - "revision": "20240704", + "revision": "20240816", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AnalysisCompleted": { diff --git a/containeranalysis/v1beta1/containeranalysis-api.json b/containeranalysis/v1beta1/containeranalysis-api.json index 24fd8c7514f..5c242b0bc7a 100644 --- a/containeranalysis/v1beta1/containeranalysis-api.json +++ b/containeranalysis/v1beta1/containeranalysis-api.json @@ -16,10 +16,190 @@ "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/container-analysis/api/reference/rest/", "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-east1.rep.googleapis.com/", + "location": "asia-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-east2.rep.googleapis.com/", + "location": "asia-east2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-northeast1.rep.googleapis.com/", + "location": "asia-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-northeast3.rep.googleapis.com/", + "location": "asia-northeast3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-south1.rep.googleapis.com/", + "location": "asia-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-south2.rep.googleapis.com/", + "location": "asia-south2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-southeast1.rep.googleapis.com/", + "location": "asia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.asia-southeast2.rep.googleapis.com/", + "location": "asia-southeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.australia-southeast1.rep.googleapis.com/", + "location": "australia-southeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-central2.rep.googleapis.com/", + "location": "europe-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-north1.rep.googleapis.com/", + "location": "europe-north1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-southwest1.rep.googleapis.com/", + "location": "europe-southwest1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west1.rep.googleapis.com/", + "location": "europe-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west2.rep.googleapis.com/", + "location": "europe-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west3.rep.googleapis.com/", + "location": "europe-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west4.rep.googleapis.com/", + "location": "europe-west4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west6.rep.googleapis.com/", + "location": "europe-west6" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.europe-west9.rep.googleapis.com/", + "location": "europe-west9" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.me-central1.rep.googleapis.com/", + "location": "me-central1" + }, { "description": "Regional Endpoint", "endpointUrl": "https://containeranalysis.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.me-west1.rep.googleapis.com/", + "location": "me-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.northamerica-northeast1.rep.googleapis.com/", + "location": "northamerica-northeast1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.northamerica-northeast2.rep.googleapis.com/", + "location": "northamerica-northeast2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.southamerica-east1.rep.googleapis.com/", + "location": "southamerica-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.southamerica-west1.rep.googleapis.com/", + "location": "southamerica-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-central1.rep.googleapis.com/", + "location": "us-central1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-central2.rep.googleapis.com/", + "location": "us-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east1.rep.googleapis.com/", + "location": "us-east1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east4.rep.googleapis.com/", + "location": "us-east4" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east5.rep.googleapis.com/", + "location": "us-east5" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-east7.rep.googleapis.com/", + "location": "us-east7" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-south1.rep.googleapis.com/", + "location": "us-south1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west1.rep.googleapis.com/", + "location": "us-west1" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west2.rep.googleapis.com/", + "location": "us-west2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://containeranalysis.us-west4.rep.googleapis.com/", + "location": "us-west4" } ], "fullyEncodeReservedExpansion": true, @@ -1363,7 +1543,7 @@ } } }, - "revision": "20240726", + "revision": "20240816", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 106597d43c1..df958414a7d 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -1100,211 +1100,6 @@ } } }, - "buyongoogleprograms": { - "methods": { - "activate": { - "description": "Reactivates the BoG program in your Merchant Center account. Moves the program to the active state when allowed, for example, when paused. This method is only available to selected merchants.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/activate", - "httpMethod": "POST", - "id": "content.buyongoogleprograms.activate", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}/activate", - "request": { - "$ref": "ActivateBuyOnGoogleProgramRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Retrieves a status of the BoG program for your Merchant Center account.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}", - "httpMethod": "GET", - "id": "content.buyongoogleprograms.get", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The Program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}", - "response": { - "$ref": "BuyOnGoogleProgramStatus" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "onboard": { - "description": "Onboards the BoG program in your Merchant Center account. By using this method, you agree to the [Terms of Service](https://merchants.google.com/mc/termsofservice/transactions/US/latest). Calling this method is only possible if the authenticated account is the same as the merchant id in the request. Calling this method multiple times will only accept Terms of Service if the latest version is not currently signed.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/onboard", - "httpMethod": "POST", - "id": "content.buyongoogleprograms.onboard", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}/onboard", - "request": { - "$ref": "OnboardBuyOnGoogleProgramRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "patch": { - "description": "Updates the status of the BoG program for your Merchant Center account.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}", - "httpMethod": "PATCH", - "id": "content.buyongoogleprograms.patch", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "The list of fields to update. If the update mask is not provided, then all the fields set in buyOnGoogleProgramStatus will be updated. Clearing fields is only possible if update mask is provided.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}", - "request": { - "$ref": "BuyOnGoogleProgramStatus" - }, - "response": { - "$ref": "BuyOnGoogleProgramStatus" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "pause": { - "description": "Pauses the BoG program in your Merchant Center account. This method is only available to selected merchants.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/pause", - "httpMethod": "POST", - "id": "content.buyongoogleprograms.pause", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}/pause", - "request": { - "$ref": "PauseBuyOnGoogleProgramRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "requestreview": { - "description": "Requests review and then activates the BoG program in your Merchant Center account for the first time. Moves the program to the REVIEW_PENDING state. This method is only available to selected merchants.", - "flatPath": "{merchantId}/buyongoogleprograms/{regionCode}/requestreview", - "httpMethod": "POST", - "id": "content.buyongoogleprograms.requestreview", - "parameterOrder": [ - "merchantId", - "regionCode" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionCode": { - "description": "Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is available.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/buyongoogleprograms/{regionCode}/requestreview", - "request": { - "$ref": "RequestReviewBuyOnGoogleProgramRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, "collections": { "methods": { "create": { @@ -2874,1340 +2669,1170 @@ } } }, - "orderinvoices": { + "ordertrackingsignals": { "methods": { - "createchargeinvoice": { - "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.", - "flatPath": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", + "create": { + "description": "Creates new order tracking signal.", + "flatPath": "{merchantId}/ordertrackingsignals", "httpMethod": "POST", - "id": "content.orderinvoices.createchargeinvoice", + "id": "content.ordertrackingsignals.create", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", + "description": "The ID of the merchant for which the order signal is created.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice", + "path": "{merchantId}/ordertrackingsignals", "request": { - "$ref": "OrderinvoicesCreateChargeInvoiceRequest" + "$ref": "OrderTrackingSignal" }, "response": { - "$ref": "OrderinvoicesCreateChargeInvoiceResponse" + "$ref": "OrderTrackingSignal" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "createrefundinvoice": { - "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice.", - "flatPath": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", + } + } + }, + "pos": { + "methods": { + "custombatch": { + "description": "Batches multiple POS-related calls in a single request.", + "flatPath": "pos/batch", "httpMethod": "POST", - "id": "content.orderinvoices.createrefundinvoice", + "id": "content.pos.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "pos/batch", + "request": { + "$ref": "PosCustomBatchRequest" + }, + "response": { + "$ref": "PosCustomBatchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "delete": { + "description": "Deletes a store for the given merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "httpMethod": "DELETE", + "id": "content.pos.delete", "parameterOrder": [ "merchantId", - "orderId" + "targetMerchantId", + "storeCode" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the POS or inventory data provider.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "storeCode": { + "description": "A store code that is unique per merchant.", + "location": "path", + "required": true, + "type": "string" + }, + "targetMerchantId": { + "description": "The ID of the target merchant.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice", - "request": { - "$ref": "OrderinvoicesCreateRefundInvoiceRequest" - }, - "response": { - "$ref": "OrderinvoicesCreateRefundInvoiceResponse" - }, + "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "orderreports": { - "methods": { - "listdisbursements": { - "description": "Retrieves a report for disbursements from your Merchant Center account.", - "flatPath": "{merchantId}/orderreports/disbursements", + }, + "get": { + "description": "Retrieves information about the given store.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "httpMethod": "GET", - "id": "content.orderreports.listdisbursements", + "id": "content.pos.get", "parameterOrder": [ - "merchantId" + "merchantId", + "targetMerchantId", + "storeCode" ], "parameters": { - "disbursementEndDate": { - "description": "The last date which disbursements occurred. In ISO 8601 format. Default: current date.", - "location": "query", + "merchantId": { + "description": "The ID of the POS or inventory data provider.", + "format": "uint64", + "location": "path", + "required": true, "type": "string" }, - "disbursementStartDate": { - "description": "The first date which disbursements occurred. In ISO 8601 format.", - "location": "query", + "storeCode": { + "description": "A store code that is unique per merchant.", + "location": "path", + "required": true, "type": "string" }, - "maxResults": { - "description": "The maximum number of disbursements to return in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "targetMerchantId": { + "description": "The ID of the target merchant.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" } }, - "path": "{merchantId}/orderreports/disbursements", + "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", "response": { - "$ref": "OrderreportsListDisbursementsResponse" + "$ref": "PosStore" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "listtransactions": { - "description": "Retrieves a list of transactions for a disbursement from your Merchant Center account.", - "flatPath": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", - "httpMethod": "GET", - "id": "content.orderreports.listtransactions", + "insert": { + "description": "Creates a store for the given merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store", + "httpMethod": "POST", + "id": "content.pos.insert", "parameterOrder": [ "merchantId", - "disbursementId" + "targetMerchantId" ], "parameters": { - "disbursementId": { - "description": "The Google-provided ID of the disbursement (found in Wallet).", + "merchantId": { + "description": "The ID of the POS or inventory data provider.", + "format": "uint64", "location": "path", "required": true, "type": "string" }, - "maxResults": { - "description": "The maximum number of disbursements to return in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "targetMerchantId": { + "description": "The ID of the target merchant.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "transactionEndDate": { - "description": "The last date in which transaction occurred. In ISO 8601 format. Default: current date.", - "location": "query", - "type": "string" - }, - "transactionStartDate": { - "description": "The first date in which transaction occurred. In ISO 8601 format.", - "location": "query", - "type": "string" } }, - "path": "{merchantId}/orderreports/disbursements/{disbursementId}/transactions", + "path": "{merchantId}/pos/{targetMerchantId}/store", + "request": { + "$ref": "PosStore" + }, "response": { - "$ref": "OrderreportsListTransactionsResponse" + "$ref": "PosStore" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "orderreturns": { - "methods": { - "acknowledge": { - "description": "Acks an order return in your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns/{returnId}/acknowledge", + }, + "inventory": { + "description": "Submit inventory for the given merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/inventory", "httpMethod": "POST", - "id": "content.orderreturns.acknowledge", + "id": "content.pos.inventory", "parameterOrder": [ "merchantId", - "returnId" + "targetMerchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the POS or inventory data provider.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "returnId": { - "description": "The ID of the return.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/orderreturns/{returnId}/acknowledge", - "request": { - "$ref": "OrderreturnsAcknowledgeRequest" - }, - "response": { - "$ref": "OrderreturnsAcknowledgeResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "createorderreturn": { - "description": "Create return in your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns/createOrderReturn", - "httpMethod": "POST", - "id": "content.orderreturns.createorderreturn", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "targetMerchantId": { + "description": "The ID of the target merchant.", "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orderreturns/createOrderReturn", + "path": "{merchantId}/pos/{targetMerchantId}/inventory", "request": { - "$ref": "OrderreturnsCreateOrderReturnRequest" + "$ref": "PosInventoryRequest" }, "response": { - "$ref": "OrderreturnsCreateOrderReturnResponse" + "$ref": "PosInventoryResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "get": { - "description": "Retrieves an order return from your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns/{returnId}", + "list": { + "description": "Lists the stores of the target merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/store", "httpMethod": "GET", - "id": "content.orderreturns.get", + "id": "content.pos.list", "parameterOrder": [ "merchantId", - "returnId" + "targetMerchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the POS or inventory data provider.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "returnId": { - "description": "Merchant order return ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/orderreturns/{returnId}", - "response": { - "$ref": "MerchantOrderReturn" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists order returns in your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns", - "httpMethod": "GET", - "id": "content.orderreturns.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "acknowledged": { - "description": "Obtains order returns that match the acknowledgement status. When set to true, obtains order returns that have been acknowledged. When false, obtains order returns that have not been acknowledged. When not provided, obtains order returns regardless of their acknowledgement status. We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged order returns are returned. ", - "location": "query", - "type": "boolean" - }, - "createdEndDate": { - "description": "Obtains order returns created before this date (inclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - }, - "createdStartDate": { - "description": "Obtains order returns created after this date (inclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - }, - "googleOrderIds": { - "description": "Obtains order returns with the specified order ids. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number.", - "location": "query", - "repeated": true, - "type": "string" - }, - "maxResults": { - "description": "The maximum number of order returns to return in the response, used for paging. The default value is 25 returns per page, and the maximum allowed value is 250 returns per page.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "targetMerchantId": { + "description": "The ID of the target merchant.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "orderBy": { - "description": "Return the results in the specified order.", - "enum": [ - "RETURN_CREATION_TIME_DESC", - "RETURN_CREATION_TIME_ASC" - ], - "enumDescriptions": [ - "Return results in descending order.", - "Return results in ascending order." - ], - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "shipmentStates": { - "description": "Obtains order returns that match any shipment state provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment states.", - "enum": [ - "NEW", - "SHIPPED", - "COMPLETED", - "UNDELIVERABLE", - "PENDING" - ], - "enumDescriptions": [ - "Return shipments with `new` state only.", - "Return shipments with `shipped` state only.", - "Return shipments with `completed` state only.", - "Return shipments with `undeliverable` state only.", - "Return shipments with `pending` state only." - ], - "location": "query", - "repeated": true, - "type": "string" - }, - "shipmentStatus": { - "description": "Obtains order returns that match any shipment status provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment statuses.", - "enum": [ - "NEW", - "IN_PROGRESS", - "PROCESSED" - ], - "enumDescriptions": [ - "Return shipments with `new` status only.", - "Return shipments with `inProgress` status only.", - "Return shipments with `processed` status only." - ], - "location": "query", - "repeated": true, - "type": "string" - }, - "shipmentTrackingNumbers": { - "description": "Obtains order returns with the specified tracking numbers. If this parameter is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus, shipmentState and acknowledged parameters must be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are provided, the obtained results will include all order returns that either match the specified order id or the specified tracking number.", - "location": "query", - "repeated": true, - "type": "string" - }, - "shipmentTypes": { - "description": "Obtains order returns that match any shipment type provided in this parameter. When this parameter is not provided, order returns are obtained regardless of their shipment types.", - "enum": [ - "BY_MAIL", - "RETURNLESS", - "CONTACT_CUSTOMER_SUPPORT" - ], - "enumDescriptions": [ - "Return shipments with type `byMail` only.", - "Return shipments with type `returnless` only.", - "Return shipments with type `contactCustomerSupport` only." - ], - "location": "query", - "repeated": true, - "type": "string" } }, - "path": "{merchantId}/orderreturns", + "path": "{merchantId}/pos/{targetMerchantId}/store", "response": { - "$ref": "OrderreturnsListResponse" + "$ref": "PosListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "process": { - "description": "Processes return in your Merchant Center account.", - "flatPath": "{merchantId}/orderreturns/{returnId}/process", + "sale": { + "description": "Submit a sale event for the given merchant.", + "flatPath": "{merchantId}/pos/{targetMerchantId}/sale", "httpMethod": "POST", - "id": "content.orderreturns.process", + "id": "content.pos.sale", "parameterOrder": [ "merchantId", - "returnId" + "targetMerchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the POS or inventory data provider.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "returnId": { - "description": "The ID of the return.", + "targetMerchantId": { + "description": "The ID of the target merchant.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orderreturns/{returnId}/process", + "path": "{merchantId}/pos/{targetMerchantId}/sale", "request": { - "$ref": "OrderreturnsProcessRequest" + "$ref": "PosSaleRequest" }, "response": { - "$ref": "OrderreturnsProcessResponse" + "$ref": "PosSaleResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] } - }, - "resources": { - "labels": { - "methods": { - "create": { - "description": "Links a return shipping label to a return id. You can only create one return label per return id. Since the label is sent to the buyer, the linked return label cannot be updated or deleted. If you try to create multiple return shipping labels for a single return id, every create request except the first will fail.", - "flatPath": "{merchantId}/orderreturns/{returnId}/labels", - "httpMethod": "POST", - "id": "content.orderreturns.labels.create", - "parameterOrder": [ - "merchantId", - "returnId" - ], - "parameters": { - "merchantId": { - "description": "Required. The merchant the Return Shipping Label belongs to.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "returnId": { - "description": "Required. Provide the Google-generated merchant order return ID.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/orderreturns/{returnId}/labels", - "request": { - "$ref": "ReturnShippingLabel" - }, - "response": { - "$ref": "ReturnShippingLabel" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - } } }, - "orders": { + "productdeliverytime": { "methods": { - "acknowledge": { - "description": "Marks an order as acknowledged.", - "flatPath": "{merchantId}/orders/{orderId}/acknowledge", + "create": { + "description": "Creates or updates the delivery time of a product.", + "flatPath": "{merchantId}/productdeliverytime", "httpMethod": "POST", - "id": "content.orders.acknowledge", + "id": "content.productdeliverytime.create", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", + "description": "The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/acknowledge", + "path": "{merchantId}/productdeliverytime", "request": { - "$ref": "OrdersAcknowledgeRequest" + "$ref": "ProductDeliveryTime" }, "response": { - "$ref": "OrdersAcknowledgeResponse" + "$ref": "ProductDeliveryTime" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "advancetestorder": { - "description": "Sandbox only. Moves a test order from state \"`inProgress`\" to state \"`pendingShipment`\".", - "flatPath": "{merchantId}/testorders/{orderId}/advance", - "httpMethod": "POST", - "id": "content.orders.advancetestorder", + "delete": { + "description": "Deletes the delivery time of a product.", + "flatPath": "{merchantId}/productdeliverytime/{productId}", + "httpMethod": "DELETE", + "id": "content.productdeliverytime.delete", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the test order to modify.", + "productId": { + "description": "Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/testorders/{orderId}/advance", - "response": { - "$ref": "OrdersAdvanceTestOrderResponse" - }, + "path": "{merchantId}/productdeliverytime/{productId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "cancel": { - "description": "Cancels all line items in an order, making a full refund.", - "flatPath": "{merchantId}/orders/{orderId}/cancel", - "httpMethod": "POST", - "id": "content.orders.cancel", + "get": { + "description": "Gets `productDeliveryTime` by `productId`.", + "flatPath": "{merchantId}/productdeliverytime/{productId}", + "httpMethod": "GET", + "id": "content.productdeliverytime.get", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order to cancel.", + "productId": { + "description": "Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/cancel", - "request": { - "$ref": "OrdersCancelRequest" - }, + "path": "{merchantId}/productdeliverytime/{productId}", "response": { - "$ref": "OrdersCancelResponse" + "$ref": "ProductDeliveryTime" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "cancellineitem": { - "description": "Cancels a line item, making a full refund.", - "flatPath": "{merchantId}/orders/{orderId}/cancelLineItem", + } + } + }, + "products": { + "methods": { + "custombatch": { + "description": "Retrieves, inserts, and deletes multiple products in a single request.", + "flatPath": "products/batch", "httpMethod": "POST", - "id": "content.orders.cancellineitem", + "id": "content.products.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "products/batch", + "request": { + "$ref": "ProductsCustomBatchRequest" + }, + "response": { + "$ref": "ProductsCustomBatchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "delete": { + "description": "Deletes a product from your Merchant Center account.", + "flatPath": "{merchantId}/products/{productId}", + "httpMethod": "DELETE", + "id": "content.products.delete", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { + "feedId": { + "description": "The Content API Supplemental Feed ID. If present then product deletion applies to the data in a supplemental feed. If absent, entire product will be deleted.", + "format": "uint64", + "location": "query", + "type": "string" + }, "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "productId": { + "description": "The REST ID of the product.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/cancelLineItem", - "request": { - "$ref": "OrdersCancelLineItemRequest" - }, - "response": { - "$ref": "OrdersCancelLineItemResponse" - }, + "path": "{merchantId}/products/{productId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "canceltestorderbycustomer": { - "description": "Sandbox only. Cancels a test order for customer-initiated cancellation.", - "flatPath": "{merchantId}/testorders/{orderId}/cancelByCustomer", - "httpMethod": "POST", - "id": "content.orders.canceltestorderbycustomer", + "get": { + "description": "Retrieves a product from your Merchant Center account.", + "flatPath": "{merchantId}/products/{productId}", + "httpMethod": "GET", + "id": "content.products.get", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the test order to cancel.", + "productId": { + "description": "The REST ID of the product.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/testorders/{orderId}/cancelByCustomer", - "request": { - "$ref": "OrdersCancelTestOrderByCustomerRequest" - }, + "path": "{merchantId}/products/{productId}", "response": { - "$ref": "OrdersCancelTestOrderByCustomerResponse" + "$ref": "Product" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "captureOrder": { - "description": "Capture funds from the customer for the current order total. This method should be called after the merchant verifies that they are able and ready to start shipping the order. This method blocks until a response is received from the payment processsor. If this method succeeds, the merchant is guaranteed to receive funds for the order after shipment. If the request fails, it can be retried or the order may be cancelled. This method cannot be called after the entire order is already shipped. A rejected error code is returned when the payment service provider has declined the charge. This indicates a problem between the PSP and either the merchant's or customer's account. Sometimes this error will be resolved by the customer. We recommend retrying these errors once per day or cancelling the order with reason `failedToCaptureFunds` if the items cannot be held.", - "flatPath": "{merchantId}/orders/{orderId}/captureOrder", + "insert": { + "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.", + "flatPath": "{merchantId}/products", "httpMethod": "POST", - "id": "content.orders.captureOrder", + "id": "content.products.insert", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { - "merchantId": { - "description": "Required. The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "int64", - "location": "path", - "required": true, + "feedId": { + "description": "The Content API Supplemental Feed ID. If present then product insertion applies to the data in a supplemental feed.", + "format": "uint64", + "location": "query", "type": "string" }, - "orderId": { - "description": "Required. The ID of the Order.", + "merchantId": { + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/captureOrder", + "path": "{merchantId}/products", "request": { - "$ref": "CaptureOrderRequest" + "$ref": "Product" }, "response": { - "$ref": "CaptureOrderResponse" + "$ref": "Product" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "createtestorder": { - "description": "Sandbox only. Creates a test order.", - "flatPath": "{merchantId}/testorders", - "httpMethod": "POST", - "id": "content.orders.createtestorder", + "list": { + "description": "Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.", + "flatPath": "{merchantId}/products", + "httpMethod": "GET", + "id": "content.products.list", "parameterOrder": [ "merchantId" ], "parameters": { + "maxResults": { + "description": "The maximum number of products to return in the response, used for paging. The default value is 25. The maximum value is 250.", + "format": "uint32", + "location": "query", + "type": "integer" + }, "merchantId": { - "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" + }, + "pageToken": { + "description": "The token returned by the previous request.", + "location": "query", + "type": "string" } }, - "path": "{merchantId}/testorders", - "request": { - "$ref": "OrdersCreateTestOrderRequest" - }, + "path": "{merchantId}/products", "response": { - "$ref": "OrdersCreateTestOrderResponse" + "$ref": "ProductsListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "createtestreturn": { - "description": "Sandbox only. Creates a test return.", - "flatPath": "{merchantId}/orders/{orderId}/testreturn", - "httpMethod": "POST", - "id": "content.orders.createtestreturn", + "update": { + "description": "Updates an existing product in your Merchant Center account. Only updates attributes provided in the request.", + "flatPath": "{merchantId}/products/{productId}", + "httpMethod": "PATCH", + "id": "content.products.update", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "productId": { + "description": "The REST ID of the product for which to update.", "location": "path", "required": true, "type": "string" + }, + "updateMask": { + "description": "The comma-separated list of product attributes to be updated. Example: `\"title,salePrice\"`. Attributes specified in the update mask without a value specified in the body will be deleted from the product. *You must specify the update mask to delete attributes.* Only top-level product attributes can be updated. If not defined, product attributes with set values will be updated and other attributes will stay unchanged.", + "format": "google-fieldmask", + "location": "query", + "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/testreturn", + "path": "{merchantId}/products/{productId}", + "request": { + "$ref": "Product" + }, + "response": { + "$ref": "Product" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, + "productstatuses": { + "methods": { + "custombatch": { + "description": "Gets the statuses of multiple products in a single request.", + "flatPath": "productstatuses/batch", + "httpMethod": "POST", + "id": "content.productstatuses.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "productstatuses/batch", "request": { - "$ref": "OrdersCreateTestReturnRequest" + "$ref": "ProductstatusesCustomBatchRequest" }, "response": { - "$ref": "OrdersCreateTestReturnResponse" + "$ref": "ProductstatusesCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { - "description": "Retrieves an order from your Merchant Center account.", - "flatPath": "{merchantId}/orders/{orderId}", + "description": "Gets the status of a product from your Merchant Center account.", + "flatPath": "{merchantId}/productstatuses/{productId}", "httpMethod": "GET", - "id": "content.orders.get", + "id": "content.productstatuses.get", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { + "destinations": { + "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", + "location": "query", + "repeated": true, + "type": "string" + }, "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "productId": { + "description": "The REST ID of the product.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}", + "path": "{merchantId}/productstatuses/{productId}", "response": { - "$ref": "Order" + "$ref": "ProductStatus" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "getbymerchantorderid": { - "description": "Retrieves an order using merchant order ID.", - "flatPath": "{merchantId}/ordersbymerchantid/{merchantOrderId}", + "list": { + "description": "Lists the statuses of the products in your Merchant Center account.", + "flatPath": "{merchantId}/productstatuses", "httpMethod": "GET", - "id": "content.orders.getbymerchantorderid", + "id": "content.productstatuses.list", "parameterOrder": [ - "merchantId", - "merchantOrderId" + "merchantId" ], "parameters": { + "destinations": { + "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", + "location": "query", + "repeated": true, + "type": "string" + }, + "maxResults": { + "description": "The maximum number of product statuses to return in the response, used for paging. The default value is 25. The maximum value is 250.", + "format": "uint32", + "location": "query", + "type": "integer" + }, "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "merchantOrderId": { - "description": "The merchant order ID to be looked for.", - "location": "path", - "required": true, + "pageToken": { + "description": "The token returned by the previous request.", + "location": "query", "type": "string" } }, - "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}", + "path": "{merchantId}/productstatuses", "response": { - "$ref": "OrdersGetByMerchantOrderIdResponse" + "$ref": "ProductstatusesListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "gettestordertemplate": { - "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.", - "flatPath": "{merchantId}/testordertemplates/{templateName}", - "httpMethod": "GET", - "id": "content.orders.gettestordertemplate", + } + } + }, + "promotions": { + "methods": { + "create": { + "description": "Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed.", + "flatPath": "{merchantId}/promotions", + "httpMethod": "POST", + "id": "content.promotions.create", "parameterOrder": [ - "merchantId", - "templateName" + "merchantId" ], "parameters": { - "country": { - "description": "The country of the template to retrieve. Defaults to \"`US`\".", - "location": "query", - "type": "string" - }, "merchantId": { - "description": "The ID of the account that should manage the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "templateName": { - "description": "The name of the template to retrieve.", - "enum": [ - "TEMPLATE1", - "TEMPLATE2", - "TEMPLATE1A", - "TEMPLATE1B", - "TEMPLATE3", - "TEMPLATE4" - ], - "enumDescriptions": [ - "Get `template1`.", - "Get `template2`.", - "Get `template1A`.", - "Get `template1B`.", - "Get `template3`.", - "Get `template4`." - ], + "description": "Required. The ID of the account that contains the collection.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/testordertemplates/{templateName}", + "path": "{merchantId}/promotions", + "request": { + "$ref": "Promotion" + }, "response": { - "$ref": "OrdersGetTestOrderTemplateResponse" + "$ref": "Promotion" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "instorerefundlineitem": { - "description": "Deprecated. Notifies that item return and refund was handled directly by merchant outside of Google payments processing (for example, cash refund done in store). Note: We recommend calling the returnrefundlineitem method to refund in-store returns. We will issue the refund directly to the customer. This helps to prevent possible differences arising between merchant and Google transaction records. We also recommend having the point of sale system communicate with Google to ensure that customers do not receive a double refund by first refunding through Google then through an in-store return.", - "flatPath": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", - "httpMethod": "POST", - "id": "content.orders.instorerefundlineitem", + "get": { + "description": "Retrieves a promotion from your Merchant Center account.", + "flatPath": "{merchantId}/promotions/{id}", + "httpMethod": "GET", + "id": "content.promotions.get", "parameterOrder": [ "merchantId", - "orderId" + "id" ], "parameters": { - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "id": { + "description": "Required. REST ID of the promotion to retrieve.", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "merchantId": { + "description": "Required. The ID of the account that contains the collection.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem", - "request": { - "$ref": "OrdersInStoreRefundLineItemRequest" - }, + "path": "{merchantId}/promotions/{id}", "response": { - "$ref": "OrdersInStoreRefundLineItemResponse" + "$ref": "Promotion" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "list": { - "description": "Lists the orders in your Merchant Center account.", - "flatPath": "{merchantId}/orders", + "description": "List all promotions from your Merchant Center account.", + "flatPath": "{merchantId}/promotions", "httpMethod": "GET", - "id": "content.orders.list", + "id": "content.promotions.list", "parameterOrder": [ "merchantId" ], "parameters": { - "acknowledged": { - "description": "Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged. We recommend using this filter set to `false`, in conjunction with the `acknowledge` call, such that only un-acknowledged orders are returned. ", + "countryCode": { + "description": "[CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for example, \"US\"), used as a filter on promotions target country.", "location": "query", - "type": "boolean" + "type": "string" }, - "maxResults": { - "description": "The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.", - "format": "uint32", + "languageCode": { + "description": "The two-letter ISO 639-1 language code associated with the promotions, used as a filter.", "location": "query", - "type": "integer" + "type": "string" }, "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The ID of the account that contains the collection.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderBy": { - "description": "Order results by placement date in descending or ascending order. Acceptable values are: - placedDateAsc - placedDateDesc ", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "placedDateEnd": { - "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - }, - "placedDateStart": { - "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.", + "pageSize": { + "description": "The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 labels will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", "location": "query", - "type": "string" + "type": "integer" }, - "statuses": { - "description": "Obtains orders that match any of the specified statuses. Note that `active` is a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled`.", - "enum": [ - "ACTIVE", - "COMPLETED", - "CANCELED", - "IN_PROGRESS", - "PENDING_SHIPMENT", - "PARTIALLY_SHIPPED", - "SHIPPED", - "PARTIALLY_DELIVERED", - "DELIVERED", - "PARTIALLY_RETURNED", - "RETURNED" - ], - "enumDescriptions": [ - "Return orders with status `active`. The `active` status includes `pendingShipment` and `partiallyShipped` orders.", - "Return orders with status `completed`. The `completed` status includes `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, `returned`, and `canceled` orders.", - "Return orders with status `canceled`.", - "Return orders with status `inProgress`.", - "Return orders with status `pendingShipment`.", - "Return orders with status `partiallyShipped`.", - "Return orders with status `shipped`.", - "Return orders with status `partiallyDelivered`.", - "Return orders with status `delivered`.", - "Return orders with status `partiallyReturned`.", - "Return orders with status `returned`." - ], + "pageToken": { + "description": "A page token, received from a previous `ListPromotion` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotion` must match the call that provided the page token.", "location": "query", - "repeated": true, "type": "string" } }, - "path": "{merchantId}/orders", + "path": "{merchantId}/promotions", "response": { - "$ref": "OrdersListResponse" + "$ref": "ListPromotionResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "refunditem": { - "description": "Issues a partial or total refund for items and shipment.", - "flatPath": "{merchantId}/orders/{orderId}/refunditem", - "httpMethod": "POST", - "id": "content.orders.refunditem", + } + } + }, + "pubsubnotificationsettings": { + "methods": { + "get": { + "description": "Retrieves a Merchant Center account's pubsub notification settings.", + "flatPath": "{merchantId}/pubsubnotificationsettings", + "httpMethod": "GET", + "id": "content.pubsubnotificationsettings.get", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account for which to get pubsub notification settings.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "orderId": { - "description": "The ID of the order to refund.", - "location": "path", - "required": true, - "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/refunditem", - "request": { - "$ref": "OrdersRefundItemRequest" - }, + "path": "{merchantId}/pubsubnotificationsettings", "response": { - "$ref": "OrdersRefundItemResponse" + "$ref": "PubsubNotificationSettings" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "refundorder": { - "description": "Issues a partial or total refund for an order.", - "flatPath": "{merchantId}/orders/{orderId}/refundorder", - "httpMethod": "POST", - "id": "content.orders.refundorder", + "update": { + "description": "Register a Merchant Center account for pubsub notifications. Note that cloud topic name shouldn't be provided as part of the request.", + "flatPath": "{merchantId}/pubsubnotificationsettings", + "httpMethod": "PUT", + "id": "content.pubsubnotificationsettings.update", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "orderId": { - "description": "The ID of the order to refund.", - "location": "path", - "required": true, - "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/refundorder", + "path": "{merchantId}/pubsubnotificationsettings", "request": { - "$ref": "OrdersRefundOrderRequest" + "$ref": "PubsubNotificationSettings" }, "response": { - "$ref": "OrdersRefundOrderResponse" + "$ref": "PubsubNotificationSettings" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "rejectreturnlineitem": { - "description": "Rejects return on an line item.", - "flatPath": "{merchantId}/orders/{orderId}/rejectReturnLineItem", - "httpMethod": "POST", - "id": "content.orders.rejectreturnlineitem", + } + } + }, + "quotas": { + "methods": { + "list": { + "description": "Lists the daily call quota and usage per method for your Merchant Center account.", + "flatPath": "{merchantId}/quotas", + "httpMethod": "GET", + "id": "content.quotas.list", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The ID of the account that has quota. This account must be an admin.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", - "location": "path", - "required": true, + "pageSize": { + "description": "The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", + "location": "query", "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem", - "request": { - "$ref": "OrdersRejectReturnLineItemRequest" - }, + "path": "{merchantId}/quotas", "response": { - "$ref": "OrdersRejectReturnLineItemResponse" + "$ref": "ListMethodQuotasResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "returnrefundlineitem": { - "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders. The Orderreturns API is the preferred way to handle returns after you receive a return from a customer. You can use Orderreturns.list or Orderreturns.get to search for the return, and then use Orderreturns.processreturn to issue the refund. If the return cannot be found, then we recommend using this API to issue a refund.", - "flatPath": "{merchantId}/orders/{orderId}/returnRefundLineItem", - "httpMethod": "POST", - "id": "content.orders.returnrefundlineitem", + } + } + }, + "recommendations": { + "methods": { + "generate": { + "description": "Generates recommendations for a merchant.", + "flatPath": "{merchantId}/recommendations/generate", + "httpMethod": "GET", + "id": "content.recommendations.generate", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { - "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, + "allowedTag": { + "description": "Optional. List of allowed tags. Tags are a set of predefined strings that describe the category that individual recommendation types belong to. User can specify zero or more tags in this field to indicate what categories of recommendations they want to receive. Current list of supported tags: - TREND", + "location": "query", + "repeated": true, + "type": "string" + }, + "languageCode": { + "description": "Optional. Language code of the client. If not set, the result will be in default language (English). This language code affects all fields prefixed with \"localized\". This should be set to ISO 639-1 country code. List of currently verified supported language code: en, fr, cs, da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, tr, th, ko, zh-CN, zh-TW, ja, id, hi", + "location": "query", "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "merchantId": { + "description": "Required. The ID of the account to fetch recommendations for.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/returnRefundLineItem", - "request": { - "$ref": "OrdersReturnRefundLineItemRequest" - }, + "path": "{merchantId}/recommendations/generate", "response": { - "$ref": "OrdersReturnRefundLineItemResponse" + "$ref": "GenerateRecommendationsResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "setlineitemmetadata": { - "description": "Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided through other methods. Submitted key-value pairs can be retrieved as part of the orders resource.", - "flatPath": "{merchantId}/orders/{orderId}/setLineItemMetadata", + "reportInteraction": { + "description": "Reports an interaction on a recommendation for a merchant.", + "flatPath": "{merchantId}/recommendations/reportInteraction", "httpMethod": "POST", - "id": "content.orders.setlineitemmetadata", + "id": "content.recommendations.reportInteraction", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", + "description": "Required. The ID of the account that wants to report an interaction.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/setLineItemMetadata", + "path": "{merchantId}/recommendations/reportInteraction", + "request": { + "$ref": "ReportInteractionRequest" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, + "regionalinventory": { + "methods": { + "custombatch": { + "description": "Updates regional inventory for multiple products or regions in a single request.", + "flatPath": "regionalinventory/batch", + "httpMethod": "POST", + "id": "content.regionalinventory.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "regionalinventory/batch", "request": { - "$ref": "OrdersSetLineItemMetadataRequest" + "$ref": "RegionalinventoryCustomBatchRequest" }, "response": { - "$ref": "OrdersSetLineItemMetadataResponse" + "$ref": "RegionalinventoryCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "shiplineitems": { - "description": "Marks line item(s) as shipped.", - "flatPath": "{merchantId}/orders/{orderId}/shipLineItems", + "insert": { + "description": "Updates the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry.", + "flatPath": "{merchantId}/products/{productId}/regionalinventory", "httpMethod": "POST", - "id": "content.orders.shiplineitems", + "id": "content.regionalinventory.insert", "parameterOrder": [ "merchantId", - "orderId" + "productId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", + "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "productId": { + "description": "The REST ID of the product for which to update the regional inventory.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/shipLineItems", + "path": "{merchantId}/products/{productId}/regionalinventory", "request": { - "$ref": "OrdersShipLineItemsRequest" + "$ref": "RegionalInventory" }, "response": { - "$ref": "OrdersShipLineItemsResponse" + "$ref": "RegionalInventory" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "updatelineitemshippingdetails": { - "description": "Updates ship by and delivery by dates for a line item.", - "flatPath": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", + } + } + }, + "regions": { + "methods": { + "create": { + "description": "Creates a region definition in your Merchant Center account.", + "flatPath": "{merchantId}/regions", "httpMethod": "POST", - "id": "content.orders.updatelineitemshippingdetails", + "id": "content.regions.create", "parameterOrder": [ - "merchantId", - "orderId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The id of the merchant for which to create region definition.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", - "location": "path", - "required": true, + "regionId": { + "description": "Required. The id of the region to create.", + "location": "query", "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails", + "path": "{merchantId}/regions", "request": { - "$ref": "OrdersUpdateLineItemShippingDetailsRequest" + "$ref": "Region" }, "response": { - "$ref": "OrdersUpdateLineItemShippingDetailsResponse" + "$ref": "Region" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "updatemerchantorderid": { - "description": "Updates the merchant order ID for a given order.", - "flatPath": "{merchantId}/orders/{orderId}/updateMerchantOrderId", - "httpMethod": "POST", - "id": "content.orders.updatemerchantorderid", + "delete": { + "description": "Deletes a region definition from your Merchant Center account.", + "flatPath": "{merchantId}/regions/{regionId}", + "httpMethod": "DELETE", + "id": "content.regions.delete", "parameterOrder": [ "merchantId", - "orderId" + "regionId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The id of the merchant for which to delete region definition.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "regionId": { + "description": "Required. The id of the region to delete.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId", - "request": { - "$ref": "OrdersUpdateMerchantOrderIdRequest" - }, - "response": { - "$ref": "OrdersUpdateMerchantOrderIdResponse" - }, + "path": "{merchantId}/regions/{regionId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "updateshipment": { - "description": "Updates a shipment's status, carrier, and/or tracking ID.", - "flatPath": "{merchantId}/orders/{orderId}/updateShipment", - "httpMethod": "POST", - "id": "content.orders.updateshipment", + "get": { + "description": "Retrieves a region defined in your Merchant Center account.", + "flatPath": "{merchantId}/regions/{regionId}", + "httpMethod": "GET", + "id": "content.regions.get", "parameterOrder": [ "merchantId", - "orderId" + "regionId" ], "parameters": { "merchantId": { - "description": "The ID of the account that manages the order. This cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The id of the merchant for which to retrieve region definition.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "orderId": { - "description": "The ID of the order.", + "regionId": { + "description": "Required. The id of the region to retrieve.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/orders/{orderId}/updateShipment", - "request": { - "$ref": "OrdersUpdateShipmentRequest" - }, + "path": "{merchantId}/regions/{regionId}", "response": { - "$ref": "OrdersUpdateShipmentResponse" + "$ref": "Region" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "ordertrackingsignals": { - "methods": { - "create": { - "description": "Creates new order tracking signal.", - "flatPath": "{merchantId}/ordertrackingsignals", - "httpMethod": "POST", - "id": "content.ordertrackingsignals.create", + }, + "list": { + "description": "Lists the regions in your Merchant Center account.", + "flatPath": "{merchantId}/regions", + "httpMethod": "GET", + "id": "content.regions.list", "parameterOrder": [ "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the merchant for which the order signal is created.", + "description": "Required. The id of the merchant for which to list region definitions.", "format": "int64", "location": "path", "required": true, "type": "string" + }, + "pageSize": { + "description": "The maximum number of regions to return. The service may return fewer than this value. If unspecified, at most 50 rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListRegions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRegions` must match the call that provided the page token.", + "location": "query", + "type": "string" } }, - "path": "{merchantId}/ordertrackingsignals", + "path": "{merchantId}/regions", + "response": { + "$ref": "ListRegionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "patch": { + "description": "Updates a region definition in your Merchant Center account.", + "flatPath": "{merchantId}/regions/{regionId}", + "httpMethod": "PATCH", + "id": "content.regions.patch", + "parameterOrder": [ + "merchantId", + "regionId" + ], + "parameters": { + "merchantId": { + "description": "Required. The id of the merchant for which to update region definition.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + }, + "regionId": { + "description": "Required. The id of the region to update.", + "location": "path", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. The comma-separated field mask indicating the fields to update. Example: `\"displayName,postalCodeArea.regionCode\"`.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "{merchantId}/regions/{regionId}", "request": { - "$ref": "OrderTrackingSignal" + "$ref": "Region" }, "response": { - "$ref": "OrderTrackingSignal" + "$ref": "Region" }, "scopes": [ "https://www.googleapis.com/auth/content" @@ -4215,239 +3840,319 @@ } } }, - "pos": { + "reports": { + "methods": { + "search": { + "description": "Retrieves merchant performance metrics matching the search query and optionally segmented by selected dimensions.", + "flatPath": "{merchantId}/reports/search", + "httpMethod": "POST", + "id": "content.reports.search", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "merchantId": { + "description": "Required. Id of the merchant making the call. Must be a standalone account or an MCA subaccount.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{merchantId}/reports/search", + "request": { + "$ref": "SearchRequest" + }, + "response": { + "$ref": "SearchResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, + "returnaddress": { "methods": { "custombatch": { - "description": "Batches multiple POS-related calls in a single request.", - "flatPath": "pos/batch", + "description": "Batches multiple return address related calls in a single request.", + "flatPath": "returnaddress/batch", "httpMethod": "POST", - "id": "content.pos.custombatch", + "id": "content.returnaddress.custombatch", "parameterOrder": [], "parameters": {}, - "path": "pos/batch", + "path": "returnaddress/batch", "request": { - "$ref": "PosCustomBatchRequest" + "$ref": "ReturnaddressCustomBatchRequest" }, "response": { - "$ref": "PosCustomBatchResponse" + "$ref": "ReturnaddressCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "delete": { - "description": "Deletes a store for the given merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "description": "Deletes a return address for the given Merchant Center account.", + "flatPath": "{merchantId}/returnaddress/{returnAddressId}", "httpMethod": "DELETE", - "id": "content.pos.delete", + "id": "content.returnaddress.delete", "parameterOrder": [ "merchantId", - "targetMerchantId", - "storeCode" + "returnAddressId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account from which to delete the given return address.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "storeCode": { - "description": "A store code that is unique per merchant.", - "location": "path", - "required": true, - "type": "string" - }, - "targetMerchantId": { - "description": "The ID of the target merchant.", - "format": "uint64", + "returnAddressId": { + "description": "Return address ID generated by Google.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "path": "{merchantId}/returnaddress/{returnAddressId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { - "description": "Retrieves information about the given store.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "description": "Gets a return address of the Merchant Center account.", + "flatPath": "{merchantId}/returnaddress/{returnAddressId}", "httpMethod": "GET", - "id": "content.pos.get", + "id": "content.returnaddress.get", "parameterOrder": [ "merchantId", - "targetMerchantId", - "storeCode" + "returnAddressId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account to get a return address for.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "storeCode": { - "description": "A store code that is unique per merchant.", - "location": "path", - "required": true, - "type": "string" - }, - "targetMerchantId": { - "description": "The ID of the target merchant.", - "format": "uint64", + "returnAddressId": { + "description": "Return address ID generated by Google.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}", + "path": "{merchantId}/returnaddress/{returnAddressId}", "response": { - "$ref": "PosStore" + "$ref": "ReturnAddress" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "insert": { - "description": "Creates a store for the given merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/store", + "description": "Inserts a return address for the Merchant Center account.", + "flatPath": "{merchantId}/returnaddress", "httpMethod": "POST", - "id": "content.pos.insert", + "id": "content.returnaddress.insert", "parameterOrder": [ - "merchantId", - "targetMerchantId" + "merchantId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "targetMerchantId": { - "description": "The ID of the target merchant.", + "description": "The Merchant Center account to insert a return address for.", "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/store", + "path": "{merchantId}/returnaddress", "request": { - "$ref": "PosStore" + "$ref": "ReturnAddress" }, "response": { - "$ref": "PosStore" + "$ref": "ReturnAddress" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "inventory": { - "description": "Submit inventory for the given merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/inventory", - "httpMethod": "POST", - "id": "content.pos.inventory", + "list": { + "description": "Lists the return addresses of the Merchant Center account.", + "flatPath": "{merchantId}/returnaddress", + "httpMethod": "GET", + "id": "content.returnaddress.list", "parameterOrder": [ - "merchantId", - "targetMerchantId" + "merchantId" ], "parameters": { + "country": { + "description": "List only return addresses applicable to the given country of sale. When omitted, all return addresses are listed.", + "location": "query", + "type": "string" + }, + "maxResults": { + "description": "The maximum number of addresses in the response, used for paging.", + "format": "uint32", + "location": "query", + "type": "integer" + }, "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account to list return addresses for.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "targetMerchantId": { - "description": "The ID of the target merchant.", - "format": "uint64", - "location": "path", - "required": true, + "pageToken": { + "description": "The token returned by the previous request.", + "location": "query", "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/inventory", + "path": "{merchantId}/returnaddress", + "response": { + "$ref": "ReturnaddressListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, + "returnpolicy": { + "methods": { + "custombatch": { + "description": "Batches multiple return policy related calls in a single request.", + "flatPath": "returnpolicy/batch", + "httpMethod": "POST", + "id": "content.returnpolicy.custombatch", + "parameterOrder": [], + "parameters": {}, + "path": "returnpolicy/batch", "request": { - "$ref": "PosInventoryRequest" + "$ref": "ReturnpolicyCustomBatchRequest" }, "response": { - "$ref": "PosInventoryResponse" + "$ref": "ReturnpolicyCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "list": { - "description": "Lists the stores of the target merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/store", - "httpMethod": "GET", - "id": "content.pos.list", + "delete": { + "description": "Deletes a return policy for the given Merchant Center account.", + "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", + "httpMethod": "DELETE", + "id": "content.returnpolicy.delete", "parameterOrder": [ "merchantId", - "targetMerchantId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account from which to delete the given return policy.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "targetMerchantId": { - "description": "The ID of the target merchant.", - "format": "uint64", + "returnPolicyId": { + "description": "Return policy ID generated by Google.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/store", - "response": { - "$ref": "PosListResponse" - }, + "path": "{merchantId}/returnpolicy/{returnPolicyId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "sale": { - "description": "Submit a sale event for the given merchant.", - "flatPath": "{merchantId}/pos/{targetMerchantId}/sale", - "httpMethod": "POST", - "id": "content.pos.sale", + "get": { + "description": "Gets a return policy of the Merchant Center account.", + "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", + "httpMethod": "GET", + "id": "content.returnpolicy.get", "parameterOrder": [ "merchantId", - "targetMerchantId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "The ID of the POS or inventory data provider.", + "description": "The Merchant Center account to get a return policy for.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "targetMerchantId": { - "description": "The ID of the target merchant.", + "returnPolicyId": { + "description": "Return policy ID generated by Google.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{merchantId}/returnpolicy/{returnPolicyId}", + "response": { + "$ref": "ReturnPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "insert": { + "description": "Inserts a return policy for the Merchant Center account.", + "flatPath": "{merchantId}/returnpolicy", + "httpMethod": "POST", + "id": "content.returnpolicy.insert", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "merchantId": { + "description": "The Merchant Center account to insert a return policy for.", "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pos/{targetMerchantId}/sale", + "path": "{merchantId}/returnpolicy", "request": { - "$ref": "PosSaleRequest" + "$ref": "ReturnPolicy" }, "response": { - "$ref": "PosSaleResponse" + "$ref": "ReturnPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "list": { + "description": "Lists the return policies of the Merchant Center account.", + "flatPath": "{merchantId}/returnpolicy", + "httpMethod": "GET", + "id": "content.returnpolicy.list", + "parameterOrder": [ + "merchantId" + ], + "parameters": { + "merchantId": { + "description": "The Merchant Center account to list return policies for.", + "format": "uint64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "{merchantId}/returnpolicy", + "response": { + "$ref": "ReturnpolicyListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" @@ -4455,237 +4160,210 @@ } } }, - "productdeliverytime": { + "returnpolicyonline": { "methods": { "create": { - "description": "Creates or updates the delivery time of a product.", - "flatPath": "{merchantId}/productdeliverytime", + "description": "Creates a new return policy.", + "flatPath": "{merchantId}/returnpolicyonline", "httpMethod": "POST", - "id": "content.productdeliverytime.create", + "id": "content.returnpolicyonline.create", "parameterOrder": [ "merchantId" ], "parameters": { "merchantId": { - "description": "The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/productdeliverytime", + "path": "{merchantId}/returnpolicyonline", "request": { - "$ref": "ProductDeliveryTime" + "$ref": "ReturnPolicyOnline" }, "response": { - "$ref": "ProductDeliveryTime" + "$ref": "ReturnPolicyOnline" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "delete": { - "description": "Deletes the delivery time of a product.", - "flatPath": "{merchantId}/productdeliverytime/{productId}", + "description": "Deletes an existing return policy.", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", "httpMethod": "DELETE", - "id": "content.productdeliverytime.delete", + "id": "content.returnpolicyonline.delete", "parameterOrder": [ "merchantId", - "productId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", "format": "int64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`.", + "returnPolicyId": { + "description": "Required. The id of the return policy to delete.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/productdeliverytime/{productId}", + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { - "description": "Gets `productDeliveryTime` by `productId`.", - "flatPath": "{merchantId}/productdeliverytime/{productId}", + "description": "Gets an existing return policy.", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", "httpMethod": "GET", - "id": "content.productdeliverytime.get", + "id": "content.returnpolicyonline.get", "parameterOrder": [ "merchantId", - "productId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account.", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", "format": "int64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`.", + "returnPolicyId": { + "description": "Required. The id of the return policy to retrieve.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/productdeliverytime/{productId}", - "response": { - "$ref": "ProductDeliveryTime" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "products": { - "methods": { - "custombatch": { - "description": "Retrieves, inserts, and deletes multiple products in a single request.", - "flatPath": "products/batch", - "httpMethod": "POST", - "id": "content.products.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "products/batch", - "request": { - "$ref": "ProductsCustomBatchRequest" - }, + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", "response": { - "$ref": "ProductsCustomBatchResponse" + "$ref": "ReturnPolicyOnline" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "delete": { - "description": "Deletes a product from your Merchant Center account.", - "flatPath": "{merchantId}/products/{productId}", - "httpMethod": "DELETE", - "id": "content.products.delete", + "list": { + "description": "Lists all existing return policies.", + "flatPath": "{merchantId}/returnpolicyonline", + "httpMethod": "GET", + "id": "content.returnpolicyonline.list", "parameterOrder": [ - "merchantId", - "productId" + "merchantId" ], "parameters": { - "feedId": { - "description": "The Content API Supplemental Feed ID. If present then product deletion applies to the data in a supplemental feed. If absent, entire product will be deleted.", - "format": "uint64", - "location": "query", - "type": "string" - }, "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "productId": { - "description": "The REST ID of the product.", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", + "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/products/{productId}", + "path": "{merchantId}/returnpolicyonline", + "response": { + "$ref": "ListReturnPolicyOnlineResponse" + }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "get": { - "description": "Retrieves a product from your Merchant Center account.", - "flatPath": "{merchantId}/products/{productId}", - "httpMethod": "GET", - "id": "content.products.get", + "patch": { + "description": "Updates an existing return policy.", + "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", + "httpMethod": "PATCH", + "id": "content.returnpolicyonline.patch", "parameterOrder": [ "merchantId", - "productId" + "returnPolicyId" ], "parameters": { "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", + "description": "Required. The id of the merchant for which to retrieve the return policy online object.", + "format": "int64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "The REST ID of the product.", + "returnPolicyId": { + "description": "Required. The id of the return policy to update.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/products/{productId}", + "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", + "request": { + "$ref": "ReturnPolicyOnline" + }, "response": { - "$ref": "Product" + "$ref": "ReturnPolicyOnline" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "insert": { - "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.", - "flatPath": "{merchantId}/products", - "httpMethod": "POST", - "id": "content.products.insert", + } + } + }, + "settlementreports": { + "methods": { + "get": { + "description": "Retrieves a settlement report from your Merchant Center account.", + "flatPath": "{merchantId}/settlementreports/{settlementId}", + "httpMethod": "GET", + "id": "content.settlementreports.get", "parameterOrder": [ - "merchantId" + "merchantId", + "settlementId" ], "parameters": { - "feedId": { - "description": "The Content API Supplemental Feed ID. If present then product insertion applies to the data in a supplemental feed.", + "merchantId": { + "description": "The Merchant Center account of the settlement report.", "format": "uint64", - "location": "query", + "location": "path", + "required": true, "type": "string" }, - "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", + "settlementId": { + "description": "The Google-provided ID of the settlement.", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/products", - "request": { - "$ref": "Product" - }, + "path": "{merchantId}/settlementreports/{settlementId}", "response": { - "$ref": "Product" + "$ref": "SettlementReport" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "list": { - "description": "Lists the products in your Merchant Center account. The response might contain fewer items than specified by maxResults. Rely on nextPageToken to determine if there are more items to be requested.", - "flatPath": "{merchantId}/products", + "description": "Retrieves a list of settlement reports from your Merchant Center account.", + "flatPath": "{merchantId}/settlementreports", "httpMethod": "GET", - "id": "content.products.list", + "id": "content.settlementreports.list", "parameterOrder": [ "merchantId" ], "parameters": { "maxResults": { - "description": "The maximum number of products to return in the response, used for paging. The default value is 25. The maximum value is 250.", + "description": "The maximum number of settlements to return in the response, used for paging. The default value is 200 returns per page, and the maximum allowed value is 5000 returns per page.", "format": "uint32", "location": "query", "type": "integer" }, "merchantId": { - "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", + "description": "The Merchant Center account to list settlements for.", "format": "uint64", "location": "path", "required": true, @@ -4695,52 +4373,74 @@ "description": "The token returned by the previous request.", "location": "query", "type": "string" + }, + "transferEndDate": { + "description": "Obtains settlements which have transactions before this date (inclusively), in ISO 8601 format.", + "location": "query", + "type": "string" + }, + "transferStartDate": { + "description": "Obtains settlements which have transactions after this date (inclusively), in ISO 8601 format.", + "location": "query", + "type": "string" } }, - "path": "{merchantId}/products", + "path": "{merchantId}/settlementreports", "response": { - "$ref": "ProductsListResponse" + "$ref": "SettlementreportsListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - }, - "update": { - "description": "Updates an existing product in your Merchant Center account. Only updates attributes provided in the request.", - "flatPath": "{merchantId}/products/{productId}", - "httpMethod": "PATCH", - "id": "content.products.update", + } + } + }, + "settlementtransactions": { + "methods": { + "list": { + "description": "Retrieves a list of transactions for the settlement.", + "flatPath": "{merchantId}/settlementreports/{settlementId}/transactions", + "httpMethod": "GET", + "id": "content.settlementtransactions.list", "parameterOrder": [ "merchantId", - "productId" + "settlementId" ], "parameters": { + "maxResults": { + "description": "The maximum number of transactions to return in the response, used for paging. The default value is 200 transactions per page, and the maximum allowed value is 5000 transactions per page.", + "format": "uint32", + "location": "query", + "type": "integer" + }, "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", + "description": "The Merchant Center account to list transactions for.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "The REST ID of the product for which to update.", + "pageToken": { + "description": "The token returned by the previous request.", + "location": "query", + "type": "string" + }, + "settlementId": { + "description": "The Google-provided ID of the settlement.", "location": "path", "required": true, "type": "string" }, - "updateMask": { - "description": "The comma-separated list of product attributes to be updated. Example: `\"title,salePrice\"`. Attributes specified in the update mask without a value specified in the body will be deleted from the product. *You must specify the update mask to delete attributes.* Only top-level product attributes can be updated. If not defined, product attributes with set values will be updated and other attributes will stay unchanged.", - "format": "google-fieldmask", + "transactionIds": { + "description": "The list of transactions to return. If not set, all transactions will be returned.", "location": "query", + "repeated": true, "type": "string" } }, - "path": "{merchantId}/products/{productId}", - "request": { - "$ref": "Product" - }, + "path": "{merchantId}/settlementreports/{settlementId}/transactions", "response": { - "$ref": "Product" + "$ref": "SettlementtransactionsListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" @@ -4748,308 +4448,201 @@ } } }, - "productstatuses": { + "shippingsettings": { "methods": { "custombatch": { - "description": "Gets the statuses of multiple products in a single request.", - "flatPath": "productstatuses/batch", + "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", + "flatPath": "shippingsettings/batch", "httpMethod": "POST", - "id": "content.productstatuses.custombatch", + "id": "content.shippingsettings.custombatch", "parameterOrder": [], "parameters": {}, - "path": "productstatuses/batch", + "path": "shippingsettings/batch", "request": { - "$ref": "ProductstatusesCustomBatchRequest" + "$ref": "ShippingsettingsCustomBatchRequest" }, "response": { - "$ref": "ProductstatusesCustomBatchResponse" + "$ref": "ShippingsettingsCustomBatchResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "get": { - "description": "Gets the status of a product from your Merchant Center account.", - "flatPath": "{merchantId}/productstatuses/{productId}", + "description": "Retrieves the shipping settings of the account.", + "flatPath": "{merchantId}/shippingsettings/{accountId}", "httpMethod": "GET", - "id": "content.productstatuses.get", + "id": "content.shippingsettings.get", "parameterOrder": [ "merchantId", - "productId" + "accountId" ], "parameters": { - "destinations": { - "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - "location": "query", - "repeated": true, - "type": "string" - }, - "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", + "accountId": { + "description": "The ID of the account for which to get/update shipping settings.", "format": "uint64", "location": "path", "required": true, "type": "string" }, - "productId": { - "description": "The REST ID of the product.", + "merchantId": { + "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/productstatuses/{productId}", + "path": "{merchantId}/shippingsettings/{accountId}", "response": { - "$ref": "ProductStatus" + "$ref": "ShippingSettings" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "list": { - "description": "Lists the statuses of the products in your Merchant Center account.", - "flatPath": "{merchantId}/productstatuses", + "getsupportedcarriers": { + "description": "Retrieves supported carriers and carrier services for an account.", + "flatPath": "{merchantId}/supportedCarriers", "httpMethod": "GET", - "id": "content.productstatuses.list", + "id": "content.shippingsettings.getsupportedcarriers", "parameterOrder": [ "merchantId" ], "parameters": { - "destinations": { - "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - "location": "query", - "repeated": true, - "type": "string" - }, - "maxResults": { - "description": "The maximum number of product statuses to return in the response, used for paging. The default value is 25. The maximum value is 250.", - "format": "uint32", - "location": "query", - "type": "integer" - }, "merchantId": { - "description": "The ID of the account that contains the products. This account cannot be a multi-client account.", + "description": "The ID of the account for which to retrieve the supported carriers.", "format": "uint64", "location": "path", "required": true, "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" } }, - "path": "{merchantId}/productstatuses", + "path": "{merchantId}/supportedCarriers", "response": { - "$ref": "ProductstatusesListResponse" + "$ref": "ShippingsettingsGetSupportedCarriersResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "promotions": { - "methods": { - "create": { - "description": "Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed.", - "flatPath": "{merchantId}/promotions", - "httpMethod": "POST", - "id": "content.promotions.create", + }, + "getsupportedholidays": { + "description": "Retrieves supported holidays for an account.", + "flatPath": "{merchantId}/supportedHolidays", + "httpMethod": "GET", + "id": "content.shippingsettings.getsupportedholidays", "parameterOrder": [ "merchantId" ], "parameters": { "merchantId": { - "description": "Required. The ID of the account that contains the collection.", - "format": "int64", + "description": "The ID of the account for which to retrieve the supported holidays.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/promotions", - "request": { - "$ref": "Promotion" - }, + "path": "{merchantId}/supportedHolidays", "response": { - "$ref": "Promotion" + "$ref": "ShippingsettingsGetSupportedHolidaysResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "get": { - "description": "Retrieves a promotion from your Merchant Center account.", - "flatPath": "{merchantId}/promotions/{id}", + "getsupportedpickupservices": { + "description": "Retrieves supported pickup services for an account.", + "flatPath": "{merchantId}/supportedPickupServices", "httpMethod": "GET", - "id": "content.promotions.get", + "id": "content.shippingsettings.getsupportedpickupservices", "parameterOrder": [ - "merchantId", - "id" + "merchantId" ], "parameters": { - "id": { - "description": "Required. REST ID of the promotion to retrieve.", - "location": "path", - "required": true, - "type": "string" - }, "merchantId": { - "description": "Required. The ID of the account that contains the collection.", - "format": "int64", + "description": "The ID of the account for which to retrieve the supported pickup services.", + "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/promotions/{id}", + "path": "{merchantId}/supportedPickupServices", "response": { - "$ref": "Promotion" + "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, "list": { - "description": "List all promotions from your Merchant Center account.", - "flatPath": "{merchantId}/promotions", + "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", + "flatPath": "{merchantId}/shippingsettings", "httpMethod": "GET", - "id": "content.promotions.list", + "id": "content.shippingsettings.list", "parameterOrder": [ "merchantId" ], "parameters": { - "countryCode": { - "description": "[CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) (for example, \"US\"), used as a filter on promotions target country.", - "location": "query", - "type": "string" - }, - "languageCode": { - "description": "The two-letter ISO 639-1 language code associated with the promotions, used as a filter.", + "maxResults": { + "description": "The maximum number of shipping settings to return in the response, used for paging.", + "format": "uint32", "location": "query", - "type": "string" + "type": "integer" }, "merchantId": { - "description": "Required. The ID of the account that contains the collection.", - "format": "int64", + "description": "The ID of the managing account. This must be a multi-client account.", + "format": "uint64", "location": "path", "required": true, "type": "string" }, - "pageSize": { - "description": "The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 labels will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, "pageToken": { - "description": "A page token, received from a previous `ListPromotion` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotion` must match the call that provided the page token.", + "description": "The token returned by the previous request.", "location": "query", "type": "string" } }, - "path": "{merchantId}/promotions", + "path": "{merchantId}/shippingsettings", "response": { - "$ref": "ListPromotionResponse" + "$ref": "ShippingsettingsListResponse" }, "scopes": [ "https://www.googleapis.com/auth/content" ] - } - } - }, - "pubsubnotificationsettings": { - "methods": { - "get": { - "description": "Retrieves a Merchant Center account's pubsub notification settings.", - "flatPath": "{merchantId}/pubsubnotificationsettings", - "httpMethod": "GET", - "id": "content.pubsubnotificationsettings.get", + }, + "update": { + "description": "Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.", + "flatPath": "{merchantId}/shippingsettings/{accountId}", + "httpMethod": "PUT", + "id": "content.shippingsettings.update", "parameterOrder": [ - "merchantId" + "merchantId", + "accountId" ], "parameters": { + "accountId": { + "description": "The ID of the account for which to get/update shipping settings.", + "format": "uint64", + "location": "path", + "required": true, + "type": "string" + }, "merchantId": { - "description": "The ID of the account for which to get pubsub notification settings.", + "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", "format": "uint64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/pubsubnotificationsettings", - "response": { - "$ref": "PubsubNotificationSettings" + "path": "{merchantId}/shippingsettings/{accountId}", + "request": { + "$ref": "ShippingSettings" }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "update": { - "description": "Register a Merchant Center account for pubsub notifications. Note that cloud topic name shouldn't be provided as part of the request.", - "flatPath": "{merchantId}/pubsubnotificationsettings", - "httpMethod": "PUT", - "id": "content.pubsubnotificationsettings.update", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/pubsubnotificationsettings", - "request": { - "$ref": "PubsubNotificationSettings" - }, - "response": { - "$ref": "PubsubNotificationSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "quotas": { - "methods": { - "list": { - "description": "Lists the daily call quota and usage per method for your Merchant Center account.", - "flatPath": "{merchantId}/quotas", - "httpMethod": "GET", - "id": "content.quotas.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account that has quota. This account must be an admin.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The maximum number of quotas to return in the response, used for paging. Defaults to 500; values above 1000 will be coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Token (if provided) to retrieve the subsequent page. All other parameters must match the original call that provided the page token.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/quotas", "response": { - "$ref": "ListMethodQuotasResponse" + "$ref": "ShippingSettings" }, "scopes": [ "https://www.googleapis.com/auth/content" @@ -5057,5735 +4650,2387 @@ } } }, - "recommendations": { + "shoppingadsprogram": { "methods": { - "generate": { - "description": "Generates recommendations for a merchant.", - "flatPath": "{merchantId}/recommendations/generate", + "get": { + "description": "Retrieves the status and review eligibility for the Shopping Ads program. Returns errors and warnings if they require action to resolve, will become disapprovals, or impact impressions. Use `accountstatuses` to view all issues for an account.", + "flatPath": "{merchantId}/shoppingadsprogram", "httpMethod": "GET", - "id": "content.recommendations.generate", + "id": "content.shoppingadsprogram.get", "parameterOrder": [ "merchantId" ], "parameters": { - "allowedTag": { - "description": "Optional. List of allowed tags. Tags are a set of predefined strings that describe the category that individual recommendation types belong to. User can specify zero or more tags in this field to indicate what categories of recommendations they want to receive. Current list of supported tags: - TREND", - "location": "query", - "repeated": true, - "type": "string" - }, - "languageCode": { - "description": "Optional. Language code of the client. If not set, the result will be in default language (English). This language code affects all fields prefixed with \"localized\". This should be set to ISO 639-1 country code. List of currently verified supported language code: en, fr, cs, da, de, es, it, nl, no, pl, pt, pt, fi, sv, vi, tr, th, ko, zh-CN, zh-TW, ja, id, hi", - "location": "query", - "type": "string" - }, "merchantId": { - "description": "Required. The ID of the account to fetch recommendations for.", + "description": "Required. The ID of the account.", "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/recommendations/generate", + "path": "{merchantId}/shoppingadsprogram", "response": { - "$ref": "GenerateRecommendationsResponse" + "$ref": "ShoppingAdsProgramStatus" }, "scopes": [ "https://www.googleapis.com/auth/content" ] }, - "reportInteraction": { - "description": "Reports an interaction on a recommendation for a merchant.", - "flatPath": "{merchantId}/recommendations/reportInteraction", + "requestreview": { + "description": "Requests a review of Shopping ads in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.", + "flatPath": "{merchantId}/shoppingadsprogram/requestreview", "httpMethod": "POST", - "id": "content.recommendations.reportInteraction", + "id": "content.shoppingadsprogram.requestreview", "parameterOrder": [ "merchantId" ], "parameters": { "merchantId": { - "description": "Required. The ID of the account that wants to report an interaction.", + "description": "Required. The ID of the account.", "format": "int64", "location": "path", "required": true, "type": "string" } }, - "path": "{merchantId}/recommendations/reportInteraction", + "path": "{merchantId}/shoppingadsprogram/requestreview", "request": { - "$ref": "ReportInteractionRequest" + "$ref": "RequestReviewShoppingAdsRequest" }, "scopes": [ "https://www.googleapis.com/auth/content" ] } } - }, - "regionalinventory": { - "methods": { - "custombatch": { - "description": "Updates regional inventory for multiple products or regions in a single request.", - "flatPath": "regionalinventory/batch", - "httpMethod": "POST", - "id": "content.regionalinventory.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "regionalinventory/batch", - "request": { - "$ref": "RegionalinventoryCustomBatchRequest" + } + }, + "revision": "20240825", + "rootUrl": "https://shoppingcontent.googleapis.com/", + "schemas": { + "Account": { + "description": "Account data. After the creation of a new account it may take a few minutes before it's fully operational. The methods delete, insert, and update require the admin role.", + "id": "Account", + "properties": { + "accountManagement": { + "description": "Output only. How the account is managed. Acceptable values are: - \"`manual`\" - \"`automatic`\" ", + "readOnly": true, + "type": "string" + }, + "adsLinks": { + "description": "Linked Ads accounts that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected either in the Ads interface or through the Google Ads API. To delete an active link, or to cancel a link request, remove it from the list.", + "items": { + "$ref": "AccountAdsLink" }, - "response": { - "$ref": "RegionalinventoryCustomBatchResponse" + "type": "array" + }, + "adultContent": { + "description": "Indicates whether the merchant sells adult content.", + "type": "boolean" + }, + "automaticImprovements": { + "$ref": "AccountAutomaticImprovements", + "description": "The automatic improvements of the account can be used to automatically update items, improve images and shipping. Each section inside AutomaticImprovements is updated separately." + }, + "automaticLabelIds": { + "description": "Automatically created label IDs that are assigned to the account by CSS Center.", + "items": { + "format": "uint64", + "type": "string" }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] + "type": "array" }, - "insert": { - "description": "Updates the regional inventory of a product in your Merchant Center account. If a regional inventory with the same region ID already exists, this method updates that entry.", - "flatPath": "{merchantId}/products/{productId}/regionalinventory", - "httpMethod": "POST", - "id": "content.regionalinventory.insert", - "parameterOrder": [ - "merchantId", - "productId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account that contains the product. This account cannot be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "productId": { - "description": "The REST ID of the product for which to update the regional inventory.", - "location": "path", - "required": true, - "type": "string" - } + "businessIdentity": { + "$ref": "AccountBusinessIdentity", + "description": "The business identity attributes can be used to self-declare attributes that let customers know more about your business." + }, + "businessInformation": { + "$ref": "AccountBusinessInformation", + "description": "The business information of the account." + }, + "conversionSettings": { + "$ref": "AccountConversionSettings", + "description": "Settings for conversion tracking." + }, + "cssId": { + "description": "ID of CSS the account belongs to.", + "format": "uint64", + "type": "string" + }, + "googleMyBusinessLink": { + "$ref": "AccountGoogleMyBusinessLink", + "description": "The Business Profile which is linked or in the process of being linked with the Merchant Center account." + }, + "id": { + "description": "Required. 64-bit Merchant Center account ID.", + "format": "uint64", + "type": "string" + }, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#account`\".", + "type": "string" + }, + "labelIds": { + "description": "Manually created label IDs that are assigned to the account by CSS.", + "items": { + "format": "uint64", + "type": "string" }, - "path": "{merchantId}/products/{productId}/regionalinventory", - "request": { - "$ref": "RegionalInventory" + "type": "array" + }, + "name": { + "description": "Required. Display name for the account.", + "type": "string" + }, + "sellerId": { + "description": "Client-specific, locally-unique, internal ID for the child account.", + "type": "string" + }, + "users": { + "description": "Users with access to the account. Every account (except for subaccounts) must have at least one admin user.", + "items": { + "$ref": "AccountUser" }, - "response": { - "$ref": "RegionalInventory" + "type": "array" + }, + "websiteUrl": { + "description": "The merchant's website.", + "type": "string" + }, + "youtubeChannelLinks": { + "description": "Linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list.", + "items": { + "$ref": "AccountYouTubeChannelLink" }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] + "type": "array" } - } + }, + "type": "object" }, - "regions": { - "methods": { - "create": { - "description": "Creates a region definition in your Merchant Center account.", - "flatPath": "{merchantId}/regions", - "httpMethod": "POST", - "id": "content.regions.create", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to create region definition.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionId": { - "description": "Required. The id of the region to create.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/regions", - "request": { - "$ref": "Region" - }, - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a region definition from your Merchant Center account.", - "flatPath": "{merchantId}/regions/{regionId}", - "httpMethod": "DELETE", - "id": "content.regions.delete", - "parameterOrder": [ - "merchantId", - "regionId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to delete region definition.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionId": { - "description": "Required. The id of the region to delete.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/regions/{regionId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Retrieves a region defined in your Merchant Center account.", - "flatPath": "{merchantId}/regions/{regionId}", - "httpMethod": "GET", - "id": "content.regions.get", - "parameterOrder": [ - "merchantId", - "regionId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve region definition.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionId": { - "description": "Required. The id of the region to retrieve.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/regions/{regionId}", - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the regions in your Merchant Center account.", - "flatPath": "{merchantId}/regions", - "httpMethod": "GET", - "id": "content.regions.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to list region definitions.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The maximum number of regions to return. The service may return fewer than this value. If unspecified, at most 50 rules will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A page token, received from a previous `ListRegions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRegions` must match the call that provided the page token.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/regions", - "response": { - "$ref": "ListRegionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "patch": { - "description": "Updates a region definition in your Merchant Center account.", - "flatPath": "{merchantId}/regions/{regionId}", - "httpMethod": "PATCH", - "id": "content.regions.patch", - "parameterOrder": [ - "merchantId", - "regionId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to update region definition.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "regionId": { - "description": "Required. The id of the region to update.", - "location": "path", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. The comma-separated field mask indicating the fields to update. Example: `\"displayName,postalCodeArea.regionCode\"`.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/regions/{regionId}", - "request": { - "$ref": "Region" - }, - "response": { - "$ref": "Region" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "reports": { - "methods": { - "search": { - "description": "Retrieves merchant performance metrics matching the search query and optionally segmented by selected dimensions.", - "flatPath": "{merchantId}/reports/search", - "httpMethod": "POST", - "id": "content.reports.search", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. Id of the merchant making the call. Must be a standalone account or an MCA subaccount.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/reports/search", - "request": { - "$ref": "SearchRequest" - }, - "response": { - "$ref": "SearchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "returnaddress": { - "methods": { - "custombatch": { - "description": "Batches multiple return address related calls in a single request.", - "flatPath": "returnaddress/batch", - "httpMethod": "POST", - "id": "content.returnaddress.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "returnaddress/batch", - "request": { - "$ref": "ReturnaddressCustomBatchRequest" - }, - "response": { - "$ref": "ReturnaddressCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a return address for the given Merchant Center account.", - "flatPath": "{merchantId}/returnaddress/{returnAddressId}", - "httpMethod": "DELETE", - "id": "content.returnaddress.delete", - "parameterOrder": [ - "merchantId", - "returnAddressId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account from which to delete the given return address.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnAddressId": { - "description": "Return address ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress/{returnAddressId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Gets a return address of the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress/{returnAddressId}", - "httpMethod": "GET", - "id": "content.returnaddress.get", - "parameterOrder": [ - "merchantId", - "returnAddressId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to get a return address for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnAddressId": { - "description": "Return address ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress/{returnAddressId}", - "response": { - "$ref": "ReturnAddress" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "insert": { - "description": "Inserts a return address for the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress", - "httpMethod": "POST", - "id": "content.returnaddress.insert", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to insert a return address for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnaddress", - "request": { - "$ref": "ReturnAddress" - }, - "response": { - "$ref": "ReturnAddress" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the return addresses of the Merchant Center account.", - "flatPath": "{merchantId}/returnaddress", - "httpMethod": "GET", - "id": "content.returnaddress.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "country": { - "description": "List only return addresses applicable to the given country of sale. When omitted, all return addresses are listed.", - "location": "query", - "type": "string" - }, - "maxResults": { - "description": "The maximum number of addresses in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account to list return addresses for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/returnaddress", - "response": { - "$ref": "ReturnaddressListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "returnpolicy": { - "methods": { - "custombatch": { - "description": "Batches multiple return policy related calls in a single request.", - "flatPath": "returnpolicy/batch", - "httpMethod": "POST", - "id": "content.returnpolicy.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "returnpolicy/batch", - "request": { - "$ref": "ReturnpolicyCustomBatchRequest" - }, - "response": { - "$ref": "ReturnpolicyCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes a return policy for the given Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", - "httpMethod": "DELETE", - "id": "content.returnpolicy.delete", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account from which to delete the given return policy.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Return policy ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy/{returnPolicyId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Gets a return policy of the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy/{returnPolicyId}", - "httpMethod": "GET", - "id": "content.returnpolicy.get", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to get a return policy for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Return policy ID generated by Google.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy/{returnPolicyId}", - "response": { - "$ref": "ReturnPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "insert": { - "description": "Inserts a return policy for the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy", - "httpMethod": "POST", - "id": "content.returnpolicy.insert", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to insert a return policy for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy", - "request": { - "$ref": "ReturnPolicy" - }, - "response": { - "$ref": "ReturnPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the return policies of the Merchant Center account.", - "flatPath": "{merchantId}/returnpolicy", - "httpMethod": "GET", - "id": "content.returnpolicy.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account to list return policies for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicy", - "response": { - "$ref": "ReturnpolicyListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "returnpolicyonline": { - "methods": { - "create": { - "description": "Creates a new return policy.", - "flatPath": "{merchantId}/returnpolicyonline", - "httpMethod": "POST", - "id": "content.returnpolicyonline.create", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline", - "request": { - "$ref": "ReturnPolicyOnline" - }, - "response": { - "$ref": "ReturnPolicyOnline" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "delete": { - "description": "Deletes an existing return policy.", - "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "httpMethod": "DELETE", - "id": "content.returnpolicyonline.delete", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Required. The id of the return policy to delete.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Gets an existing return policy.", - "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "httpMethod": "GET", - "id": "content.returnpolicyonline.get", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Required. The id of the return policy to retrieve.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "response": { - "$ref": "ReturnPolicyOnline" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists all existing return policies.", - "flatPath": "{merchantId}/returnpolicyonline", - "httpMethod": "GET", - "id": "content.returnpolicyonline.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline", - "response": { - "$ref": "ListReturnPolicyOnlineResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "patch": { - "description": "Updates an existing return policy.", - "flatPath": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "httpMethod": "PATCH", - "id": "content.returnpolicyonline.patch", - "parameterOrder": [ - "merchantId", - "returnPolicyId" - ], - "parameters": { - "merchantId": { - "description": "Required. The id of the merchant for which to retrieve the return policy online object.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - }, - "returnPolicyId": { - "description": "Required. The id of the return policy to update.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/returnpolicyonline/{returnPolicyId}", - "request": { - "$ref": "ReturnPolicyOnline" - }, - "response": { - "$ref": "ReturnPolicyOnline" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "settlementreports": { - "methods": { - "get": { - "description": "Retrieves a settlement report from your Merchant Center account.", - "flatPath": "{merchantId}/settlementreports/{settlementId}", - "httpMethod": "GET", - "id": "content.settlementreports.get", - "parameterOrder": [ - "merchantId", - "settlementId" - ], - "parameters": { - "merchantId": { - "description": "The Merchant Center account of the settlement report.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "settlementId": { - "description": "The Google-provided ID of the settlement.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/settlementreports/{settlementId}", - "response": { - "$ref": "SettlementReport" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Retrieves a list of settlement reports from your Merchant Center account.", - "flatPath": "{merchantId}/settlementreports", - "httpMethod": "GET", - "id": "content.settlementreports.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "maxResults": { - "description": "The maximum number of settlements to return in the response, used for paging. The default value is 200 returns per page, and the maximum allowed value is 5000 returns per page.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account to list settlements for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "transferEndDate": { - "description": "Obtains settlements which have transactions before this date (inclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - }, - "transferStartDate": { - "description": "Obtains settlements which have transactions after this date (inclusively), in ISO 8601 format.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/settlementreports", - "response": { - "$ref": "SettlementreportsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "settlementtransactions": { - "methods": { - "list": { - "description": "Retrieves a list of transactions for the settlement.", - "flatPath": "{merchantId}/settlementreports/{settlementId}/transactions", - "httpMethod": "GET", - "id": "content.settlementtransactions.list", - "parameterOrder": [ - "merchantId", - "settlementId" - ], - "parameters": { - "maxResults": { - "description": "The maximum number of transactions to return in the response, used for paging. The default value is 200 transactions per page, and the maximum allowed value is 5000 transactions per page.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The Merchant Center account to list transactions for.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - }, - "settlementId": { - "description": "The Google-provided ID of the settlement.", - "location": "path", - "required": true, - "type": "string" - }, - "transactionIds": { - "description": "The list of transactions to return. If not set, all transactions will be returned.", - "location": "query", - "repeated": true, - "type": "string" - } - }, - "path": "{merchantId}/settlementreports/{settlementId}/transactions", - "response": { - "$ref": "SettlementtransactionsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "shippingsettings": { - "methods": { - "custombatch": { - "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.", - "flatPath": "shippingsettings/batch", - "httpMethod": "POST", - "id": "content.shippingsettings.custombatch", - "parameterOrder": [], - "parameters": {}, - "path": "shippingsettings/batch", - "request": { - "$ref": "ShippingsettingsCustomBatchRequest" - }, - "response": { - "$ref": "ShippingsettingsCustomBatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "get": { - "description": "Retrieves the shipping settings of the account.", - "flatPath": "{merchantId}/shippingsettings/{accountId}", - "httpMethod": "GET", - "id": "content.shippingsettings.get", - "parameterOrder": [ - "merchantId", - "accountId" - ], - "parameters": { - "accountId": { - "description": "The ID of the account for which to get/update shipping settings.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "merchantId": { - "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/shippingsettings/{accountId}", - "response": { - "$ref": "ShippingSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "getsupportedcarriers": { - "description": "Retrieves supported carriers and carrier services for an account.", - "flatPath": "{merchantId}/supportedCarriers", - "httpMethod": "GET", - "id": "content.shippingsettings.getsupportedcarriers", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account for which to retrieve the supported carriers.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/supportedCarriers", - "response": { - "$ref": "ShippingsettingsGetSupportedCarriersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "getsupportedholidays": { - "description": "Retrieves supported holidays for an account.", - "flatPath": "{merchantId}/supportedHolidays", - "httpMethod": "GET", - "id": "content.shippingsettings.getsupportedholidays", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account for which to retrieve the supported holidays.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/supportedHolidays", - "response": { - "$ref": "ShippingsettingsGetSupportedHolidaysResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "getsupportedpickupservices": { - "description": "Retrieves supported pickup services for an account.", - "flatPath": "{merchantId}/supportedPickupServices", - "httpMethod": "GET", - "id": "content.shippingsettings.getsupportedpickupservices", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "The ID of the account for which to retrieve the supported pickup services.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/supportedPickupServices", - "response": { - "$ref": "ShippingsettingsGetSupportedPickupServicesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "list": { - "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.", - "flatPath": "{merchantId}/shippingsettings", - "httpMethod": "GET", - "id": "content.shippingsettings.list", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "maxResults": { - "description": "The maximum number of shipping settings to return in the response, used for paging.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the managing account. This must be a multi-client account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "pageToken": { - "description": "The token returned by the previous request.", - "location": "query", - "type": "string" - } - }, - "path": "{merchantId}/shippingsettings", - "response": { - "$ref": "ShippingsettingsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "update": { - "description": "Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.", - "flatPath": "{merchantId}/shippingsettings/{accountId}", - "httpMethod": "PUT", - "id": "content.shippingsettings.update", - "parameterOrder": [ - "merchantId", - "accountId" - ], - "parameters": { - "accountId": { - "description": "The ID of the account for which to get/update shipping settings.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - }, - "merchantId": { - "description": "The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.", - "format": "uint64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/shippingsettings/{accountId}", - "request": { - "$ref": "ShippingSettings" - }, - "response": { - "$ref": "ShippingSettings" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, - "shoppingadsprogram": { - "methods": { - "get": { - "description": "Retrieves the status and review eligibility for the Shopping Ads program. Returns errors and warnings if they require action to resolve, will become disapprovals, or impact impressions. Use `accountstatuses` to view all issues for an account.", - "flatPath": "{merchantId}/shoppingadsprogram", - "httpMethod": "GET", - "id": "content.shoppingadsprogram.get", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/shoppingadsprogram", - "response": { - "$ref": "ShoppingAdsProgramStatus" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - }, - "requestreview": { - "description": "Requests a review of Shopping ads in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.", - "flatPath": "{merchantId}/shoppingadsprogram/requestreview", - "httpMethod": "POST", - "id": "content.shoppingadsprogram.requestreview", - "parameterOrder": [ - "merchantId" - ], - "parameters": { - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/shoppingadsprogram/requestreview", - "request": { - "$ref": "RequestReviewShoppingAdsRequest" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - } - }, - "revision": "20240723", - "rootUrl": "https://shoppingcontent.googleapis.com/", - "schemas": { - "Account": { - "description": "Account data. After the creation of a new account it may take a few minutes before it's fully operational. The methods delete, insert, and update require the admin role.", - "id": "Account", - "properties": { - "accountManagement": { - "description": "Output only. How the account is managed. Acceptable values are: - \"`manual`\" - \"`automatic`\" ", - "readOnly": true, - "type": "string" - }, - "adsLinks": { - "description": "Linked Ads accounts that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected either in the Ads interface or through the Google Ads API. To delete an active link, or to cancel a link request, remove it from the list.", - "items": { - "$ref": "AccountAdsLink" - }, - "type": "array" - }, - "adultContent": { - "description": "Indicates whether the merchant sells adult content.", - "type": "boolean" - }, - "automaticImprovements": { - "$ref": "AccountAutomaticImprovements", - "description": "The automatic improvements of the account can be used to automatically update items, improve images and shipping. Each section inside AutomaticImprovements is updated separately." - }, - "automaticLabelIds": { - "description": "Automatically created label IDs that are assigned to the account by CSS Center.", - "items": { - "format": "uint64", - "type": "string" - }, - "type": "array" - }, - "businessIdentity": { - "$ref": "AccountBusinessIdentity", - "description": "The business identity attributes can be used to self-declare attributes that let customers know more about your business." - }, - "businessInformation": { - "$ref": "AccountBusinessInformation", - "description": "The business information of the account." - }, - "conversionSettings": { - "$ref": "AccountConversionSettings", - "description": "Settings for conversion tracking." - }, - "cssId": { - "description": "ID of CSS the account belongs to.", - "format": "uint64", - "type": "string" - }, - "googleMyBusinessLink": { - "$ref": "AccountGoogleMyBusinessLink", - "description": "The Business Profile which is linked or in the process of being linked with the Merchant Center account." - }, - "id": { - "description": "Required. 64-bit Merchant Center account ID.", - "format": "uint64", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#account`\".", - "type": "string" - }, - "labelIds": { - "description": "Manually created label IDs that are assigned to the account by CSS.", - "items": { - "format": "uint64", - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Required. Display name for the account.", - "type": "string" - }, - "sellerId": { - "description": "Client-specific, locally-unique, internal ID for the child account.", - "type": "string" - }, - "users": { - "description": "Users with access to the account. Every account (except for subaccounts) must have at least one admin user.", - "items": { - "$ref": "AccountUser" - }, - "type": "array" - }, - "websiteUrl": { - "description": "The merchant's website.", - "type": "string" - }, - "youtubeChannelLinks": { - "description": "Linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status `active` to the list. It will remain in a `pending` state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list.", - "items": { - "$ref": "AccountYouTubeChannelLink" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountAddress": { - "id": "AccountAddress", - "properties": { - "country": { - "description": "CLDR country code (for example, \"US\"). All MCA sub-accounts inherit the country of their parent MCA by default, however the country can be updated for individual sub-accounts.", - "type": "string" - }, - "locality": { - "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", - "type": "string" - }, - "postalCode": { - "description": "Postal code or ZIP (for example, \"94043\").", - "type": "string" - }, - "region": { - "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", - "type": "string" - }, - "streetAddress": { - "description": "Street-level part of the address. Use `\\n` to add a second line.", - "type": "string" - } - }, - "type": "object" - }, - "AccountAdsLink": { - "id": "AccountAdsLink", - "properties": { - "adsId": { - "description": "Customer ID of the Ads account.", - "format": "uint64", - "type": "string" - }, - "status": { - "description": "Status of the link between this Merchant Center account and the Ads account. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in Google Ads or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending. Acceptable values are: - \"`active`\" - \"`pending`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccountAutomaticImprovements": { - "description": "The automatic improvements of the account can be used to automatically update items, improve images and shipping.", - "id": "AccountAutomaticImprovements", - "properties": { - "imageImprovements": { - "$ref": "AccountImageImprovements", - "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973) This field is only updated (cleared) if provided." - }, - "itemUpdates": { - "$ref": "AccountItemUpdates", - "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown. This field is only updated (cleared) if provided." - }, - "shippingImprovements": { - "$ref": "AccountShippingImprovements", - "description": "Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: - Delivery address of an order - Current handling time and shipping time settings - Estimated weekdays or business days - Parcel tracking data This field is only updated (cleared) if provided." - } - }, - "type": "object" - }, - "AccountBusinessIdentity": { - "description": "The [business identity attributes](https://support.google.com/merchants/answer/10342414) can be used to self-declare attributes that let customers know more about your business.", - "id": "AccountBusinessIdentity", - "properties": { - "blackOwned": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as being black-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." - }, - "includeForPromotions": { - "description": "Required. By setting this field, your business may be included in promotions for all the selected attributes. If you clear this option, it won't affect your identification with any of the attributes. For this field to be set, the merchant must self identify with at least one of the `AccountIdentityType`. If none are included, the request will be considered invalid.", - "type": "boolean" - }, - "latinoOwned": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as being latino-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." - }, - "smallBusiness": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as a small business. This optional field is only available for merchants with a business country set to \"US\". It is also not allowed for marketplaces, but it is allowed to marketplace sellers." - }, - "veteranOwned": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as being veteran-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." - }, - "womenOwned": { - "$ref": "AccountIdentityType", - "description": "Specifies whether the business identifies itself as being women-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." - } - }, - "type": "object" - }, - "AccountBusinessInformation": { - "id": "AccountBusinessInformation", - "properties": { - "address": { - "$ref": "AccountAddress", - "description": "The address of the business. Use `\\n` to add a second address line." - }, - "customerService": { - "$ref": "AccountCustomerService", - "description": "The customer service information of the business." - }, - "koreanBusinessRegistrationNumber": { - "description": "The 10-digit [Korean business registration number](https://support.google.com/merchants/answer/9037766) separated with dashes in the format: XXX-XX-XXXXX. This field will only be updated if explicitly set.", - "type": "string" - }, - "phoneNumber": { - "description": "The phone number of the business in [E.164](https://en.wikipedia.org/wiki/E.164) format. This can only be updated if a verified phone number is not already set. To replace a verified phone number use the `Accounts.requestphoneverification` and `Accounts.verifyphonenumber`.", - "type": "string" - }, - "phoneVerificationStatus": { - "description": "Verification status of the phone number of the business. This status is read only and can be updated only by successful phone verification. Acceptable values are: - \"`verified`\" - \"`unverified`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccountConversionSettings": { - "description": "Settings for conversion tracking.", - "id": "AccountConversionSettings", - "properties": { - "freeListingsAutoTaggingEnabled": { - "description": "When enabled, free listing URLs have a parameter to enable conversion tracking for products owned by the current merchant account. See [auto-tagging](https://support.google.com/merchants/answer/11127659).", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountCredentials": { - "description": "Credentials allowing Google to call a partner's API on behalf of a merchant.", - "id": "AccountCredentials", - "properties": { - "accessToken": { - "description": "An OAuth access token.", - "type": "string" - }, - "expiresIn": { - "description": "The amount of time, in seconds, after which the access token is no longer valid.", - "format": "int64", - "type": "string" - }, - "purpose": { - "description": "Indicates to Google how Google should use these OAuth tokens.", - "enum": [ - "ACCOUNT_CREDENTIALS_PURPOSE_UNSPECIFIED", - "SHOPIFY_ORDER_MANAGEMENT", - "SHOPIFY_INTEGRATION" - ], - "enumDeprecated": [ - false, - true, - false - ], - "enumDescriptions": [ - "Unknown purpose.", - "The credentials allow Google to manage Shopify orders on behalf of the merchant (deprecated).", - "The credentials allow Google to manage Shopify integration on behalf of the merchant." - ], - "type": "string" - } - }, - "type": "object" - }, - "AccountCustomerService": { - "id": "AccountCustomerService", - "properties": { - "email": { - "description": "Customer service email.", - "type": "string" - }, - "phoneNumber": { - "description": "Customer service phone number.", - "type": "string" - }, - "url": { - "description": "Customer service URL.", - "type": "string" - } - }, - "type": "object" - }, - "AccountGoogleMyBusinessLink": { - "id": "AccountGoogleMyBusinessLink", - "properties": { - "gmbAccountId": { - "description": "The ID of the Business Profile. If this is provided, then `gmbEmail` is ignored. The value of this field should match the `accountId` used by the Business Profile API.", - "type": "string" - }, - "gmbEmail": { - "description": "The Business Profile email address of a specific account within a Business Profile. A sample account within a Business Profile could be a business account with set of locations, managed under the Business Profile.", - "type": "string" - }, - "status": { - "description": "Status of the link between this Merchant Center account and the Business Profile. Acceptable values are: - \"`active`\" - \"`pending`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccountIdentifier": { - "id": "AccountIdentifier", - "properties": { - "aggregatorId": { - "description": "The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount).", - "format": "uint64", - "type": "string" - }, - "merchantId": { - "description": "The merchant account ID, set for individual accounts and subaccounts.", - "format": "uint64", - "type": "string" - } - }, - "type": "object" - }, - "AccountIdentityType": { - "description": "The account identity type used to specify attributes.", - "id": "AccountIdentityType", - "properties": { - "selfIdentified": { - "description": "Optional. Indicates that the business identifies itself with a given identity type. Setting this field does not automatically mean eligibility for promotions.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountImageImprovements": { - "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973)", - "id": "AccountImageImprovements", - "properties": { - "accountImageImprovementsSettings": { - "$ref": "AccountImageImprovementsSettings", - "description": "Determines how the images should be automatically updated. If this field is not present, then the settings will be deleted. If there are no settings for subaccount, they are inherited from aggregator." - }, - "effectiveAllowAutomaticImageImprovements": { - "description": "Output only. The effective value of allow_automatic_image_improvements. If account_image_improvements_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - } - }, - "type": "object" - }, - "AccountImageImprovementsSettings": { - "description": "Settings for the Automatic Image Improvements.", - "id": "AccountImageImprovementsSettings", - "properties": { - "allowAutomaticImageImprovements": { - "description": "Enables automatic image improvements.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountIssue": { - "description": "An issue affecting specific merchant.", - "id": "AccountIssue", - "properties": { - "actions": { - "description": "A list of actionable steps that can be executed to solve the issue. An example is requesting a re-review or providing arguments when merchant disagrees with the issue. Actions that are supported in (your) third-party application can be rendered as buttons and should be available to merchant when they expand the issue.", - "items": { - "$ref": "Action" - }, - "type": "array" - }, - "impact": { - "$ref": "AccountIssueImpact", - "description": "Clarifies the severity of the issue. The summarizing message, if present, should be shown right under the title for each issue. It helps merchants to quickly understand the impact of the issue. The detailed breakdown helps the merchant to fully understand the impact of the issue. It can be rendered as dialog that opens when the merchant mouse over the summarized impact statement. Issues with different severity can be styled differently. They may use a different color or icon to signal the difference between `ERROR`, `WARNING` and `INFO`." - }, - "prerenderedContent": { - "description": "Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class.", - "type": "string" - }, - "title": { - "description": "Title of the issue.", - "type": "string" - } - }, - "type": "object" - }, - "AccountIssueImpact": { - "description": "Overall impact of the issue.", - "id": "AccountIssueImpact", - "properties": { - "breakdowns": { - "description": "Detailed impact breakdown. Explains the types of restriction the issue has in different shopping destinations and territory. If present, it should be rendered to the merchant. Can be shown as a mouse over dropdown or a dialog. Each breakdown item represents a group of regions with the same impact details.", - "items": { - "$ref": "Breakdown" - }, - "type": "array" - }, - "message": { - "description": "Optional. Message summarizing the overall impact of the issue. If present, it should be rendered to the merchant. For example: \"Disapproves 90k offers in 25 countries\"", - "type": "string" - }, - "severity": { - "description": "The severity of the issue.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "Causes either an account suspension or an item disapproval. Errors should be resolved as soon as possible to ensure items are eligible to appear in results again.", - "Warnings can negatively impact the performance of ads and can lead to item or account suspensions in the future unless the issue is resolved.", - "Infos are suggested optimizations to increase data quality. Resolving these issues is recommended, but not required." - ], - "type": "string" - } - }, - "type": "object" - }, - "AccountItemUpdates": { - "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown.", - "id": "AccountItemUpdates", - "properties": { - "accountItemUpdatesSettings": { - "$ref": "AccountItemUpdatesSettings", - "description": "Determines which attributes of the items should be automatically updated. If this field is not present, then the settings will be deleted. If there are no settings for subaccount, they are inherited from aggregator." - }, - "effectiveAllowAvailabilityUpdates": { - "description": "Output only. The effective value of allow_availability_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - }, - "effectiveAllowConditionUpdates": { - "description": "Output only. The effective value of allow_condition_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - }, - "effectiveAllowPriceUpdates": { - "description": "Output only. The effective value of allow_price_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - }, - "effectiveAllowStrictAvailabilityUpdates": { - "description": "Output only. The effective value of allow_strict_availability_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", - "readOnly": true, - "type": "boolean" - } - }, - "type": "object" - }, - "AccountItemUpdatesSettings": { - "description": "Settings for the Automatic Item Updates.", - "id": "AccountItemUpdatesSettings", - "properties": { - "allowAvailabilityUpdates": { - "description": "If availability updates are enabled, any previous availability values get overwritten if Google finds an out-of-stock annotation on the offer's page. If additionally `allow_availability_updates` field is set to true, values get overwritten if Google finds an in-stock annotation on the offer’s page.", - "type": "boolean" - }, - "allowConditionUpdates": { - "description": "If condition updates are enabled, Google always updates item condition with the condition detected from the details of your product.", - "type": "boolean" - }, - "allowPriceUpdates": { - "description": "If price updates are enabled, Google always updates the active price with the crawled information.", - "type": "boolean" - }, - "allowStrictAvailabilityUpdates": { - "description": "If allow_availability_updates is enabled, items are automatically updated in all your Shopping target countries. By default, availability updates will only be applied to items that are 'out of stock' on your website but 'in stock' on Shopping. Set this to true to also update items that are 'in stock' on your website, but 'out of stock' on Google Shopping. In order for this field to have an effect, you must also allow availability updates.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountLabel": { - "description": "Label assigned by CSS domain or CSS group to one of its sub-accounts.", - "id": "AccountLabel", - "properties": { - "accountId": { - "description": "Immutable. The ID of account this label belongs to.", - "format": "int64", - "type": "string" - }, - "description": { - "description": "The description of this label.", - "type": "string" - }, - "labelId": { - "description": "Output only. The ID of the label.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "labelType": { - "description": "Output only. The type of this label.", - "enum": [ - "LABEL_TYPE_UNSPECIFIED", - "MANUAL", - "AUTOMATIC" - ], - "enumDescriptions": [ - "Unknown label type.", - "Indicates that the label was created manually.", - "Indicates that the label was created automatically by CSS Center." - ], - "readOnly": true, - "type": "string" - }, - "name": { - "description": "The display name of this label.", - "type": "string" - } - }, - "type": "object" - }, - "AccountReturnCarrier": { - "description": " The return carrier information. This service is designed for merchants enrolled in the Buy on Google program. ", - "id": "AccountReturnCarrier", - "properties": { - "carrierAccountId": { - "description": "Output only. Immutable. The Google-provided unique carrier ID, used to update the resource.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "carrierAccountName": { - "description": "Name of the carrier account.", - "type": "string" - }, - "carrierAccountNumber": { - "description": "Number of the carrier account.", - "type": "string" - }, - "carrierCode": { - "description": "The carrier code enum. Accepts the values FEDEX or UPS.", - "enum": [ - "CARRIER_CODE_UNSPECIFIED", - "FEDEX", - "UPS" - ], - "enumDescriptions": [ - "Carrier not specified", - "FedEx carrier", - "UPS carrier" - ], - "type": "string" - } - }, - "type": "object" - }, - "AccountShippingImprovements": { - "description": "Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: * Delivery address of an order * Current handling time and shipping time settings * Estimated weekdays or business days * Parcel tracking data", - "id": "AccountShippingImprovements", - "properties": { - "allowShippingImprovements": { - "description": "Enables automatic shipping improvements.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountStatus": { - "description": "The status of an account, that is, information about its products, which is computed offline and not returned immediately at insertion time.", - "id": "AccountStatus", - "properties": { - "accountId": { - "description": "The ID of the account for which the status is reported.", - "type": "string" - }, - "accountLevelIssues": { - "description": "A list of account level issues.", - "items": { - "$ref": "AccountStatusAccountLevelIssue" - }, - "type": "array" - }, - "accountManagement": { - "description": "How the account is managed. Acceptable values are: - \"`manual`\" - \"`automatic`\" ", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountStatus`\"", - "type": "string" - }, - "products": { - "description": "List of product-related data by channel, destination, and country. Data in this field may be delayed by up to 30 minutes.", - "items": { - "$ref": "AccountStatusProducts" - }, - "type": "array" - }, - "websiteClaimed": { - "description": "Whether the account's website is claimed or not.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountStatusAccountLevelIssue": { - "id": "AccountStatusAccountLevelIssue", - "properties": { - "country": { - "description": "Country for which this issue is reported.", - "type": "string" - }, - "destination": { - "description": "The destination the issue applies to. If this field is empty then the issue applies to all available destinations.", - "type": "string" - }, - "detail": { - "description": "Additional details about the issue.", - "type": "string" - }, - "documentation": { - "description": "The URL of a web page to help resolving this issue.", - "type": "string" - }, - "id": { - "description": "Issue identifier.", - "type": "string" - }, - "severity": { - "description": "Severity of the issue. Acceptable values are: - \"`critical`\" - \"`error`\" - \"`suggestion`\" ", - "type": "string" - }, - "title": { - "description": "Short description of the issue.", - "type": "string" - } - }, - "type": "object" - }, - "AccountStatusItemLevelIssue": { - "id": "AccountStatusItemLevelIssue", - "properties": { - "attributeName": { - "description": "The attribute's name, if the issue is caused by a single attribute.", - "type": "string" - }, - "code": { - "description": "The error code of the issue.", - "type": "string" - }, - "description": { - "description": "A short issue description in English.", - "type": "string" - }, - "detail": { - "description": "A detailed issue description in English.", - "type": "string" - }, - "documentation": { - "description": "The URL of a web page to help with resolving this issue.", - "type": "string" - }, - "numItems": { - "description": "Number of items with this issue.", - "format": "int64", - "type": "string" - }, - "resolution": { - "description": "Whether the issue can be resolved by the merchant.", - "type": "string" - }, - "servability": { - "description": "How this issue affects serving of the offer.", - "type": "string" - } - }, - "type": "object" - }, - "AccountStatusProducts": { - "id": "AccountStatusProducts", - "properties": { - "channel": { - "description": "The channel the data applies to. Acceptable values are: - \"`local`\" - \"`online`\" ", - "type": "string" - }, - "country": { - "description": "The country the data applies to.", - "type": "string" - }, - "destination": { - "description": "The destination the data applies to.", - "type": "string" - }, - "itemLevelIssues": { - "description": "List of item-level issues.", - "items": { - "$ref": "AccountStatusItemLevelIssue" - }, - "type": "array" - }, - "statistics": { - "$ref": "AccountStatusStatistics", - "description": "Aggregated product statistics." - } - }, - "type": "object" - }, - "AccountStatusStatistics": { - "id": "AccountStatusStatistics", - "properties": { - "active": { - "description": "Number of active offers.", - "format": "int64", - "type": "string" - }, - "disapproved": { - "description": "Number of disapproved offers.", - "format": "int64", - "type": "string" - }, - "expiring": { - "description": "Number of expiring offers.", - "format": "int64", - "type": "string" - }, - "pending": { - "description": "Number of pending offers.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "AccountTax": { - "description": "The tax settings of a merchant account. All methods require the admin role.", - "id": "AccountTax", - "properties": { - "accountId": { - "description": "Required. The ID of the account to which these account tax settings belong.", - "format": "uint64", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountTax`\".", - "type": "string" - }, - "rules": { - "description": "Tax rules. Updating the tax rules will enable \"US\" taxes (not reversible). Defining no rules is equivalent to not charging tax at all.", - "items": { - "$ref": "AccountTaxTaxRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountTaxTaxRule": { - "description": "Tax calculation rule to apply in a state or province (US only).", - "id": "AccountTaxTaxRule", - "properties": { - "country": { - "description": "Country code in which tax is applicable.", - "type": "string" - }, - "locationId": { - "description": "Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).", - "format": "uint64", - "type": "string" - }, - "ratePercent": { - "description": "Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.", - "type": "string" - }, - "shippingTaxed": { - "description": "If true, shipping charges are also taxed.", - "type": "boolean" - }, - "useGlobalRate": { - "description": "Whether the tax rate is taken from a global tax table or specified explicitly.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountUser": { - "id": "AccountUser", - "properties": { - "admin": { - "description": "Whether user is an admin.", - "type": "boolean" - }, - "emailAddress": { - "description": "User's email address.", - "type": "string" - }, - "orderManager": { - "description": "Whether user is an order manager.", - "type": "boolean" - }, - "paymentsAnalyst": { - "description": "Whether user can access payment statements.", - "type": "boolean" - }, - "paymentsManager": { - "description": "Whether user can manage payment settings.", - "type": "boolean" - }, - "reportingManager": { - "description": "Whether user is a reporting manager. This role is equivalent to the Performance and insights role in Merchant Center.", - "type": "boolean" - } - }, - "type": "object" - }, - "AccountYouTubeChannelLink": { - "id": "AccountYouTubeChannelLink", - "properties": { - "channelId": { - "description": "Channel ID.", - "type": "string" - }, - "status": { - "description": "Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in YT Creator Studio or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.", - "type": "string" - } - }, - "type": "object" - }, - "AccountsAuthInfoResponse": { - "id": "AccountsAuthInfoResponse", - "properties": { - "accountIdentifiers": { - "description": "The account identifiers corresponding to the authenticated user. - For an individual account: only the merchant ID is defined - For an aggregator: only the aggregator ID is defined - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined. ", - "items": { - "$ref": "AccountIdentifier" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsAuthInfoResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountsClaimWebsiteResponse": { - "id": "AccountsClaimWebsiteResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsClaimWebsiteResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountsCustomBatchRequest": { - "id": "AccountsCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "AccountsCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch accounts request.", - "id": "AccountsCustomBatchRequestEntry", - "properties": { - "account": { - "$ref": "Account", - "description": "The account to create or update. Only defined if the method is `insert` or `update`." - }, - "accountId": { - "description": "The ID of the targeted account. Only defined if the method is not `insert`.", - "format": "uint64", - "type": "string" - }, - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "force": { - "description": "Whether the account should be deleted if the account has offers. Only applicable if the method is `delete`.", - "type": "boolean" - }, - "labelIds": { - "description": "Label IDs for the 'updatelabels' request.", - "items": { - "format": "uint64", - "type": "string" - }, - "type": "array" - }, - "linkRequest": { - "$ref": "AccountsCustomBatchRequestEntryLinkRequest", - "description": "Details about the `link` request." - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`claimWebsite`\" - \"`delete`\" - \"`get`\" - \"`insert`\" - \"`link`\" - \"`update`\" ", - "type": "string" - }, - "overwrite": { - "description": "Only applicable if the method is `claimwebsite`. Indicates whether or not to take the claim from another account in case there is a conflict.", - "type": "boolean" - }, - "view": { - "description": "Controls which fields are visible. Only applicable if the method is 'get'.", - "type": "string" - } - }, - "type": "object" - }, - "AccountsCustomBatchRequestEntryLinkRequest": { - "id": "AccountsCustomBatchRequestEntryLinkRequest", - "properties": { - "action": { - "description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ", - "type": "string" - }, - "linkType": { - "description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" - \"`localProductManager`\" ", - "type": "string" - }, - "linkedAccountId": { - "description": "The ID of the linked account.", - "type": "string" - }, - "services": { - "description": "Provided services. Acceptable values are: - \"`shoppingAdsProductManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingActionsOrderManagement`\" - \"`paymentProcessing`\" - \"`localProductManagement`\" ", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsCustomBatchResponse": { - "id": "AccountsCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "AccountsCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountsCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch accounts response.", - "id": "AccountsCustomBatchResponseEntry", - "properties": { - "account": { - "$ref": "Account", - "description": "The retrieved, created, or updated account. Not defined if the method was `delete`, `claimwebsite` or `link`." - }, - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponseEntry`\"", - "type": "string" - } - }, - "type": "object" - }, - "AccountsLinkRequest": { - "id": "AccountsLinkRequest", - "properties": { - "action": { - "description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ", - "type": "string" - }, - "eCommercePlatformLinkInfo": { - "$ref": "ECommercePlatformLinkInfo", - "description": "Additional information required for `eCommercePlatform` link type." - }, - "linkType": { - "description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" ", - "type": "string" - }, - "linkedAccountId": { - "description": "The ID of the linked account.", - "type": "string" - }, - "paymentServiceProviderLinkInfo": { - "$ref": "PaymentServiceProviderLinkInfo", - "description": "Additional information required for `paymentServiceProvider` link type." - }, - "services": { - "description": " Acceptable values are: - \"`shoppingAdsProductManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingActionsOrderManagement`\" - \"`paymentProcessing`\" ", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsLinkResponse": { - "id": "AccountsLinkResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsLinkResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountsListLinksResponse": { - "id": "AccountsListLinksResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsListLinksResponse`\".", - "type": "string" - }, - "links": { - "description": "The list of available links.", - "items": { - "$ref": "LinkedAccount" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of links.", - "type": "string" - } - }, - "type": "object" - }, - "AccountsListResponse": { - "id": "AccountsListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of accounts.", - "type": "string" - }, - "resources": { - "items": { - "$ref": "Account" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsUpdateLabelsRequest": { - "id": "AccountsUpdateLabelsRequest", - "properties": { - "labelIds": { - "description": "The IDs of labels that should be assigned to the account.", - "items": { - "format": "uint64", - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountsUpdateLabelsResponse": { - "id": "AccountsUpdateLabelsResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsUpdateLabelsResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountstatusesCustomBatchRequest": { - "id": "AccountstatusesCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "AccountstatusesCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccountstatusesCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch accountstatuses request.", - "id": "AccountstatusesCustomBatchRequestEntry", - "properties": { - "accountId": { - "description": "The ID of the (sub-)account whose status to get.", - "format": "uint64", - "type": "string" - }, - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "destinations": { - "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - "items": { - "type": "string" - }, - "type": "array" - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`get`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccountstatusesCustomBatchResponse": { - "id": "AccountstatusesCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "AccountstatusesCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountstatusesCustomBatchResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccountstatusesCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch accountstatuses response.", - "id": "AccountstatusesCustomBatchResponseEntry", - "properties": { - "accountStatus": { - "$ref": "AccountStatus", - "description": "The requested account status. Defined if and only if the request was successful." - }, - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." - } - }, - "type": "object" - }, - "AccountstatusesListResponse": { - "id": "AccountstatusesListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountstatusesListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of account statuses.", - "type": "string" - }, - "resources": { - "items": { - "$ref": "AccountStatus" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccounttaxCustomBatchRequest": { - "id": "AccounttaxCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "AccounttaxCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "AccounttaxCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch accounttax request.", - "id": "AccounttaxCustomBatchRequestEntry", - "properties": { - "accountId": { - "description": "The ID of the account for which to get/update account tax settings.", - "format": "uint64", - "type": "string" - }, - "accountTax": { - "$ref": "AccountTax", - "description": "The account tax settings to update. Only defined if the method is `update`." - }, - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`get`\" - \"`update`\" ", - "type": "string" - } - }, - "type": "object" - }, - "AccounttaxCustomBatchResponse": { - "id": "AccounttaxCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "AccounttaxCustomBatchResponseEntry" - }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "AccounttaxCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch accounttax response.", - "id": "AccounttaxCustomBatchResponseEntry", - "properties": { - "accountTax": { - "$ref": "AccountTax", - "description": "The retrieved or updated account tax settings." - }, - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponseEntry`\"", - "type": "string" - } - }, - "type": "object" - }, - "AccounttaxListResponse": { - "id": "AccounttaxListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of account tax settings.", - "type": "string" - }, - "resources": { - "items": { - "$ref": "AccountTax" - }, - "type": "array" - } - }, - "type": "object" - }, - "Action": { - "description": "An actionable step that can be executed to solve the issue.", - "id": "Action", - "properties": { - "builtinSimpleAction": { - "$ref": "BuiltInSimpleAction", - "description": "Action implemented and performed in (your) third-party application. The application should point the merchant to the place, where they can access the corresponding functionality or provide instructions, if the specific functionality is not available." - }, - "builtinUserInputAction": { - "$ref": "BuiltInUserInputAction", - "description": "Action implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant as specified for given action. They can trigger the action only when they provided all required inputs." - }, - "buttonLabel": { - "description": "Label of the action button.", - "type": "string" - }, - "externalAction": { - "$ref": "ExternalAction", - "description": "Action that is implemented and performed outside of (your) third-party application. The application needs to redirect the merchant to the external location where they can perform the action." - }, - "isAvailable": { - "description": "Controlling whether the button is active or disabled. The value is 'false' when the action was already requested or is not available. If the action is not available then a reason will be present. If (your) third-party application shows a disabled button for action that is not available, then it should also show reasons.", - "type": "boolean" - }, - "reasons": { - "description": "List of reasons why the action is not available. The list of reasons is empty if the action is available. If there is only one reason, it can be displayed next to the disabled button. If there are more reasons, all of them should be displayed, for example in a pop-up dialog.", - "items": { - "$ref": "ActionReason" - }, - "type": "array" - } - }, - "type": "object" - }, - "ActionFlow": { - "description": "Flow that can be selected for an action. When merchant selects a flow, application should open a dialog with more information and input form.", - "id": "ActionFlow", - "properties": { - "dialogButtonLabel": { - "description": "Label for the button to trigger the action from the action dialog. For example: \"Request review\"", - "type": "string" - }, - "dialogCallout": { - "$ref": "Callout", - "description": "Important message to be highlighted in the request dialog. For example: \"You can only request a review for disagreeing with this issue once. If it's not approved, you'll need to fix the issue and wait a few days before you can request another review.\"" - }, - "dialogMessage": { - "$ref": "TextWithTooltip", - "description": "Message displayed in the request dialog. For example: \"Make sure you've fixed all your country-specific issues. If not, you may have to wait 7 days to request another review\". There may be an more information to be shown in a tooltip." - }, - "dialogTitle": { - "description": "Title of the request dialog. For example: \"Before you request a review\"", - "type": "string" - }, - "id": { - "description": "Not for display but need to be sent back for the selected action flow.", - "type": "string" - }, - "inputs": { - "description": "A list of input fields.", - "items": { - "$ref": "InputField" - }, - "type": "array" - }, - "label": { - "description": "Text value describing the intent for the action flow. It can be used as an input label if merchant needs to pick one of multiple flows. For example: \"I disagree with the issue\"", - "type": "string" - } - }, - "type": "object" - }, - "ActionInput": { - "description": "Input provided by the merchant.", - "id": "ActionInput", - "properties": { - "actionFlowId": { - "description": "Required. Id of the selected action flow.", - "type": "string" - }, - "inputValues": { - "description": "Required. Values for input fields.", - "items": { - "$ref": "InputValue" - }, - "type": "array" - } - }, - "type": "object" - }, - "ActionReason": { - "description": "A single reason why the action is not available.", - "id": "ActionReason", - "properties": { - "action": { - "$ref": "Action", - "description": "Optional. An action that needs to be performed to solve the problem represented by this reason. This action will always be available. Should be rendered as a link or button next to the summarizing message. For example, the review may be available only once merchant configure all required attributes. In such a situation this action can be a link to the form, where they can fill the missing attribute to unblock the main action." - }, - "detail": { - "description": "Detailed explanation of the reason. Should be displayed as a hint if present.", - "type": "string" - }, - "message": { - "description": "Messages summarizing the reason, why the action is not available. For example: \"Review requested on Jan 03. Review requests can take a few days to complete.\"", - "type": "string" - } - }, - "type": "object" - }, - "ActivateBuyOnGoogleProgramRequest": { - "description": "Request message for the ActivateProgram method.", - "id": "ActivateBuyOnGoogleProgramRequest", - "properties": {}, - "type": "object" - }, - "Address": { - "id": "Address", - "properties": { - "administrativeArea": { - "description": "Required. Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", - "type": "string" - }, - "city": { - "description": "Required. City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", - "type": "string" - }, - "country": { - "description": "Required. [CLDR country code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) (for example, \"US\").", - "type": "string" - }, - "postalCode": { - "description": "Required. Postal code or ZIP (for example, \"94043\").", - "type": "string" - }, - "streetAddress": { - "description": "Street-level part of the address. Use `\\n` to add a second line.", - "type": "string" - } - }, - "type": "object" - }, - "AlternateDisputeResolution": { - "description": "The Alternate Dispute Resolution (ADR) that may be available to merchants in some regions. If present, the link should be shown on the same page as the list of issues.", - "id": "AlternateDisputeResolution", - "properties": { - "label": { - "description": "The label for the alternate dispute resolution link.", - "type": "string" - }, - "uri": { - "description": "The URL pointing to a page, where merchant can request alternative dispute resolution with an [external body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501).", - "type": "string" - } - }, - "type": "object" - }, - "Amount": { - "id": "Amount", - "properties": { - "priceAmount": { - "$ref": "Price", - "description": "[required] The pre-tax or post-tax price depending on the location of the order." - }, - "taxAmount": { - "$ref": "Price", - "description": "[required] Tax value." - } - }, - "type": "object" - }, - "AttributionSettings": { - "description": "Represents attribution settings for conversion sources receiving pre-attribution data.", - "id": "AttributionSettings", - "properties": { - "attributionLookbackWindowInDays": { - "description": "Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.", - "format": "int32", - "type": "integer" - }, - "attributionModel": { - "description": "Required. Attribution model.", - "enum": [ - "ATTRIBUTION_MODEL_UNSPECIFIED", - "CROSS_CHANNEL_LAST_CLICK", - "ADS_PREFERRED_LAST_CLICK", - "CROSS_CHANNEL_DATA_DRIVEN", - "CROSS_CHANNEL_FIRST_CLICK", - "CROSS_CHANNEL_LINEAR", - "CROSS_CHANNEL_POSITION_BASED", - "CROSS_CHANNEL_TIME_DECAY" - ], - "enumDescriptions": [ - "", - "Cross-channel Last Click model.", - "Ads-preferred Last Click model.", - "Cross-channel Data Driven model.", - "Cross-channel First Click model.", - "Cross-channel Linear model.", - "Cross-channel Position Based model.", - "Cross-channel Time Decay model." - ], - "type": "string" - }, - "conversionType": { - "description": "Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard \"purchase\" type will be automatically created if this list is empty at creation time.", - "items": { - "$ref": "AttributionSettingsConversionType" - }, - "type": "array" - } - }, - "type": "object" - }, - "AttributionSettingsConversionType": { - "description": "Message representing a types of conversion events", - "id": "AttributionSettingsConversionType", - "properties": { - "includeInReporting": { - "description": "Output only. Option indicating if the type should be included in Merchant Center reporting.", - "readOnly": true, - "type": "boolean" - }, - "name": { - "description": "Output only. Conversion event name, as it'll be reported by the client.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "BestSellers": { - "description": "Fields related to the [Best sellers reports](https://support.google.com/merchants/answer/9488679).", - "id": "BestSellers", - "properties": { - "categoryId": { - "description": "Google product category ID to calculate the ranking for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). If a `WHERE` condition on `best_sellers.category_id` is not specified in the query, rankings for all top-level categories are returned.", - "format": "int64", - "type": "string" - }, - "countryCode": { - "description": "Country where the ranking is calculated. A `WHERE` condition on `best_sellers.country_code` is required in the query.", - "type": "string" - }, - "previousRank": { - "description": "Popularity rank in the previous week or month.", - "format": "int64", - "type": "string" - }, - "previousRelativeDemand": { - "description": "Estimated demand in relation to the item with the highest popularity rank in the same category and country in the previous week or month.", - "enum": [ - "RELATIVE_DEMAND_UNSPECIFIED", - "VERY_LOW", - "LOW", - "MEDIUM", - "HIGH", - "VERY_HIGH" - ], - "enumDescriptions": [ - "Relative demand is unknown.", - "Demand is 0-5% of the demand of the highest ranked product clusters or brands.", - "Demand is 6-10% of the demand of the highest ranked product clusters or brands.", - "Demand is 11-20% of the demand of the highest ranked product clusters or brands.", - "Demand is 21-50% of the demand of the highest ranked product clusters or brands.", - "Demand is 51-100% of the demand of the highest ranked product clusters or brands." - ], - "type": "string" - }, - "rank": { - "description": "Popularity on Shopping ads and free listings, in the selected category and country, based on the estimated number of units sold.", - "format": "int64", - "type": "string" - }, - "relativeDemand": { - "description": "Estimated demand in relation to the item with the highest popularity rank in the same category and country.", - "enum": [ - "RELATIVE_DEMAND_UNSPECIFIED", - "VERY_LOW", - "LOW", - "MEDIUM", - "HIGH", - "VERY_HIGH" - ], - "enumDescriptions": [ - "Relative demand is unknown.", - "Demand is 0-5% of the demand of the highest ranked product clusters or brands.", - "Demand is 6-10% of the demand of the highest ranked product clusters or brands.", - "Demand is 11-20% of the demand of the highest ranked product clusters or brands.", - "Demand is 21-50% of the demand of the highest ranked product clusters or brands.", - "Demand is 51-100% of the demand of the highest ranked product clusters or brands." - ], - "type": "string" - }, - "relativeDemandChange": { - "description": "Change in the estimated demand. Whether it rose, sank or remained flat.", - "enum": [ - "RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED", - "SINKER", - "FLAT", - "RISER" - ], - "enumDescriptions": [ - "Relative demand change is unknown.", - "Relative demand is lower than previous time period.", - "Relative demand is equal to previous time period.", - "Relative demand is higher than the previous time period." - ], - "type": "string" - }, - "reportDate": { - "$ref": "Date", - "description": "Report date. The value of this field can only be one of the following: * The first day of the week (Monday) for weekly reports. * The first day of the month for monthly reports. If a `WHERE` condition on `best_sellers.report_date` is not specified in the query, the latest available weekly or monthly report is returned." - }, - "reportGranularity": { - "description": "Granularity of the report. The ranking can be done over a week or a month timeframe. A `WHERE` condition on `best_sellers.report_granularity` is required in the query.", - "enum": [ - "REPORT_GRANULARITY_UNSPECIFIED", - "WEEKLY", - "MONTHLY" - ], - "enumDescriptions": [ - "Report granularity is unknown.", - "Ranking is done over a week timeframe.", - "Ranking is done over a month timeframe." - ], - "type": "string" - } - }, - "type": "object" - }, - "Brand": { - "description": "Brand fields. Values are only set for fields requested explicitly in the request's search query.", - "id": "Brand", - "properties": { - "name": { - "description": "Name of the brand.", - "type": "string" - } - }, - "type": "object" - }, - "Breakdown": { - "description": "A detailed impact breakdown for a group of regions where the impact of the issue on different shopping destinations is the same.", - "id": "Breakdown", - "properties": { - "details": { - "description": "Human readable, localized description of issue's effect on different targets. Should be rendered as a list. For example: * \"Products not showing in ads\" * \"Products not showing organically\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "regions": { - "description": "Lists of regions. Should be rendered as a title for this group of details. The full list should be shown to merchant. If the list is too long, it is recommended to make it expandable.", - "items": { - "$ref": "BreakdownRegion" - }, - "type": "array" - } - }, - "type": "object" - }, - "BreakdownRegion": { - "description": "Region with code and localized name.", - "id": "BreakdownRegion", - "properties": { - "code": { - "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)", - "type": "string" - }, - "name": { - "description": "The localized name of the region. For region with code='001' the value is 'All countries' or the equivalent in other languages.", - "type": "string" - } - }, - "type": "object" - }, - "BuiltInSimpleAction": { - "description": "Action that is implemented and performed in (your) third-party application. Represents various functionality that is expected to be available to merchant and will help them with resolving the issue. The application should point the merchant to the place, where they can access the corresponding functionality. If the functionality is not supported, it is recommended to explain the situation to merchant and provide them with instructions how to solve the issue.", - "id": "BuiltInSimpleAction", - "properties": { - "additionalContent": { - "$ref": "BuiltInSimpleActionAdditionalContent", - "description": "Long text from an external source that should be available to the merchant. Present when the type is `SHOW_ADDITIONAL_CONTENT`." - }, - "attributeCode": { - "description": "The attribute that needs to be updated. Present when the type is `EDIT_ITEM_ATTRIBUTE`. This field contains a code for attribute, represented in snake_case. You can find a list of product's attributes, with their codes [here](https://support.google.com/merchants/answer/7052112).", - "type": "string" - }, - "type": { - "description": "The type of action that represents a functionality that is expected to be available in third-party application.", - "enum": [ - "BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED", - "VERIFY_PHONE", - "CLAIM_WEBSITE", - "ADD_PRODUCTS", - "ADD_CONTACT_INFO", - "LINK_ADS_ACCOUNT", - "ADD_BUSINESS_REGISTRATION_NUMBER", - "EDIT_ITEM_ATTRIBUTE", - "FIX_ACCOUNT_ISSUE", - "SHOW_ADDITIONAL_CONTENT" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "Redirect merchant to the part of your application where they can verify their phone.", - "Redirect merchant to the part of your application where they can claim their website.", - "Redirect merchant to the part of your application where they can add products.", - "Open a form where the merchant can edit their contact information.", - "Redirect merchant to the part of your application where they can link ads account.", - "Open a form where the merchant can add their business registration number.", - "Open a form where the merchant can edit an attribute. The attribute that needs to be updated is specified in attribute_code field of the action.", - "Redirect merchant from the product issues to the diagnostic page with their account issues in your application. This action will be returned only for product issues that are caused by an account issue and thus merchant should resolve the problem on the account level.", - "Show additional content to the merchant. This action will be used for example to deliver a justification from national authority." - ], - "type": "string" - } - }, - "type": "object" - }, - "BuiltInSimpleActionAdditionalContent": { - "description": "Long text from external source.", - "id": "BuiltInSimpleActionAdditionalContent", - "properties": { - "paragraphs": { - "description": "Long text organized into paragraphs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "title": { - "description": "Title of the additional content;", - "type": "string" - } - }, - "type": "object" - }, - "BuiltInUserInputAction": { - "description": "Action that is implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant. They can start the action only when they provided all required inputs. The application will request processing of the action by calling the [triggeraction method](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction).", - "id": "BuiltInUserInputAction", - "properties": { - "actionContext": { - "description": "Internal details. Not for display but need to be sent back when triggering the action.", - "type": "string" - }, - "flows": { - "description": "Actions may provide multiple different flows. Merchant selects one that fits best to their intent. Selecting the flow is the first step in user's interaction with the action. It affects what input fields will be available and required and also how the request will be processed.", - "items": { - "$ref": "ActionFlow" - }, - "type": "array" - } - }, - "type": "object" - }, - "BusinessDayConfig": { - "id": "BusinessDayConfig", - "properties": { - "businessDays": { - "description": "Regular business days, such as '\"monday\"'. May not be empty.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "BuyOnGoogleProgramStatus": { - "description": "Response message for the GetProgramStatus method.", - "id": "BuyOnGoogleProgramStatus", - "properties": { - "businessModel": { - "description": "The business models in which merchant participates.", - "items": { - "enum": [ - "BUSINESS_MODEL_UNSPECIFIED", - "MANUFACTURER", - "IMPORTER", - "RESELLER", - "OTHER" - ], - "enumDescriptions": [ - "Default value when business model is not set.", - "Merchant is a manufacturer.", - "Merchant is an importer.", - "Merchant is a reseller.", - "Merchant has a different business model." - ], - "type": "string" - }, - "type": "array" - }, - "customerServicePendingEmail": { - "description": "The customer service pending email. After verification this field becomes empty.", - "type": "string" - }, - "customerServicePendingPhoneNumber": { - "description": "The pending phone number specified for BuyOnGoogle program. It might be different than account level phone number. In order to update this field the customer_service_pending_phone_region_code must also be set. After verification this field becomes empty.", - "type": "string" - }, - "customerServicePendingPhoneRegionCode": { - "description": "Two letter country code for the pending phone number, for example `CA` for Canadian numbers. See the [ISO 3166-1 alpha-2](https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) officially assigned codes. In order to update this field the customer_service_pending_phone_number must also be set. After verification this field becomes empty.", - "type": "string" - }, - "customerServiceVerifiedEmail": { - "description": "Output only. The customer service verified email.", - "readOnly": true, - "type": "string" - }, - "customerServiceVerifiedPhoneNumber": { - "description": "Output only. The verified phone number specified for BuyOnGoogle program. It might be different than account level phone number.", - "readOnly": true, - "type": "string" - }, - "customerServiceVerifiedPhoneRegionCode": { - "description": "Output only. Two letter country code for the verified phone number, for example `CA` for Canadian numbers. See the [ISO 3166-1 alpha-2](https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) officially assigned codes.", - "readOnly": true, - "type": "string" - }, - "onlineSalesChannel": { - "description": "The channels through which the merchant is selling.", - "enum": [ - "ONLINE_SALES_CHANNEL_UNSPECIFIED", - "GOOGLE_EXCLUSIVE", - "GOOGLE_AND_OTHER_WEBSITES" - ], - "enumDescriptions": [ - "Default value when online sales channel is not set.", - "Merchant is selling exclusively on Google.", - "Merchant is selling on Google and other websites." - ], - "type": "string" - }, - "participationStage": { - "description": "Output only. The current participation stage for the program.", - "enum": [ - "PROGRAM_PARTICIPATION_STAGE_UNSPECIFIED", - "NOT_ELIGIBLE", - "ELIGIBLE", - "ONBOARDING", - "ELIGIBLE_FOR_REVIEW", - "PENDING_REVIEW", - "REVIEW_DISAPPROVED", - "ACTIVE", - "PAUSED", - "DEPRECATED" - ], - "enumDescriptions": [ - "Default value when participation stage is not set.", - "Merchant is not eligible for onboarding to a given program in a specific region code.", - "Merchant is eligible for onboarding to a given program in a specific region code.", - "Merchant is onboarding to a given program in a specific region code.", - "Merchant fulfilled all the requirements and is ready to request review in a specific region code.", - "Merchant is waiting for the review to be completed in a specific region code.", - "The review for a merchant has been rejected in a specific region code.", - "Merchant's program participation is active for a specific region code.", - "Participation has been paused.", - "The program cannot be further reactivated or paused. See more about [Buy on Google](https://support.google.com/merchants/answer/7679273)." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Callout": { - "description": "An important message that should be highlighted. Usually displayed as a banner.", - "id": "Callout", - "properties": { - "fullMessage": { - "$ref": "TextWithTooltip", - "description": "A full message that needs to be shown to the merchant." - }, - "styleHint": { - "description": "Can be used to render messages with different severity in different styles. Snippets off all types contain important information that should be displayed to merchants.", - "enum": [ - "CALLOUT_STYLE_HINT_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "The most important type of information highlighting problems, like an unsuccessful outcome of previously requested actions.", - "Information warning about pending problems, risks or deadlines.", - "Default severity for important information like pending status of previously requested action or cooldown for re-review." - ], - "type": "string" - } - }, - "type": "object" - }, - "CaptureOrderRequest": { - "description": "Request message for the CaptureOrder method.", - "id": "CaptureOrderRequest", - "properties": {}, - "type": "object" - }, - "CaptureOrderResponse": { - "description": "Response message for the CaptureOrder method.", - "id": "CaptureOrderResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Only defined if the request was successful. Acceptable values are: * \"duplicate\" * \"executed\"", - "enum": [ - "EXECUTION_STATUS_UNSPECIFIED", - "EXECUTED", - "DUPLICATE" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "The request was completed successfully.", - "The request was not performed because it already executed once successfully." - ], - "type": "string" - } - }, - "type": "object" - }, - "CarrierRate": { - "id": "CarrierRate", - "properties": { - "carrierName": { - "description": "Carrier service, such as `\"UPS\"` or `\"Fedex\"`. The list of supported carriers can be retrieved through the `getSupportedCarriers` method. Required.", - "type": "string" - }, - "carrierService": { - "description": "Carrier service, such as `\"ground\"` or `\"2 days\"`. The list of supported services for a carrier can be retrieved through the `getSupportedCarriers` method. Required.", - "type": "string" - }, - "flatAdjustment": { - "$ref": "Price", - "description": "Additive shipping rate modifier. Can be negative. For example `{ \"value\": \"1\", \"currency\" : \"USD\" }` adds $1 to the rate, `{ \"value\": \"-3\", \"currency\" : \"USD\" }` removes $3 from the rate. Optional." - }, - "name": { - "description": "Name of the carrier rate. Must be unique per rate group. Required.", - "type": "string" - }, - "originPostalCode": { - "description": "Shipping origin for this carrier rate. Required.", - "type": "string" - }, - "percentageAdjustment": { - "description": "Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `\"5.4\"` increases the rate by 5.4%, `\"-3\"` decreases the rate by 3%. Optional.", - "type": "string" - } - }, - "type": "object" - }, - "CarriersCarrier": { - "id": "CarriersCarrier", - "properties": { - "country": { - "description": "The CLDR country code of the carrier (for example, \"US\"). Always present.", - "type": "string" - }, - "eddServices": { - "description": "A list of services supported for EDD (Estimated Delivery Date) calculation. This is the list of valid values for WarehouseBasedDeliveryTime.carrierService.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "The name of the carrier (for example, `\"UPS\"`). Always present.", - "type": "string" - }, - "services": { - "description": "A list of supported services (for example, `\"ground\"`) for that carrier. Contains at least one service. This is the list of valid values for CarrierRate.carrierService.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CheckoutSettings": { - "description": "`CheckoutSettings` for a specific merchant ID.", - "id": "CheckoutSettings", - "properties": { - "effectiveEnrollmentState": { - "description": "Output only. The effective value of enrollment state for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account.", - "enum": [ - "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED", - "INACTIVE", - "ENROLLED", - "OPT_OUT" - ], - "enumDescriptions": [ - "Default enrollment state when enrollment state is not specified.", - "Merchant has not enrolled into the feature.", - "Merchant has enrolled into the feature by providing either an account level URL or checkout URLs as part of their feed.", - "Merchant has previously enrolled but opted out of the feature." - ], - "readOnly": true, - "type": "string" - }, - "effectiveReviewState": { - "description": "Output only. The effective value of review state for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account.", - "enum": [ - "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED", - "IN_REVIEW", - "APPROVED", - "DISAPPROVED" - ], - "enumDescriptions": [ - "Default review state when review state is not specified.", - "Merchant provided URLs are being reviewed for data quality issues.", - "Merchant account has been approved. Indicates the data quality checks have passed.", - "Merchant account has been disapproved due to data quality issues." - ], - "readOnly": true, - "type": "string" - }, - "effectiveUriSettings": { - "$ref": "UrlSettings", - "description": "The effective value of `url_settings` for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account." - }, - "enrollmentState": { - "description": "Output only. Reflects the merchant enrollment state in `Checkout` feature.", - "enum": [ - "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED", - "INACTIVE", - "ENROLLED", - "OPT_OUT" - ], - "enumDescriptions": [ - "Default enrollment state when enrollment state is not specified.", - "Merchant has not enrolled into the feature.", - "Merchant has enrolled into the feature by providing either an account level URL or checkout URLs as part of their feed.", - "Merchant has previously enrolled but opted out of the feature." - ], - "readOnly": true, - "type": "string" - }, - "merchantId": { - "description": "Required. The ID of the account.", - "format": "int64", - "type": "string" - }, - "reviewState": { - "description": "Output only. Reflects the merchant review state in `Checkout` feature. This is set based on the data quality reviews of the URL provided by the merchant. A merchant with enrollment state as `ENROLLED` can be in the following review states: `IN_REVIEW`, `APPROVED` or `DISAPPROVED`. A merchant must be in an enrollment_state of `ENROLLED` before a review can begin for the merchant.", - "enum": [ - "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED", - "IN_REVIEW", - "APPROVED", - "DISAPPROVED" - ], - "enumDescriptions": [ - "Default review state when review state is not specified.", - "Merchant provided URLs are being reviewed for data quality issues.", - "Merchant account has been approved. Indicates the data quality checks have passed.", - "Merchant account has been disapproved due to data quality issues." - ], - "readOnly": true, - "type": "string" - }, - "uriSettings": { - "$ref": "UrlSettings", - "description": "URL settings for cart or checkout URL." - } - }, - "type": "object" - }, - "CloudExportAdditionalProperties": { - "description": "Product property for the Cloud Retail API. For example, properties for a TV product could be \"Screen-Resolution\" or \"Screen-Size\".", - "id": "CloudExportAdditionalProperties", - "properties": { - "boolValue": { - "description": "Boolean value of the given property. For example for a TV product, \"True\" or \"False\" if the screen is UHD.", - "type": "boolean" - }, - "floatValue": { - "description": "Float values of the given property. For example for a TV product 1.2345. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order.", - "items": { - "format": "float", - "type": "number" - }, - "type": "array" - }, - "intValue": { - "description": "Integer values of the given property. For example, 1080 for a screen resolution of a TV product. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "maxValue": { - "description": "Maximum float value of the given property. For example for a TV product 100.00.", - "format": "float", - "type": "number" - }, - "minValue": { - "description": "Minimum float value of the given property. For example for a TV product 1.00.", - "format": "float", - "type": "number" - }, - "propertyName": { - "description": "Name of the given property. For example, \"Screen-Resolution\" for a TV product. Maximum string size is 256 characters.", - "type": "string" - }, - "textValue": { - "description": "Text value of the given property. For example, \"8K(UHD)\" could be a text value for a TV product. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order. Maximum string size is 256 characters.", - "items": { - "type": "string" - }, - "type": "array" - }, - "unitCode": { - "description": "Unit of the given property. For example, \"Pixels\" for a TV product. Maximum string size is 256 bytes.", - "type": "string" - } - }, - "type": "object" - }, - "Collection": { - "description": "The collection message.", - "id": "Collection", - "properties": { - "customLabel0": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns. [Custom label](https://support.google.com/merchants/answer/9674217)", - "type": "string" - }, - "customLabel1": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", - "type": "string" - }, - "customLabel2": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", - "type": "string" - }, - "customLabel3": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", - "type": "string" - }, - "customLabel4": { - "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", - "type": "string" - }, - "featuredProduct": { - "description": "This identifies one or more products associated with the collection. Used as a lookup to the corresponding product ID in your product feeds. Provide a maximum of 100 featuredProduct (for collections). Provide up to 10 featuredProduct (for Shoppable Images only) with ID and X and Y coordinates. [featured_product attribute](https://support.google.com/merchants/answer/9703736)", - "items": { - "$ref": "CollectionFeaturedProduct" - }, - "type": "array" - }, - "headline": { - "description": "Your collection's name. [headline attribute](https://support.google.com/merchants/answer/9673580)", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "Required. The REST ID of the collection. Content API methods that operate on collections take this as their collectionId parameter. The REST ID for a collection is of the form collectionId. [id attribute](https://support.google.com/merchants/answer/9649290)", - "type": "string" - }, - "imageLink": { - "description": "The URL of a collection’s image. [image_link attribute](https://support.google.com/merchants/answer/9703236)", - "items": { - "type": "string" - }, - "type": "array" - }, - "language": { - "description": "The language of a collection and the language of any featured products linked to the collection. [language attribute](https://support.google.com/merchants/answer/9673781)", - "type": "string" - }, - "link": { - "description": "A collection’s landing page. URL directly linking to your collection's page on your website. [link attribute](https://support.google.com/merchants/answer/9673983)", - "type": "string" - }, - "mobileLink": { - "description": "A collection’s mobile-optimized landing page when you have a different URL for mobile and desktop traffic. [mobile_link attribute](https://support.google.com/merchants/answer/9646123)", - "type": "string" - }, - "productCountry": { - "description": "[product_country attribute](https://support.google.com/merchants/answer/9674155)", - "type": "string" - } - }, - "type": "object" - }, - "CollectionFeaturedProduct": { - "description": "The message for FeaturedProduct. [FeaturedProduct](https://support.google.com/merchants/answer/9703736)", - "id": "CollectionFeaturedProduct", - "properties": { - "offerId": { - "description": "The unique identifier for the product item.", - "type": "string" - }, - "x": { - "description": "Required. X-coordinate of the product callout on the Shoppable Image.", - "format": "float", - "type": "number" - }, - "y": { - "description": "Required. Y-coordinate of the product callout on the Shoppable Image.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "CollectionStatus": { - "description": "The collectionstatus message.", - "id": "CollectionStatus", - "properties": { - "collectionLevelIssuses": { - "description": "A list of all issues associated with the collection.", - "items": { - "$ref": "CollectionStatusItemLevelIssue" - }, - "type": "array" - }, - "creationDate": { - "description": "Date on which the collection has been created in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for example \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\"", - "type": "string" - }, - "destinationStatuses": { - "description": "The intended destinations for the collection.", - "items": { - "$ref": "CollectionStatusDestinationStatus" - }, - "type": "array" - }, - "id": { - "description": "Required. The ID of the collection for which status is reported.", - "type": "string" - }, - "lastUpdateDate": { - "description": "Date on which the collection has been last updated in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for example \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\"", - "type": "string" - } - }, - "type": "object" - }, - "CollectionStatusDestinationStatus": { - "description": "Destination status message.", - "id": "CollectionStatusDestinationStatus", - "properties": { - "approvedCountries": { - "description": "Country codes (ISO 3166-1 alpha-2) where the collection is approved.", - "items": { - "type": "string" - }, - "type": "array" - }, - "destination": { - "description": "The name of the destination", - "type": "string" - }, - "disapprovedCountries": { - "description": "Country codes (ISO 3166-1 alpha-2) where the collection is disapproved.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pendingCountries": { - "description": "Country codes (ISO 3166-1 alpha-2) where the collection is pending approval.", - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "description": "The status for the specified destination in the collections target country.", - "type": "string" - } - }, - "type": "object" - }, - "CollectionStatusItemLevelIssue": { - "description": "Issue associated with the collection.", - "id": "CollectionStatusItemLevelIssue", - "properties": { - "applicableCountries": { - "description": "Country codes (ISO 3166-1 alpha-2) where issue applies to the offer.", - "items": { - "type": "string" - }, - "type": "array" - }, - "attributeName": { - "description": "The attribute's name, if the issue is caused by a single attribute.", - "type": "string" - }, - "code": { - "description": "The error code of the issue.", - "type": "string" - }, - "description": { - "description": "A short issue description in English.", - "type": "string" - }, - "destination": { - "description": "The destination the issue applies to.", - "type": "string" - }, - "detail": { - "description": "A detailed issue description in English.", - "type": "string" - }, - "documentation": { - "description": "The URL of a web page to help with resolving this issue.", - "type": "string" - }, - "resolution": { - "description": "Whether the issue can be resolved by the merchant.", - "type": "string" - }, - "servability": { - "description": "How this issue affects the serving of the collection.", - "type": "string" - } - }, - "type": "object" - }, - "CompetitiveVisibility": { - "description": "Fields related to [competitive visibility reports] (https://support.google.com/merchants/answer/11366442).", - "id": "CompetitiveVisibility", - "properties": { - "adsOrganicRatio": { - "description": "[Ads / organic ratio] (https://support.google.com/merchants/answer/11366442#zippy=%2Cadsfree-ratio) shows how often a merchant receives impressions from Shopping ads compared to organic traffic. The number is rounded and bucketed. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "categoryBenchmarkVisibilityTrend": { - "description": "Change in visibility based on impressions with respect to the start of the selected time range (or first day with non-zero impressions) for a combined set of merchants with highest visibility approximating the market. Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "categoryId": { - "description": "Google product category ID to calculate the report for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). Required in the `SELECT` clause. A `WHERE` condition on `competitive_visibility.category_id` is required in the query.", - "format": "int64", - "type": "string" - }, - "countryCode": { - "description": "The country where impression appeared. Required in the `SELECT` clause. A `WHERE` condition on `competitive_visibility.country_code` is required in the query.", - "type": "string" - }, - "date": { - "$ref": "Date", - "description": "Date of this row. Available only in `CompetitiveVisibilityBenchmarkView` and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for `CompetitiveVisibilityMarketBenchmarkView`." - }, - "domain": { - "description": "Domain of your competitor or your domain, if 'is_your_domain' is true. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "type": "string" - }, - "higherPositionRate": { - "description": "Higher position rate shows how often a competitor’s offer got placed in a higher position on the page than your offer. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "isYourDomain": { - "description": "True if this row contains data for your domain. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "type": "boolean" - }, - "pageOverlapRate": { - "description": "Page overlap rate describes how frequently competing retailers’ offers are shown together with your offers on the same page. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "rank": { - "description": "Position of the domain in the top merchants ranking for the selected keys (`date`, `category_id`, `country_code`, `listing_type`) based on impressions. 1 is the highest. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "uint64", - "type": "string" - }, - "relativeVisibility": { - "description": "Relative visibility shows how often your competitors’ offers are shown compared to your offers. In other words, this is the number of displayed impressions of a competitor retailer divided by the number of your displayed impressions during a selected time range for a selected product category and country. Available only in `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - }, - "trafficSource": { - "description": "Type of impression listing. Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' clause.", - "enum": [ - "UNKNOWN", - "ORGANIC", - "ADS", - "ALL" - ], - "enumDescriptions": [ - "Traffic source is unknown.", - "Organic traffic.", - "Traffic from Ads.", - "Organic and Ads traffic." - ], - "type": "string" - }, - "yourDomainVisibilityTrend": { - "description": "Change in visibility based on impressions for your domain with respect to the start of the selected time range (or first day with non-zero impressions). Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered on in the 'WHERE' clause.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ConversionSource": { - "description": "Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.", - "id": "ConversionSource", - "properties": { - "conversionSourceId": { - "description": "Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.", - "readOnly": true, - "type": "string" - }, - "expireTime": { - "description": "Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "googleAnalyticsLink": { - "$ref": "GoogleAnalyticsLink", - "description": "Immutable. Conversion Source of type \"Link to Google Analytics Property\"." - }, - "merchantCenterDestination": { - "$ref": "MerchantCenterDestination", - "description": "Conversion Source of type \"Merchant Center Tag Destination\"." - }, - "state": { - "description": "Output only. Current state of this conversion source. Can't be edited through the API.", - "enum": [ - "STATE_UNSPECIFIED", - "ACTIVE", - "ARCHIVED", - "PENDING" - ], - "enumDescriptions": [ - "", - "Conversion source is fully functional.", - "Conversion source has been archived in the last 30 days and not currently functional. Can be restored using the undelete method.", - "Conversion source creation has started but not fully finished yet." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "Css": { - "description": "Information about CSS domain.", - "id": "Css", - "properties": { - "cssDomainId": { - "description": "Output only. Immutable. The CSS domain ID.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "cssGroupId": { - "description": "Output only. Immutable. The ID of the CSS group this CSS domain is affiliated with. Only populated for CSS group users.", - "format": "int64", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Output only. Immutable. The CSS domain's display name, used when space is constrained.", - "readOnly": true, - "type": "string" - }, - "fullName": { - "description": "Output only. Immutable. The CSS domain's full name.", - "readOnly": true, - "type": "string" - }, - "homepageUri": { - "description": "Output only. Immutable. The CSS domain's homepage.", - "readOnly": true, - "type": "string" - }, - "labelIds": { - "description": "A list of label IDs that are assigned to this CSS domain by its CSS group. Only populated for CSS group users.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "CustomAttribute": { - "description": "A message that represents custom attributes. Exactly one of `value` or `groupValues` must be provided. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per merchant, with total size of 102.4kB.", - "id": "CustomAttribute", - "properties": { - "groupValues": { - "description": "Subattributes within this attribute group. Exactly one of value or groupValues must be provided.", - "items": { - "$ref": "CustomAttribute" - }, - "type": "array" - }, - "name": { - "description": "The name of the attribute. Underscores will be replaced by spaces upon insertion.", - "type": "string" - }, - "value": { - "description": "The value of the attribute.", - "type": "string" - } - }, - "type": "object" - }, - "CustomerReturnReason": { - "id": "CustomerReturnReason", - "properties": { - "description": { - "description": "Description of the reason.", - "type": "string" - }, - "reasonCode": { - "description": "Code of the return reason. Acceptable values are: - \"`betterPriceFound`\" - \"`changedMind`\" - \"`damagedOrDefectiveItem`\" - \"`didNotMatchDescription`\" - \"`doesNotFit`\" - \"`expiredItem`\" - \"`incorrectItemReceived`\" - \"`noLongerNeeded`\" - \"`notSpecified`\" - \"`orderedWrongItem`\" - \"`other`\" - \"`qualityNotExpected`\" - \"`receivedTooLate`\" - \"`undeliverable`\" ", - "type": "string" - } - }, - "type": "object" - }, - "CutoffTime": { - "id": "CutoffTime", - "properties": { - "hour": { - "description": "Hour of the cutoff time until which an order has to be placed to be processed in the same day. Required.", - "format": "uint32", - "type": "integer" - }, - "minute": { - "description": "Minute of the cutoff time until which an order has to be placed to be processed in the same day. Required.", - "format": "uint32", - "type": "integer" - }, - "timezone": { - "description": "Timezone identifier for the cutoff time (for example, \"Europe/Zurich\"). List of identifiers. Required.", - "type": "string" - } - }, - "type": "object" - }, - "Datafeed": { - "description": "Datafeed configuration data.", - "id": "Datafeed", - "properties": { - "attributeLanguage": { - "description": "The two-letter ISO 639-1 language in which the attributes are defined in the data feed.", - "type": "string" - }, - "contentType": { - "description": "Required. The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported. Acceptable values are: - \"`local products`\" - \"`product inventory`\" - \"`products`\" ", - "type": "string" - }, - "fetchSchedule": { - "$ref": "DatafeedFetchSchedule", - "description": "Fetch schedule for the feed file." - }, - "fileName": { - "description": "Required. The filename of the feed. All feeds must have a unique file name.", - "type": "string" - }, - "format": { - "$ref": "DatafeedFormat", - "description": "Format of the feed file." - }, - "id": { - "description": "Required for update. The ID of the data feed.", - "format": "int64", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeed`\"", - "type": "string" - }, - "name": { - "description": "Required for insert. A descriptive name of the data feed.", - "type": "string" - }, - "targets": { - "description": "The targets this feed should apply to (country, language, destinations).", - "items": { - "$ref": "DatafeedTarget" - }, - "type": "array" - } - }, - "type": "object" - }, - "DatafeedFetchSchedule": { - "description": "The required fields vary based on the frequency of fetching. For a monthly fetch schedule, day_of_month and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.", - "id": "DatafeedFetchSchedule", - "properties": { - "dayOfMonth": { - "description": "The day of the month the feed file should be fetched (1-31).", - "format": "uint32", - "type": "integer" - }, - "fetchUrl": { - "description": "The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.", - "type": "string" - }, - "hour": { - "description": "The hour of the day the feed file should be fetched (0-23).", - "format": "uint32", - "type": "integer" - }, - "minuteOfHour": { - "description": "The minute of the hour the feed file should be fetched (0-59). Read-only.", - "format": "uint32", - "type": "integer" - }, - "password": { - "description": "An optional password for fetch_url.", - "type": "string" - }, - "paused": { - "description": "Whether the scheduled fetch is paused or not.", - "type": "boolean" - }, - "timeZone": { - "description": "Time zone used for schedule. UTC by default. For example, \"America/Los_Angeles\".", - "type": "string" - }, - "username": { - "description": "An optional user name for fetch_url.", - "type": "string" - }, - "weekday": { - "description": "The day of the week the feed file should be fetched. Acceptable values are: - \"`monday`\" - \"`tuesday`\" - \"`wednesday`\" - \"`thursday`\" - \"`friday`\" - \"`saturday`\" - \"`sunday`\" ", - "type": "string" - } - }, - "type": "object" - }, - "DatafeedFormat": { - "id": "DatafeedFormat", - "properties": { - "columnDelimiter": { - "description": "Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - \"`pipe`\" - \"`tab`\" - \"`tilde`\" ", - "type": "string" - }, - "fileEncoding": { - "description": "Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. Acceptable values are: - \"`latin-1`\" - \"`utf-16be`\" - \"`utf-16le`\" - \"`utf-8`\" - \"`windows-1252`\" ", - "type": "string" - }, - "quotingMode": { - "description": "Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - \"`normal character`\" - \"`value quoting`\" ", - "type": "string" - } - }, - "type": "object" - }, - "DatafeedStatus": { - "description": "The status of a datafeed, that is, the result of the last retrieval of the datafeed computed asynchronously when the feed processing is finished.", - "id": "DatafeedStatus", - "properties": { - "country": { - "description": "The country for which the status is reported, represented as a CLDR territory code.", - "type": "string" - }, - "datafeedId": { - "description": "The ID of the feed for which the status is reported.", - "format": "uint64", - "type": "string" - }, - "errors": { - "description": "The list of errors occurring in the feed.", - "items": { - "$ref": "DatafeedStatusError" - }, - "type": "array" - }, - "feedLabel": { - "description": "The feed label status is reported for.", - "type": "string" - }, - "itemsTotal": { - "description": "The number of items in the feed that were processed.", - "format": "uint64", - "type": "string" - }, - "itemsValid": { - "description": "The number of items in the feed that were valid.", - "format": "uint64", + "AccountAddress": { + "id": "AccountAddress", + "properties": { + "country": { + "description": "CLDR country code (for example, \"US\"). All MCA sub-accounts inherit the country of their parent MCA by default, however the country can be updated for individual sub-accounts.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedStatus`\"", + "locality": { + "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", "type": "string" }, - "language": { - "description": "The two-letter ISO 639-1 language for which the status is reported.", + "postalCode": { + "description": "Postal code or ZIP (for example, \"94043\").", "type": "string" }, - "lastUploadDate": { - "description": "The last date at which the feed was uploaded.", + "region": { + "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", "type": "string" }, - "processingStatus": { - "description": "The processing status of the feed. Acceptable values are: - \"`\"`failure`\": The feed could not be processed or all items had errors.`\" - \"`in progress`\": The feed is being processed. - \"`none`\": The feed has not yet been processed. For example, a feed that has never been uploaded will have this processing status. - \"`success`\": The feed was processed successfully, though some items might have had errors. ", + "streetAddress": { + "description": "Street-level part of the address. Use `\\n` to add a second line.", "type": "string" - }, - "warnings": { - "description": "The list of errors occurring in the feed.", - "items": { - "$ref": "DatafeedStatusError" - }, - "type": "array" } }, "type": "object" }, - "DatafeedStatusError": { - "description": "An error occurring in the feed, like \"invalid price\".", - "id": "DatafeedStatusError", + "AccountAdsLink": { + "id": "AccountAdsLink", "properties": { - "code": { - "description": "The code of the error, for example, \"validation/invalid_value\".", + "adsId": { + "description": "Customer ID of the Ads account.", + "format": "uint64", "type": "string" }, - "count": { - "description": "The number of occurrences of the error in the feed.", - "format": "uint64", + "status": { + "description": "Status of the link between this Merchant Center account and the Ads account. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in Google Ads or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending. Acceptable values are: - \"`active`\" - \"`pending`\" ", "type": "string" + } + }, + "type": "object" + }, + "AccountAutomaticImprovements": { + "description": "The automatic improvements of the account can be used to automatically update items, improve images and shipping.", + "id": "AccountAutomaticImprovements", + "properties": { + "imageImprovements": { + "$ref": "AccountImageImprovements", + "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973) This field is only updated (cleared) if provided." }, - "examples": { - "description": "A list of example occurrences of the error, grouped by product.", - "items": { - "$ref": "DatafeedStatusExample" - }, - "type": "array" + "itemUpdates": { + "$ref": "AccountItemUpdates", + "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown. This field is only updated (cleared) if provided." }, - "message": { - "description": "The error message, for example, \"Invalid price\".", - "type": "string" + "shippingImprovements": { + "$ref": "AccountShippingImprovements", + "description": "Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: - Delivery address of an order - Current handling time and shipping time settings - Estimated weekdays or business days - Parcel tracking data This field is only updated (cleared) if provided." } }, "type": "object" }, - "DatafeedStatusExample": { - "description": "An example occurrence for a particular error.", - "id": "DatafeedStatusExample", + "AccountBusinessIdentity": { + "description": "The [business identity attributes](https://support.google.com/merchants/answer/10342414) can be used to self-declare attributes that let customers know more about your business.", + "id": "AccountBusinessIdentity", "properties": { - "itemId": { - "description": "The ID of the example item.", - "type": "string" + "blackOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being black-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." }, - "lineNumber": { - "description": "Line number in the data feed where the example is found.", - "format": "uint64", - "type": "string" + "includeForPromotions": { + "description": "Required. By setting this field, your business may be included in promotions for all the selected attributes. If you clear this option, it won't affect your identification with any of the attributes. For this field to be set, the merchant must self identify with at least one of the `AccountIdentityType`. If none are included, the request will be considered invalid.", + "type": "boolean" }, - "value": { - "description": "The problematic value.", - "type": "string" + "latinoOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being latino-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + }, + "smallBusiness": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as a small business. This optional field is only available for merchants with a business country set to \"US\". It is also not allowed for marketplaces, but it is allowed to marketplace sellers." + }, + "veteranOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being veteran-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." + }, + "womenOwned": { + "$ref": "AccountIdentityType", + "description": "Specifies whether the business identifies itself as being women-owned. This optional field is only available for merchants with a business country set to \"US\". This field is not allowed for marketplaces or marketplace sellers." } }, "type": "object" }, - "DatafeedTarget": { - "id": "DatafeedTarget", + "AccountBusinessInformation": { + "id": "AccountBusinessInformation", "properties": { - "country": { - "description": "Deprecated. Use `feedLabel` instead. The country where the items in the feed will be included in the search index, represented as a CLDR territory code.", - "type": "string" + "address": { + "$ref": "AccountAddress", + "description": "The address of the business. Use `\\n` to add a second address line." }, - "excludedDestinations": { - "description": "The list of [destinations to exclude](//support.google.com/merchants/answer/6324486) for this target (corresponds to cleared check boxes in Merchant Center). Products that are excluded from all destinations for more than 7 days are automatically deleted.", - "items": { - "type": "string" - }, - "type": "array" + "customerService": { + "$ref": "AccountCustomerService", + "description": "The customer service information of the business." }, - "feedLabel": { - "description": "Feed label for the DatafeedTarget. Either `country` or `feedLabel` is required. If both `feedLabel` and `country` is specified, the values must match. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).", + "koreanBusinessRegistrationNumber": { + "description": "The 10-digit [Korean business registration number](https://support.google.com/merchants/answer/9037766) separated with dashes in the format: XXX-XX-XXXXX. This field will only be updated if explicitly set.", "type": "string" }, - "includedDestinations": { - "description": "The list of [destinations to include](//support.google.com/merchants/answer/7501026) for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "language": { - "description": "The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for `targets[].country`.", + "phoneNumber": { + "description": "The phone number of the business in [E.164](https://en.wikipedia.org/wiki/E.164) format. This can only be updated if a verified phone number is not already set. To replace a verified phone number use the `Accounts.requestphoneverification` and `Accounts.verifyphonenumber`.", "type": "string" }, - "targetCountries": { - "description": "The countries where the items may be displayed. Represented as a CLDR territory code. Will be ignored for \"product inventory\" feeds.", - "items": { - "type": "string" - }, - "type": "array" + "phoneVerificationStatus": { + "description": "Verification status of the phone number of the business. This status is read only and can be updated only by successful phone verification. Acceptable values are: - \"`verified`\" - \"`unverified`\" ", + "type": "string" } }, "type": "object" }, - "DatafeedsCustomBatchRequest": { - "id": "DatafeedsCustomBatchRequest", + "AccountConversionSettings": { + "description": "Settings for conversion tracking.", + "id": "AccountConversionSettings", "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "DatafeedsCustomBatchRequestEntry" - }, - "type": "array" + "freeListingsAutoTaggingEnabled": { + "description": "When enabled, free listing URLs have a parameter to enable conversion tracking for products owned by the current merchant account. See [auto-tagging](https://support.google.com/merchants/answer/11127659).", + "type": "boolean" } }, "type": "object" }, - "DatafeedsCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch datafeeds request.", - "id": "DatafeedsCustomBatchRequestEntry", + "AccountCredentials": { + "description": "Credentials allowing Google to call a partner's API on behalf of a merchant.", + "id": "AccountCredentials", "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" + "accessToken": { + "description": "An OAuth access token.", + "type": "string" }, - "datafeed": { - "$ref": "Datafeed", - "description": "The data feed to insert." + "expiresIn": { + "description": "The amount of time, in seconds, after which the access token is no longer valid.", + "format": "int64", + "type": "string" }, - "datafeedId": { - "description": "The ID of the data feed to get, delete or fetch.", - "format": "uint64", + "purpose": { + "description": "Indicates to Google how Google should use these OAuth tokens.", + "enum": [ + "ACCOUNT_CREDENTIALS_PURPOSE_UNSPECIFIED", + "SHOPIFY_ORDER_MANAGEMENT", + "SHOPIFY_INTEGRATION" + ], + "enumDeprecated": [ + false, + true, + false + ], + "enumDescriptions": [ + "Unknown purpose.", + "The credentials allow Google to manage Shopify orders on behalf of the merchant (deprecated).", + "The credentials allow Google to manage Shopify integration on behalf of the merchant." + ], + "type": "string" + } + }, + "type": "object" + }, + "AccountCustomerService": { + "id": "AccountCustomerService", + "properties": { + "email": { + "description": "Customer service email.", "type": "string" }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "phoneNumber": { + "description": "Customer service phone number.", "type": "string" }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`delete`\" - \"`fetchNow`\" - \"`get`\" - \"`insert`\" - \"`update`\" ", + "url": { + "description": "Customer service URL.", "type": "string" } }, "type": "object" }, - "DatafeedsCustomBatchResponse": { - "id": "DatafeedsCustomBatchResponse", + "AccountGoogleMyBusinessLink": { + "id": "AccountGoogleMyBusinessLink", "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "DatafeedsCustomBatchResponseEntry" - }, - "type": "array" + "gmbAccountId": { + "description": "The ID of the Business Profile. If this is provided, then `gmbEmail` is ignored. The value of this field should match the `accountId` used by the Business Profile API.", + "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsCustomBatchResponse`\".", + "gmbEmail": { + "description": "The Business Profile email address of a specific account within a Business Profile. A sample account within a Business Profile could be a business account with set of locations, managed under the Business Profile.", + "type": "string" + }, + "status": { + "description": "Status of the link between this Merchant Center account and the Business Profile. Acceptable values are: - \"`active`\" - \"`pending`\" ", "type": "string" } }, "type": "object" }, - "DatafeedsCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch datafeeds response.", - "id": "DatafeedsCustomBatchResponseEntry", + "AccountIdentifier": { + "id": "AccountIdentifier", "properties": { - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" - }, - "datafeed": { - "$ref": "Datafeed", - "description": "The requested data feed. Defined if and only if the request was successful." + "aggregatorId": { + "description": "The aggregator ID, set for aggregators and subaccounts (in that case, it represents the aggregator of the subaccount).", + "format": "uint64", + "type": "string" }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." + "merchantId": { + "description": "The merchant account ID, set for individual accounts and subaccounts.", + "format": "uint64", + "type": "string" } }, "type": "object" }, - "DatafeedsFetchNowResponse": { - "id": "DatafeedsFetchNowResponse", + "AccountIdentityType": { + "description": "The account identity type used to specify attributes.", + "id": "AccountIdentityType", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsFetchNowResponse`\".", - "type": "string" + "selfIdentified": { + "description": "Optional. Indicates that the business identifies itself with a given identity type. Setting this field does not automatically mean eligibility for promotions.", + "type": "boolean" } }, "type": "object" }, - "DatafeedsListResponse": { - "id": "DatafeedsListResponse", + "AccountImageImprovements": { + "description": "This improvement will attempt to automatically correct submitted images if they don't meet the [image requirements](https://support.google.com/merchants/answer/6324350), for example, removing overlays. If successful, the image will be replaced and approved. This improvement is only applied to images of disapproved offers. For more information see: [Automatic image improvements](https://support.google.com/merchants/answer/9242973)", + "id": "AccountImageImprovements", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsListResponse`\".", - "type": "string" - }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of datafeeds.", - "type": "string" + "accountImageImprovementsSettings": { + "$ref": "AccountImageImprovementsSettings", + "description": "Determines how the images should be automatically updated. If this field is not present, then the settings will be deleted. If there are no settings for subaccount, they are inherited from aggregator." }, - "resources": { - "items": { - "$ref": "Datafeed" - }, - "type": "array" + "effectiveAllowAutomaticImageImprovements": { + "description": "Output only. The effective value of allow_automatic_image_improvements. If account_image_improvements_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" } }, "type": "object" }, - "DatafeedstatusesCustomBatchRequest": { - "id": "DatafeedstatusesCustomBatchRequest", + "AccountImageImprovementsSettings": { + "description": "Settings for the Automatic Image Improvements.", + "id": "AccountImageImprovementsSettings", "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "DatafeedstatusesCustomBatchRequestEntry" - }, - "type": "array" + "allowAutomaticImageImprovements": { + "description": "Enables automatic image improvements.", + "type": "boolean" } }, "type": "object" }, - "DatafeedstatusesCustomBatchRequestEntry": { - "description": "A batch entry encoding a single non-batch datafeedstatuses request.", - "id": "DatafeedstatusesCustomBatchRequestEntry", + "AccountIssue": { + "description": "An issue affecting specific merchant.", + "id": "AccountIssue", "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "country": { - "description": "Deprecated. Use `feedLabel` instead. The country to get the datafeed status for. If this parameter is provided, then `language` must also be provided. Note that for multi-target datafeeds this parameter is required.", - "type": "string" - }, - "datafeedId": { - "description": "The ID of the data feed to get.", - "format": "uint64", - "type": "string" - }, - "feedLabel": { - "description": "The feed label to get the datafeed status for. If this parameter is provided, then `language` must also be provided. Note that for multi-target datafeeds this parameter is required.", - "type": "string" + "actions": { + "description": "A list of actionable steps that can be executed to solve the issue. An example is requesting a re-review or providing arguments when merchant disagrees with the issue. Actions that are supported in (your) third-party application can be rendered as buttons and should be available to merchant when they expand the issue.", + "items": { + "$ref": "Action" + }, + "type": "array" }, - "language": { - "description": "The language to get the datafeed status for. If this parameter is provided then `country` must also be provided. Note that for multi-target datafeeds this parameter is required.", - "type": "string" + "impact": { + "$ref": "AccountIssueImpact", + "description": "Clarifies the severity of the issue. The summarizing message, if present, should be shown right under the title for each issue. It helps merchants to quickly understand the impact of the issue. The detailed breakdown helps the merchant to fully understand the impact of the issue. It can be rendered as dialog that opens when the merchant mouse over the summarized impact statement. Issues with different severity can be styled differently. They may use a different color or icon to signal the difference between `ERROR`, `WARNING` and `INFO`." }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "prerenderedContent": { + "description": "Details of the issue as a pre-rendered HTML. HTML elements contain CSS classes that can be used to customize the style of the content. Always sanitize the HTML before embedding it directly to your application. The sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * `issue-detail` - top level container for the detail of the issue * `callout-banners` - section of the `issue-detail` with callout banners * `callout-banner` - single callout banner, inside `callout-banners` * `callout-banner-info` - callout with important information (default) * `callout-banner-warning` - callout with a warning * `callout-banner-error` - callout informing about an error (most severe) * `issue-content` - section of the `issue-detail`, contains multiple `content-element` * `content-element` - content element such as a list, link or paragraph, inside `issue-content` * `root-causes` - unordered list with items describing root causes of the issue, inside `issue-content` * `root-causes-intro` - intro text before the `root-causes` list, inside `issue-content` * `segment` - section of the text, `span` inside paragraph * `segment-attribute` - section of the text that represents a product attribute, for example 'image\\_link' * `segment-literal` - section of the text that contains a special value, for example '0-1000 kg' * `segment-bold` - section of the text that should be rendered as bold * `segment-italic` - section of the text that should be rendered as italic * `tooltip` - used on paragraphs that should be rendered with a tooltip. A section of the text in such a paragraph will have a class `tooltip-text` and is intended to be shown in a mouse over dialog. If the style is not used, the `tooltip-text` section would be shown on a new line, after the main part of the text. * `tooltip-text` - marks a section of the text within a `tooltip`, that is intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a section of the text within a `tooltip`, that can be replaced with a tooltip icon, for example '?' or 'i'. By default, this section contains a `br` tag, that is separating the main text and the tooltip text when the style is not used. * `tooltip-style-question` - the tooltip shows helpful information, can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds additional information fitting to the context, can use the 'i' as an icon. * `content-moderation` - marks the paragraph that explains how the issue was identified. * `new-element` - Present for new elements added to the pre-rendered content in the future. To make sure that a new content element does not break your style, you can hide everything with this class.", "type": "string" }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`get`\" ", + "title": { + "description": "Title of the issue.", "type": "string" } }, "type": "object" }, - "DatafeedstatusesCustomBatchResponse": { - "id": "DatafeedstatusesCustomBatchResponse", + "AccountIssueImpact": { + "description": "Overall impact of the issue.", + "id": "AccountIssueImpact", "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", + "breakdowns": { + "description": "Detailed impact breakdown. Explains the types of restriction the issue has in different shopping destinations and territory. If present, it should be rendered to the merchant. Can be shown as a mouse over dropdown or a dialog. Each breakdown item represents a group of regions with the same impact details.", "items": { - "$ref": "DatafeedstatusesCustomBatchResponseEntry" + "$ref": "Breakdown" }, "type": "array" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedstatusesCustomBatchResponse`\".", + "message": { + "description": "Optional. Message summarizing the overall impact of the issue. If present, it should be rendered to the merchant. For example: \"Disapproves 90k offers in 25 countries\"", + "type": "string" + }, + "severity": { + "description": "The severity of the issue.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Causes either an account suspension or an item disapproval. Errors should be resolved as soon as possible to ensure items are eligible to appear in results again.", + "Warnings can negatively impact the performance of ads and can lead to item or account suspensions in the future unless the issue is resolved.", + "Infos are suggested optimizations to increase data quality. Resolving these issues is recommended, but not required." + ], "type": "string" } }, "type": "object" }, - "DatafeedstatusesCustomBatchResponseEntry": { - "description": "A batch entry encoding a single non-batch datafeedstatuses response.", - "id": "DatafeedstatusesCustomBatchResponseEntry", + "AccountItemUpdates": { + "description": "Turning on [item updates](https://support.google.com/merchants/answer/3246284) allows Google to automatically update items for you. When item updates are on, Google uses the structured data markup on the website and advanced data extractors to update the price and availability of the items. When the item updates are off, items with mismatched data aren't shown.", + "id": "AccountItemUpdates", "properties": { - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" + "accountItemUpdatesSettings": { + "$ref": "AccountItemUpdatesSettings", + "description": "Determines which attributes of the items should be automatically updated. If this field is not present, then the settings will be deleted. If there are no settings for subaccount, they are inherited from aggregator." }, - "datafeedStatus": { - "$ref": "DatafeedStatus", - "description": "The requested data feed status. Defined if and only if the request was successful." + "effectiveAllowAvailabilityUpdates": { + "description": "Output only. The effective value of allow_availability_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." - } - }, - "type": "object" - }, - "DatafeedstatusesListResponse": { - "id": "DatafeedstatusesListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedstatusesListResponse`\".", - "type": "string" + "effectiveAllowConditionUpdates": { + "description": "Output only. The effective value of allow_condition_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of datafeed statuses.", - "type": "string" + "effectiveAllowPriceUpdates": { + "description": "Output only. The effective value of allow_price_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" }, - "resources": { - "items": { - "$ref": "DatafeedStatus" - }, - "type": "array" + "effectiveAllowStrictAvailabilityUpdates": { + "description": "Output only. The effective value of allow_strict_availability_updates. If account_item_updates_settings is present, then this value is the same. Otherwise, it represents the inherited value of the parent account. Read-only.", + "readOnly": true, + "type": "boolean" } }, "type": "object" }, - "Date": { - "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", - "id": "Date", + "AccountItemUpdatesSettings": { + "description": "Settings for the Automatic Item Updates.", + "id": "AccountItemUpdatesSettings", "properties": { - "day": { - "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", - "format": "int32", - "type": "integer" + "allowAvailabilityUpdates": { + "description": "If availability updates are enabled, any previous availability values get overwritten if Google finds an out-of-stock annotation on the offer's page. If additionally `allow_availability_updates` field is set to true, values get overwritten if Google finds an in-stock annotation on the offer’s page.", + "type": "boolean" }, - "month": { - "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", - "format": "int32", - "type": "integer" + "allowConditionUpdates": { + "description": "If condition updates are enabled, Google always updates item condition with the condition detected from the details of your product.", + "type": "boolean" }, - "year": { - "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", - "format": "int32", - "type": "integer" + "allowPriceUpdates": { + "description": "If price updates are enabled, Google always updates the active price with the crawled information.", + "type": "boolean" + }, + "allowStrictAvailabilityUpdates": { + "description": "If allow_availability_updates is enabled, items are automatically updated in all your Shopping target countries. By default, availability updates will only be applied to items that are 'out of stock' on your website but 'in stock' on Shopping. Set this to true to also update items that are 'in stock' on your website, but 'out of stock' on Google Shopping. In order for this field to have an effect, you must also allow availability updates.", + "type": "boolean" } }, "type": "object" }, - "DateTime": { - "description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", - "id": "DateTime", + "AccountLabel": { + "description": "Label assigned by CSS domain or CSS group to one of its sub-accounts.", + "id": "AccountLabel", "properties": { - "day": { - "description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", - "format": "int32", - "type": "integer" - }, - "hours": { - "description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", - "format": "int32", - "type": "integer" - }, - "minutes": { - "description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", - "format": "int32", - "type": "integer" - }, - "month": { - "description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", - "format": "int32", - "type": "integer" - }, - "nanos": { - "description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", - "format": "int32", - "type": "integer" - }, - "seconds": { - "description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", - "format": "int32", - "type": "integer" + "accountId": { + "description": "Immutable. The ID of account this label belongs to.", + "format": "int64", + "type": "string" }, - "timeZone": { - "$ref": "TimeZone", - "description": "Time zone." + "description": { + "description": "The description of this label.", + "type": "string" }, - "utcOffset": { - "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", - "format": "google-duration", + "labelId": { + "description": "Output only. The ID of the label.", + "format": "int64", + "readOnly": true, "type": "string" }, - "year": { - "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", - "format": "int32", - "type": "integer" + "labelType": { + "description": "Output only. The type of this label.", + "enum": [ + "LABEL_TYPE_UNSPECIFIED", + "MANUAL", + "AUTOMATIC" + ], + "enumDescriptions": [ + "Unknown label type.", + "Indicates that the label was created manually.", + "Indicates that the label was created automatically by CSS Center." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "The display name of this label.", + "type": "string" } }, "type": "object" }, - "DeliveryArea": { - "description": "A delivery area for the product. Only one of `countryCode` or `postalCodeRange` must be set.", - "id": "DeliveryArea", + "AccountReturnCarrier": { + "description": " The return carrier information. This service is designed for merchants enrolled in the Buy on Google program. ", + "id": "AccountReturnCarrier", "properties": { - "countryCode": { - "description": "Required. The country that the product can be delivered to. Submit a [unicode CLDR region](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) such as `US` or `CH`.", + "carrierAccountId": { + "description": "Output only. Immutable. The Google-provided unique carrier ID, used to update the resource.", + "format": "int64", + "readOnly": true, "type": "string" }, - "postalCodeRange": { - "$ref": "DeliveryAreaPostalCodeRange", - "description": "A postal code, postal code range or postal code prefix that defines this area. Limited to US and AUS." + "carrierAccountName": { + "description": "Name of the carrier account.", + "type": "string" }, - "regionCode": { - "description": "A state, territory, or prefecture. This is supported for the United States, Australia, and Japan. Provide a subdivision code from the ISO 3166-2 code tables ([US](https://en.wikipedia.org/wiki/ISO_3166-2:US), [AU](https://en.wikipedia.org/wiki/ISO_3166-2:AU), or [JP](https://en.wikipedia.org/wiki/ISO_3166-2:JP)) without country prefix (for example, `\"NY\"`, `\"NSW\"`, `\"03\"`).", + "carrierAccountNumber": { + "description": "Number of the carrier account.", + "type": "string" + }, + "carrierCode": { + "description": "The carrier code enum. Accepts the values FEDEX or UPS.", + "enum": [ + "CARRIER_CODE_UNSPECIFIED", + "FEDEX", + "UPS" + ], + "enumDescriptions": [ + "Carrier not specified", + "FedEx carrier", + "UPS carrier" + ], "type": "string" } }, "type": "object" }, - "DeliveryAreaPostalCodeRange": { - "description": "A range of postal codes that defines the delivery area. Only set `firstPostalCode` when specifying a single postal code.", - "id": "DeliveryAreaPostalCodeRange", + "AccountShippingImprovements": { + "description": "Not available for MCAs [accounts](https://support.google.com/merchants/answer/188487). By turning on [automatic shipping improvements](https://support.google.com/merchants/answer/10027038), you are allowing Google to improve the accuracy of your delivery times shown to shoppers using Google. More accurate delivery times, especially when faster, typically lead to better conversion rates. Google will improve your estimated delivery times based on various factors: * Delivery address of an order * Current handling time and shipping time settings * Estimated weekdays or business days * Parcel tracking data", + "id": "AccountShippingImprovements", "properties": { - "firstPostalCode": { - "description": "Required. A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: `\"94108\"`, `\"9410*\"`, `\"9*\"`.", - "type": "string" - }, - "lastPostalCode": { - "description": "A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area (for example [070* - 078*] results in the range [07000 - 07899]). It must have the same length as `firstPostalCode`: if `firstPostalCode` is a postal code then `lastPostalCode` must be a postal code too; if firstPostalCode is a pattern then `lastPostalCode` must be a pattern with the same prefix length. Ignored if not set, then the area is defined as being all the postal codes matching `firstPostalCode`.", - "type": "string" + "allowShippingImprovements": { + "description": "Enables automatic shipping improvements.", + "type": "boolean" } }, "type": "object" }, - "DeliveryTime": { - "id": "DeliveryTime", + "AccountStatus": { + "description": "The status of an account, that is, information about its products, which is computed offline and not returned immediately at insertion time.", + "id": "AccountStatus", "properties": { - "cutoffTime": { - "$ref": "CutoffTime", - "description": "Business days cutoff time definition. If not configured, the cutoff time will be defaulted to 8AM PST. If local delivery, use Service.StoreConfig.CutoffConfig." - }, - "handlingBusinessDayConfig": { - "$ref": "BusinessDayConfig", - "description": "The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed." + "accountId": { + "description": "The ID of the account for which the status is reported.", + "type": "string" }, - "holidayCutoffs": { - "description": "Holiday cutoff definitions. If configured, they specify order cutoff times for holiday-specific shipping.", + "accountLevelIssues": { + "description": "A list of account level issues.", "items": { - "$ref": "HolidayCutoff" + "$ref": "AccountStatusAccountLevelIssue" }, "type": "array" }, - "maxHandlingTimeInDays": { - "description": "Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `minHandlingTimeInDays`.", - "format": "uint32", - "type": "integer" - }, - "maxTransitTimeInDays": { - "description": "Maximum number of business days that are spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to `minTransitTimeInDays`.", - "format": "uint32", - "type": "integer" - }, - "minHandlingTimeInDays": { - "description": "Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped.", - "format": "uint32", - "type": "integer" - }, - "minTransitTimeInDays": { - "description": "Minimum number of business days that are spent in transit. 0 means same day delivery, 1 means next day delivery. Either `{min,max}TransitTimeInDays` or `transitTimeTable` must be set, but not both.", - "format": "uint32", - "type": "integer" - }, - "transitBusinessDayConfig": { - "$ref": "BusinessDayConfig", - "description": "The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed." + "accountManagement": { + "description": "How the account is managed. Acceptable values are: - \"`manual`\" - \"`automatic`\" ", + "type": "string" }, - "transitTimeTable": { - "$ref": "TransitTable", - "description": "Transit time table, number of business days spent in transit based on row and column dimensions. Either `{min,max}TransitTimeInDays` or `transitTimeTable` can be set, but not both." + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountStatus`\"", + "type": "string" }, - "warehouseBasedDeliveryTimes": { - "description": "Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in DeliveryTime should be set.", + "products": { + "description": "List of product-related data by channel, destination, and country. Data in this field may be delayed by up to 30 minutes.", "items": { - "$ref": "WarehouseBasedDeliveryTime" + "$ref": "AccountStatusProducts" }, "type": "array" + }, + "websiteClaimed": { + "description": "Whether the account's website is claimed or not.", + "type": "boolean" } }, "type": "object" }, - "Distance": { - "description": "Distance represented by an integer and unit.", - "id": "Distance", + "AccountStatusAccountLevelIssue": { + "id": "AccountStatusAccountLevelIssue", "properties": { - "unit": { - "description": "The distance unit. Acceptable values are `None`, `Miles`, and `Kilometers`.", + "country": { + "description": "Country for which this issue is reported.", "type": "string" }, - "value": { - "description": "The distance represented as a number.", - "format": "int64", + "destination": { + "description": "The destination the issue applies to. If this field is empty then the issue applies to all available destinations.", "type": "string" - } - }, - "type": "object" - }, - "ECommercePlatformLinkInfo": { - "description": "Additional information required for E_COMMERCE_PLATFORM link type.", - "id": "ECommercePlatformLinkInfo", - "properties": { - "externalAccountId": { - "description": "The id used by the third party service provider to identify the merchant.", + }, + "detail": { + "description": "Additional details about the issue.", + "type": "string" + }, + "documentation": { + "description": "The URL of a web page to help resolving this issue.", + "type": "string" + }, + "id": { + "description": "Issue identifier.", + "type": "string" + }, + "severity": { + "description": "Severity of the issue. Acceptable values are: - \"`critical`\" - \"`error`\" - \"`suggestion`\" ", + "type": "string" + }, + "title": { + "description": "Short description of the issue.", "type": "string" } }, "type": "object" }, - "Error": { - "description": "An error returned by the API.", - "id": "Error", + "AccountStatusItemLevelIssue": { + "id": "AccountStatusItemLevelIssue", "properties": { - "domain": { - "description": "The domain of the error.", + "attributeName": { + "description": "The attribute's name, if the issue is caused by a single attribute.", "type": "string" }, - "message": { - "description": "A description of the error.", + "code": { + "description": "The error code of the issue.", "type": "string" }, - "reason": { - "description": "The error code.", + "description": { + "description": "A short issue description in English.", + "type": "string" + }, + "detail": { + "description": "A detailed issue description in English.", + "type": "string" + }, + "documentation": { + "description": "The URL of a web page to help with resolving this issue.", + "type": "string" + }, + "numItems": { + "description": "Number of items with this issue.", + "format": "int64", + "type": "string" + }, + "resolution": { + "description": "Whether the issue can be resolved by the merchant.", + "type": "string" + }, + "servability": { + "description": "How this issue affects serving of the offer.", "type": "string" } }, "type": "object" }, - "Errors": { - "description": "A list of errors returned by a failed batch entry.", - "id": "Errors", + "AccountStatusProducts": { + "id": "AccountStatusProducts", "properties": { - "code": { - "description": "The HTTP status of the first error in `errors`.", - "format": "uint32", - "type": "integer" + "channel": { + "description": "The channel the data applies to. Acceptable values are: - \"`local`\" - \"`online`\" ", + "type": "string" }, - "errors": { - "description": "A list of errors.", + "country": { + "description": "The country the data applies to.", + "type": "string" + }, + "destination": { + "description": "The destination the data applies to.", + "type": "string" + }, + "itemLevelIssues": { + "description": "List of item-level issues.", "items": { - "$ref": "Error" + "$ref": "AccountStatusItemLevelIssue" }, "type": "array" }, - "message": { - "description": "The message of the first error in `errors`.", - "type": "string" + "statistics": { + "$ref": "AccountStatusStatistics", + "description": "Aggregated product statistics." } }, "type": "object" }, - "ExternalAction": { - "description": "Action that is implemented and performed outside of the third-party application. It should redirect the merchant to the provided URL of an external system where they can perform the action. For example to request a review in the Merchant Center.", - "id": "ExternalAction", + "AccountStatusStatistics": { + "id": "AccountStatusStatistics", "properties": { - "type": { - "description": "The type of external action.", - "enum": [ - "EXTERNAL_ACTION_TYPE_UNSPECIFIED", - "REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER", - "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER", - "LEGAL_APPEAL_IN_HELP_CENTER", - "VERIFY_IDENTITY_IN_MERCHANT_CENTER" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "Redirect to Merchant Center where the merchant can request a review for issue related to their product.", - "Redirect to Merchant Center where the merchant can request a review for issue related to their account.", - "Redirect to the form in Help Center where the merchant can request a legal appeal for the issue.", - "Redirect to Merchant Center where the merchant can perform identity verification." - ], + "active": { + "description": "Number of active offers.", + "format": "int64", "type": "string" }, - "uri": { - "description": "URL to external system, for example Merchant Center, where the merchant can perform the action.", + "disapproved": { + "description": "Number of disapproved offers.", + "format": "int64", + "type": "string" + }, + "expiring": { + "description": "Number of expiring offers.", + "format": "int64", + "type": "string" + }, + "pending": { + "description": "Number of pending offers.", + "format": "int64", "type": "string" } }, "type": "object" }, - "FreeListingsProgramStatus": { - "description": "Response message for GetFreeListingsProgramStatus.", - "id": "FreeListingsProgramStatus", + "AccountTax": { + "description": "The tax settings of a merchant account. All methods require the admin role.", + "id": "AccountTax", "properties": { - "globalState": { - "description": "State of the program. `ENABLED` if there are offers for at least one region.", - "enum": [ - "PROGRAM_STATE_UNSPECIFIED", - "NOT_ENABLED", - "NO_OFFERS_UPLOADED", - "ENABLED" - ], - "enumDescriptions": [ - "State is unknown.", - "Program is not enabled for any country.", - "No products have been uploaded for any region. Upload products to Merchant Center.", - "Program is enabled and offers are uploaded for at least one country." - ], + "accountId": { + "description": "Required. The ID of the account to which these account tax settings belong.", + "format": "uint64", "type": "string" }, - "regionStatuses": { - "description": "Status of the program in each region. Regions with the same status and review eligibility are grouped together in `regionCodes`.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountTax`\".", + "type": "string" + }, + "rules": { + "description": "Tax rules. Updating the tax rules will enable \"US\" taxes (not reversible). Defining no rules is equivalent to not charging tax at all.", "items": { - "$ref": "FreeListingsProgramStatusRegionStatus" + "$ref": "AccountTaxTaxRule" }, "type": "array" } }, "type": "object" }, - "FreeListingsProgramStatusRegionStatus": { - "description": "Status of program and region.", - "id": "FreeListingsProgramStatusRegionStatus", + "AccountTaxTaxRule": { + "description": "Tax calculation rule to apply in a state or province (US only).", + "id": "AccountTaxTaxRule", "properties": { - "disapprovalDate": { - "description": "Date by which eligibilityStatus will go from `WARNING` to `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`.", - "type": "string" - }, - "eligibilityStatus": { - "description": "Eligibility status of the standard free listing program.", - "enum": [ - "STATE_UNSPECIFIED", - "APPROVED", - "DISAPPROVED", - "WARNING", - "UNDER_REVIEW", - "PENDING_REVIEW", - "ONBOARDING" - ], - "enumDescriptions": [ - "State is not known.", - "If the account has no issues and review is completed successfully.", - "There are one or more issues that needs to be resolved for account to be active for the program. Detailed list of account issues are available in [accountstatuses](https://developers.google.com/shopping-content/reference/rest/v2.1/accountstatuses) API.", - "If account has issues but offers are servable. Some of the issue can make account DISAPPROVED after a certain deadline.", - "Account is under review.", - "Account is waiting for review to start.", - "Program is currently onboarding. Upload valid offers to complete onboarding." - ], - "type": "string" - }, - "onboardingIssues": { - "description": "Issues that must be fixed to be eligible for review.", - "items": { - "type": "string" - }, - "type": "array" - }, - "regionCodes": { - "description": "The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions with the same `eligibilityStatus` and `reviewEligibility`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "reviewEligibilityStatus": { - "description": "If a program is eligible for review in a specific region. Only visible if `eligibilityStatus` is `DISAPPROVED`.", - "enum": [ - "REVIEW_ELIGIBILITY_UNSPECIFIED", - "ELIGIBLE", - "INELIGIBLE" - ], - "enumDescriptions": [ - "Review eligibility state is unknown.", - "Account is eligible for review for a specified region code.", - "Account is not eligible for review for a specified region code." - ], + "country": { + "description": "Country code in which tax is applicable.", "type": "string" }, - "reviewIneligibilityReason": { - "description": "Review ineligibility reason if account is not eligible for review.", - "enum": [ - "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED", - "ONBOARDING_ISSUES", - "NOT_ENOUGH_OFFERS", - "IN_COOLDOWN_PERIOD", - "ALREADY_UNDER_REVIEW", - "NO_REVIEW_REQUIRED", - "WILL_BE_REVIEWED_AUTOMATICALLY", - "IS_RETIRED", - "ALREADY_REVIEWED" - ], - "enumDescriptions": [ - "Requesting a review from Google is not possible.", - "All onboarding issues needs to be fixed.", - "Not enough offers uploaded for this country.", - "Cooldown period applies. Wait until cooldown period ends.", - "Account is already under review.", - "No issues available to review.", - "Account will be automatically reviewed at the end of the grace period.", - "Account is retired. Should not appear in MC.", - "Account was already reviewd." - ], + "locationId": { + "description": "Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).", + "format": "uint64", "type": "string" }, - "reviewIneligibilityReasonDescription": { - "description": "Reason a program in a specific region isn’t eligible for review. Only visible if `reviewEligibilityStatus` is `INELIGIBLE`.", + "ratePercent": { + "description": "Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.", "type": "string" }, - "reviewIneligibilityReasonDetails": { - "$ref": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", - "description": "Additional information for ineligibility. If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period is provided." + "shippingTaxed": { + "description": "If true, shipping charges are also taxed.", + "type": "boolean" }, - "reviewIssues": { - "description": "Issues evaluated in the review process. Fix all issues before requesting a review.", - "items": { - "type": "string" - }, - "type": "array" + "useGlobalRate": { + "description": "Whether the tax rate is taken from a global tax table or specified explicitly.", + "type": "boolean" } }, "type": "object" }, - "FreeListingsProgramStatusReviewIneligibilityReasonDetails": { - "description": "Additional details for review ineligibility reasons.", - "id": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", + "AccountUser": { + "id": "AccountUser", "properties": { - "cooldownTime": { - "description": "This timestamp represents end of cooldown period for review ineligbility reason `IN_COOLDOWN_PERIOD`.", - "format": "google-datetime", + "admin": { + "description": "Whether user is an admin.", + "type": "boolean" + }, + "emailAddress": { + "description": "User's email address.", "type": "string" + }, + "orderManager": { + "description": "Whether user is an order manager.", + "type": "boolean" + }, + "paymentsAnalyst": { + "description": "Whether user can access payment statements.", + "type": "boolean" + }, + "paymentsManager": { + "description": "Whether user can manage payment settings.", + "type": "boolean" + }, + "reportingManager": { + "description": "Whether user is a reporting manager. This role is equivalent to the Performance and insights role in Merchant Center.", + "type": "boolean" } }, "type": "object" }, - "FreeShippingThreshold": { - "description": "Conditions to be met for a product to have free shipping.", - "id": "FreeShippingThreshold", + "AccountYouTubeChannelLink": { + "id": "AccountYouTubeChannelLink", "properties": { - "country": { - "description": "Required. The [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the country to which an item will ship.", + "channelId": { + "description": "Channel ID.", "type": "string" }, - "priceThreshold": { - "$ref": "Price", - "description": "Required. The minimum product price for the shipping cost to become free. Represented as a number." + "status": { + "description": "Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be either `active` if it was approved in YT Creator Studio or `pending` if it's pending approval. Upon insertion, it represents the *intended* status of the link. Re-uploading a link with status `active` when it's still pending or with status `pending` when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status `inactive` is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.", + "type": "string" } }, "type": "object" }, - "GenerateRecommendationsResponse": { - "description": "Response containing generated recommendations.", - "id": "GenerateRecommendationsResponse", + "AccountsAuthInfoResponse": { + "id": "AccountsAuthInfoResponse", "properties": { - "recommendations": { - "description": "Recommendations generated for a request.", + "accountIdentifiers": { + "description": "The account identifiers corresponding to the authenticated user. - For an individual account: only the merchant ID is defined - For an aggregator: only the aggregator ID is defined - For a subaccount of an MCA: both the merchant ID and the aggregator ID are defined. ", "items": { - "$ref": "Recommendation" + "$ref": "AccountIdentifier" }, "type": "array" }, - "responseToken": { - "description": "Output only. Response token is a string created for each `GenerateRecommendationsResponse`. This token doesn't expire, and is globally unique. This token must be used when reporting interactions for recommendations.", - "readOnly": true, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsAuthInfoResponse`\".", + "type": "string" + } + }, + "type": "object" + }, + "AccountsClaimWebsiteResponse": { + "id": "AccountsClaimWebsiteResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsClaimWebsiteResponse`\".", "type": "string" } }, "type": "object" }, - "GmbAccounts": { - "id": "GmbAccounts", + "AccountsCustomBatchRequest": { + "id": "AccountsCustomBatchRequest", "properties": { - "accountId": { - "description": "The ID of the Merchant Center account.", - "format": "uint64", - "type": "string" - }, - "gmbAccounts": { - "description": "A list of Business Profiles which are available to the merchant.", + "entries": { + "description": "The request entries to be processed in the batch.", "items": { - "$ref": "GmbAccountsGmbAccount" + "$ref": "AccountsCustomBatchRequestEntry" }, "type": "array" } }, "type": "object" }, - "GmbAccountsGmbAccount": { - "id": "GmbAccountsGmbAccount", + "AccountsCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch accounts request.", + "id": "AccountsCustomBatchRequestEntry", "properties": { - "email": { - "description": "The email which identifies the Business Profile.", + "account": { + "$ref": "Account", + "description": "The account to create or update. Only defined if the method is `insert` or `update`." + }, + "accountId": { + "description": "The ID of the targeted account. Only defined if the method is not `insert`.", + "format": "uint64", "type": "string" }, - "listingCount": { - "description": "Number of listings under this account.", + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" + }, + "force": { + "description": "Whether the account should be deleted if the account has offers. Only applicable if the method is `delete`.", + "type": "boolean" + }, + "labelIds": { + "description": "Label IDs for the 'updatelabels' request.", + "items": { + "format": "uint64", + "type": "string" + }, + "type": "array" + }, + "linkRequest": { + "$ref": "AccountsCustomBatchRequestEntryLinkRequest", + "description": "Details about the `link` request." + }, + "merchantId": { + "description": "The ID of the managing account.", "format": "uint64", "type": "string" }, - "name": { - "description": "The name of the Business Profile.", + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`claimWebsite`\" - \"`delete`\" - \"`get`\" - \"`insert`\" - \"`link`\" - \"`update`\" ", "type": "string" }, - "type": { - "description": "The type of the Business Profile (User or Business).", + "overwrite": { + "description": "Only applicable if the method is `claimwebsite`. Indicates whether or not to take the claim from another account in case there is a conflict.", + "type": "boolean" + }, + "view": { + "description": "Controls which fields are visible. Only applicable if the method is 'get'.", "type": "string" } }, "type": "object" }, - "GoogleAnalyticsLink": { - "description": "\"Google Analytics Link\" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account.", - "id": "GoogleAnalyticsLink", + "AccountsCustomBatchRequestEntryLinkRequest": { + "id": "AccountsCustomBatchRequestEntryLinkRequest", "properties": { - "attributionSettings": { - "$ref": "AttributionSettings", - "description": "Output only. Attribution settings for the linked Google Analytics property.", - "readOnly": true + "action": { + "description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ", + "type": "string" }, - "propertyId": { - "description": "Required. Immutable. ID of the Google Analytics property the merchant is linked to.", - "format": "int64", + "linkType": { + "description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" - \"`localProductManager`\" ", "type": "string" }, - "propertyName": { - "description": "Output only. Name of the Google Analytics property the merchant is linked to.", - "readOnly": true, + "linkedAccountId": { + "description": "The ID of the linked account.", "type": "string" + }, + "services": { + "description": "Provided services. Acceptable values are: - \"`shoppingAdsProductManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingActionsOrderManagement`\" - \"`paymentProcessing`\" - \"`localProductManagement`\" ", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "Headers": { - "description": "A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `numItems`, `postalCodeGroupNames`, or `location` must be set.", - "id": "Headers", + "AccountsCustomBatchResponse": { + "id": "AccountsCustomBatchResponse", "properties": { - "locations": { - "description": "A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.", + "entries": { + "description": "The result of the execution of the batch requests.", "items": { - "$ref": "LocationIdSet" + "$ref": "AccountsCustomBatchResponseEntry" }, "type": "array" }, - "numberOfItems": { - "description": "A list of inclusive number of items upper bounds. The last value can be `\"infinity\"`. For example `[\"10\", \"50\", \"infinity\"]` represents the headers \"\u003c= 10 items\", \"\u003c= 50 items\", and \"\u003e 50 items\". Must be non-empty. Can only be set if all other fields are not set.", - "items": { - "type": "string" - }, - "type": "array" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponse`\".", + "type": "string" + } + }, + "type": "object" + }, + "AccountsCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch accounts response.", + "id": "AccountsCustomBatchResponseEntry", + "properties": { + "account": { + "$ref": "Account", + "description": "The retrieved, created, or updated account. Not defined if the method was `delete`, `claimwebsite` or `link`." }, - "postalCodeGroupNames": { - "description": "A list of postal group names. The last value can be `\"all other locations\"`. Example: `[\"zone 1\", \"zone 2\", \"all other locations\"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.", - "items": { - "type": "string" - }, - "type": "array" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "prices": { - "description": "A list of inclusive order price upper bounds. The last price's value can be `\"infinity\"`. For example `[{\"value\": \"10\", \"currency\": \"USD\"}, {\"value\": \"500\", \"currency\": \"USD\"}, {\"value\": \"infinity\", \"currency\": \"USD\"}]` represents the headers \"\u003c= $10\", \"\u003c= $500\", and \"\u003e $500\". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.", - "items": { - "$ref": "Price" - }, - "type": "array" + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, - "weights": { - "description": "A list of inclusive order weight upper bounds. The last weight's value can be `\"infinity\"`. For example `[{\"value\": \"10\", \"unit\": \"kg\"}, {\"value\": \"50\", \"unit\": \"kg\"}, {\"value\": \"infinity\", \"unit\": \"kg\"}]` represents the headers \"\u003c= 10kg\", \"\u003c= 50kg\", and \"\u003e 50kg\". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.", - "items": { - "$ref": "Weight" - }, - "type": "array" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsCustomBatchResponseEntry`\"", + "type": "string" } }, "type": "object" }, - "HolidayCutoff": { - "id": "HolidayCutoff", + "AccountsLinkRequest": { + "id": "AccountsLinkRequest", "properties": { - "deadlineDate": { - "description": "Date of the order deadline, in ISO 8601 format. For example, \"2016-11-29\" for 29th November 2016. Required.", + "action": { + "description": "Action to perform for this link. The `\"request\"` action is only available to select merchants. Acceptable values are: - \"`approve`\" - \"`remove`\" - \"`request`\" ", "type": "string" }, - "deadlineHour": { - "description": "Hour of the day on the deadline date until which the order has to be placed to qualify for the delivery guarantee. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Required.", - "format": "uint32", - "type": "integer" + "eCommercePlatformLinkInfo": { + "$ref": "ECommercePlatformLinkInfo", + "description": "Additional information required for `eCommercePlatform` link type." }, - "deadlineTimezone": { - "description": "Timezone identifier for the deadline hour (for example, \"Europe/Zurich\"). List of identifiers. Required.", + "linkType": { + "description": "Type of the link between the two accounts. Acceptable values are: - \"`channelPartner`\" - \"`eCommercePlatform`\" - \"`paymentServiceProvider`\" ", "type": "string" }, - "holidayId": { - "description": "Unique identifier for the holiday. Required.", + "linkedAccountId": { + "description": "The ID of the linked account.", "type": "string" }, - "visibleFromDate": { - "description": "Date on which the deadline will become visible to consumers in ISO 8601 format. For example, \"2016-10-31\" for 31st October 2016. Required.", + "paymentServiceProviderLinkInfo": { + "$ref": "PaymentServiceProviderLinkInfo", + "description": "Additional information required for `paymentServiceProvider` link type." + }, + "services": { + "description": " Acceptable values are: - \"`shoppingAdsProductManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingActionsOrderManagement`\" - \"`paymentProcessing`\" ", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AccountsLinkResponse": { + "id": "AccountsLinkResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsLinkResponse`\".", "type": "string" } }, "type": "object" }, - "HolidaysHoliday": { - "id": "HolidaysHoliday", + "AccountsListLinksResponse": { + "id": "AccountsListLinksResponse", "properties": { - "countryCode": { - "description": "The CLDR territory code of the country in which the holiday is available. For example, \"US\", \"DE\", \"GB\". A holiday cutoff can only be configured in a shipping settings service with matching delivery country. Always present.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsListLinksResponse`\".", "type": "string" }, - "date": { - "description": "Date of the holiday, in ISO 8601 format. For example, \"2016-12-25\" for Christmas 2016. Always present.", - "type": "string" + "links": { + "description": "The list of available links.", + "items": { + "$ref": "LinkedAccount" + }, + "type": "array" }, - "deliveryGuaranteeDate": { - "description": "Date on which the order has to arrive at the customer's, in ISO 8601 format. For example, \"2016-12-24\" for 24th December 2016. Always present.", + "nextPageToken": { + "description": "The token for the retrieval of the next page of links.", "type": "string" - }, - "deliveryGuaranteeHour": { - "description": "Hour of the day in the delivery location's timezone on the guaranteed delivery date by which the order has to arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Always present.", - "format": "uint64", + } + }, + "type": "object" + }, + "AccountsListResponse": { + "id": "AccountsListResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsListResponse`\".", "type": "string" }, - "id": { - "description": "Unique identifier for the holiday to be used when configuring holiday cutoffs. Always present.", + "nextPageToken": { + "description": "The token for the retrieval of the next page of accounts.", "type": "string" }, - "type": { - "description": "The holiday type. Always present. Acceptable values are: - \"`Christmas`\" - \"`Easter`\" - \"`Father's Day`\" - \"`Halloween`\" - \"`Independence Day (USA)`\" - \"`Mother's Day`\" - \"`Thanksgiving`\" - \"`Valentine's Day`\" ", - "type": "string" + "resources": { + "items": { + "$ref": "Account" + }, + "type": "array" + } + }, + "type": "object" + }, + "AccountsUpdateLabelsRequest": { + "id": "AccountsUpdateLabelsRequest", + "properties": { + "labelIds": { + "description": "The IDs of labels that should be assigned to the account.", + "items": { + "format": "uint64", + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "InputField": { - "description": "Input field that needs to be available to the merchant. If the field is marked as required, then a value needs to be provided for a successful processing of the request.", - "id": "InputField", + "AccountsUpdateLabelsResponse": { + "id": "AccountsUpdateLabelsResponse", "properties": { - "checkboxInput": { - "$ref": "InputFieldCheckboxInput", - "description": "Input field to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox)." - }, - "choiceInput": { - "$ref": "InputFieldChoiceInput", - "description": "Input field to select one of the offered choices. Corresponds to the [html input type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio)." - }, - "id": { - "description": "Not for display but need to be sent back for the given input field.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountsUpdateLabelsResponse`\".", "type": "string" - }, - "label": { - "$ref": "TextWithTooltip", - "description": "Input field label. There may be more information to be shown in a tooltip." - }, - "required": { - "description": "Whether the field is required. The action button needs to stay disabled till values for all required fields are provided.", - "type": "boolean" - }, - "textInput": { - "$ref": "InputFieldTextInput", - "description": "Input field to provide text information. Corresponds to the [html input type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) or [html textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." } }, "type": "object" }, - "InputFieldCheckboxInput": { - "description": "Checkbox input allows merchants to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). If merchant checks the box, the input value for the field is `true`, otherwise it is `false`. This type of input is often used as a confirmation that the merchant completed required steps before they are allowed to start the action. In such a case, the input field is marked as required and the button to trigger the action should stay disabled until the merchant checks the box.", - "id": "InputFieldCheckboxInput", - "properties": {}, - "type": "object" - }, - "InputFieldChoiceInput": { - "description": "Choice input allows merchants to select one of the offered choices. Some choices may be linked to additional input fields that should be displayed under or next to the choice option. The value for the additional input field needs to be provided only when the specific choice is selected by the merchant. For example, additional input field can be hidden or disabled until the merchant selects the specific choice.", - "id": "InputFieldChoiceInput", + "AccountstatusesCustomBatchRequest": { + "id": "AccountstatusesCustomBatchRequest", "properties": { - "options": { - "description": "A list of choices. Only one option can be selected.", + "entries": { + "description": "The request entries to be processed in the batch.", "items": { - "$ref": "InputFieldChoiceInputChoiceInputOption" + "$ref": "AccountstatusesCustomBatchRequestEntry" }, "type": "array" } }, "type": "object" }, - "InputFieldChoiceInputChoiceInputOption": { - "description": "A choice that merchant can select.", - "id": "InputFieldChoiceInputChoiceInputOption", + "AccountstatusesCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch accountstatuses request.", + "id": "AccountstatusesCustomBatchRequestEntry", "properties": { - "additionalInput": { - "$ref": "InputField", - "description": "Input that should be displayed when this option is selected. The additional input will not contain a `ChoiceInput`." + "accountId": { + "description": "The ID of the (sub-)account whose status to get.", + "format": "uint64", + "type": "string" }, - "id": { - "description": "Not for display but need to be sent back for the selected choice option.", + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" + }, + "destinations": { + "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", + "items": { + "type": "string" + }, + "type": "array" + }, + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "label": { - "$ref": "TextWithTooltip", - "description": "Short description of the choice option. There may be more information to be shown as a tooltip." + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`get`\" ", + "type": "string" } }, "type": "object" }, - "InputFieldTextInput": { - "description": "Text input allows merchants to provide a text value.", - "id": "InputFieldTextInput", + "AccountstatusesCustomBatchResponse": { + "id": "AccountstatusesCustomBatchResponse", "properties": { - "additionalInfo": { - "$ref": "TextWithTooltip", - "description": "Additional info regarding the field to be displayed to merchant. For example, warning to not include personal identifiable information. There may be more information to be shown in a tooltip." - }, - "ariaLabel": { - "description": "Text to be used as the [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the input.", - "type": "string" - }, - "formatInfo": { - "description": "Information about the required format. If present, it should be shown close to the input field to help merchants to provide a correct value. For example: \"VAT numbers should be in a format similar to SK9999999999\"", - "type": "string" + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "AccountstatusesCustomBatchResponseEntry" + }, + "type": "array" }, - "type": { - "description": "Type of the text input", - "enum": [ - "TEXT_INPUT_TYPE_UNSPECIFIED", - "GENERIC_SHORT_TEXT", - "GENERIC_LONG_TEXT" - ], - "enumDescriptions": [ - "Default value. Will never be provided by the API.", - "Used when a short text is expected. The field can be rendered as a [text field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text).", - "Used when a longer text is expected. The field should be rendered as a [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." - ], + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountstatusesCustomBatchResponse`\".", "type": "string" } }, "type": "object" }, - "InputValue": { - "description": "Input provided by the merchant for input field.", - "id": "InputValue", + "AccountstatusesCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch accountstatuses response.", + "id": "AccountstatusesCustomBatchResponseEntry", "properties": { - "checkboxInputValue": { - "$ref": "InputValueCheckboxInputValue", - "description": "Value for checkbox input field." - }, - "choiceInputValue": { - "$ref": "InputValueChoiceInputValue", - "description": "Value for choice input field." + "accountStatus": { + "$ref": "AccountStatus", + "description": "The requested account status. Defined if and only if the request was successful." }, - "inputFieldId": { - "description": "Required. Id of the corresponding input field.", - "type": "string" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "textInputValue": { - "$ref": "InputValueTextInputValue", - "description": "Value for text input field." + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." } }, "type": "object" }, - "InputValueCheckboxInputValue": { - "description": "Value for checkbox input field.", - "id": "InputValueCheckboxInputValue", + "AccountstatusesListResponse": { + "id": "AccountstatusesListResponse", "properties": { - "value": { - "description": "Required. True if the merchant checked the box field. False otherwise.", - "type": "boolean" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accountstatusesListResponse`\".", + "type": "string" + }, + "nextPageToken": { + "description": "The token for the retrieval of the next page of account statuses.", + "type": "string" + }, + "resources": { + "items": { + "$ref": "AccountStatus" + }, + "type": "array" } }, "type": "object" }, - "InputValueChoiceInputValue": { - "description": "Value for choice input field.", - "id": "InputValueChoiceInputValue", + "AccounttaxCustomBatchRequest": { + "id": "AccounttaxCustomBatchRequest", "properties": { - "choiceInputOptionId": { - "description": "Required. Id of the option that was selected by the merchant.", - "type": "string" + "entries": { + "description": "The request entries to be processed in the batch.", + "items": { + "$ref": "AccounttaxCustomBatchRequestEntry" + }, + "type": "array" } }, "type": "object" }, - "InputValueTextInputValue": { - "description": "Value for text input field.", - "id": "InputValueTextInputValue", + "AccounttaxCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch accounttax request.", + "id": "AccounttaxCustomBatchRequestEntry", "properties": { - "value": { - "description": "Required. Text provided by the merchant.", + "accountId": { + "description": "The ID of the account for which to get/update account tax settings.", + "format": "uint64", + "type": "string" + }, + "accountTax": { + "$ref": "AccountTax", + "description": "The account tax settings to update. Only defined if the method is `update`." + }, + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" + }, + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", + "type": "string" + }, + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`get`\" - \"`update`\" ", "type": "string" } }, "type": "object" }, - "InsertCheckoutSettingsRequest": { - "description": "Request message for the `InsertCheckoutSettings` method.", - "id": "InsertCheckoutSettingsRequest", + "AccounttaxCustomBatchResponse": { + "id": "AccounttaxCustomBatchResponse", "properties": { - "uriSettings": { - "$ref": "UrlSettings", - "description": "Required. The `UrlSettings` for the request. The presence of URL settings indicates `Checkout` enrollment." + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "AccounttaxCustomBatchResponseEntry" + }, + "type": "array" + }, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponse`\".", + "type": "string" } }, "type": "object" }, - "Installment": { - "description": "Details of a monthly installment payment offering. [Learn more](https://support.google.com/merchants/answer/6324474) about installments.", - "id": "Installment", + "AccounttaxCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch accounttax response.", + "id": "AccounttaxCustomBatchResponseEntry", "properties": { - "amount": { - "$ref": "Price", - "description": "The amount the buyer has to pay per month." + "accountTax": { + "$ref": "AccountTax", + "description": "The retrieved or updated account tax settings." }, - "creditType": { - "description": "Optional. Type of installment payments. Supported values are: - \"`finance`\" - \"`lease`\" ", - "type": "string" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "downpayment": { - "$ref": "Price", - "description": "Optional. The initial down payment amount the buyer has to pay." + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, - "months": { - "description": "The number of installments the buyer has to pay.", - "format": "int64", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxCustomBatchResponseEntry`\"", "type": "string" } }, "type": "object" }, - "InvoiceSummary": { - "id": "InvoiceSummary", + "AccounttaxListResponse": { + "id": "AccounttaxListResponse", "properties": { - "additionalChargeSummaries": { - "description": "Summary of the total amounts of the additional charges.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#accounttaxListResponse`\".", + "type": "string" + }, + "nextPageToken": { + "description": "The token for the retrieval of the next page of account tax settings.", + "type": "string" + }, + "resources": { "items": { - "$ref": "InvoiceSummaryAdditionalChargeSummary" + "$ref": "AccountTax" }, "type": "array" - }, - "productTotal": { - "$ref": "Amount", - "description": "[required] Total price for the product." } }, "type": "object" }, - "InvoiceSummaryAdditionalChargeSummary": { - "id": "InvoiceSummaryAdditionalChargeSummary", + "Action": { + "description": "An actionable step that can be executed to solve the issue.", + "id": "Action", "properties": { - "totalAmount": { - "$ref": "Amount", - "description": "[required] Total additional charge for this type." + "builtinSimpleAction": { + "$ref": "BuiltInSimpleAction", + "description": "Action implemented and performed in (your) third-party application. The application should point the merchant to the place, where they can access the corresponding functionality or provide instructions, if the specific functionality is not available." }, - "type": { - "description": "[required] Type of the additional charge. Acceptable values are: - \"`shipping`\" ", + "builtinUserInputAction": { + "$ref": "BuiltInUserInputAction", + "description": "Action implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant as specified for given action. They can trigger the action only when they provided all required inputs." + }, + "buttonLabel": { + "description": "Label of the action button.", "type": "string" - } - }, - "type": "object" - }, - "LabelIds": { - "description": "The IDs of labels that should be assigned to the CSS domain.", - "id": "LabelIds", - "properties": { - "labelIds": { - "description": "The list of label IDs.", + }, + "externalAction": { + "$ref": "ExternalAction", + "description": "Action that is implemented and performed outside of (your) third-party application. The application needs to redirect the merchant to the external location where they can perform the action." + }, + "isAvailable": { + "description": "Controlling whether the button is active or disabled. The value is 'false' when the action was already requested or is not available. If the action is not available then a reason will be present. If (your) third-party application shows a disabled button for action that is not available, then it should also show reasons.", + "type": "boolean" + }, + "reasons": { + "description": "List of reasons why the action is not available. The list of reasons is empty if the action is available. If there is only one reason, it can be displayed next to the disabled button. If there are more reasons, all of them should be displayed, for example in a pop-up dialog.", "items": { - "format": "int64", - "type": "string" + "$ref": "ActionReason" }, "type": "array" } }, "type": "object" }, - "LiaAboutPageSettings": { - "id": "LiaAboutPageSettings", + "ActionFlow": { + "description": "Flow that can be selected for an action. When merchant selects a flow, application should open a dialog with more information and input form.", + "id": "ActionFlow", "properties": { - "status": { - "description": "The status of the verification process for the About page. Supported values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "dialogButtonLabel": { + "description": "Label for the button to trigger the action from the action dialog. For example: \"Request review\"", "type": "string" }, - "url": { - "description": "The URL for the About page.", + "dialogCallout": { + "$ref": "Callout", + "description": "Important message to be highlighted in the request dialog. For example: \"You can only request a review for disagreeing with this issue once. If it's not approved, you'll need to fix the issue and wait a few days before you can request another review.\"" + }, + "dialogMessage": { + "$ref": "TextWithTooltip", + "description": "Message displayed in the request dialog. For example: \"Make sure you've fixed all your country-specific issues. If not, you may have to wait 7 days to request another review\". There may be an more information to be shown in a tooltip." + }, + "dialogTitle": { + "description": "Title of the request dialog. For example: \"Before you request a review\"", + "type": "string" + }, + "id": { + "description": "Not for display but need to be sent back for the selected action flow.", + "type": "string" + }, + "inputs": { + "description": "A list of input fields.", + "items": { + "$ref": "InputField" + }, + "type": "array" + }, + "label": { + "description": "Text value describing the intent for the action flow. It can be used as an input label if merchant needs to pick one of multiple flows. For example: \"I disagree with the issue\"", "type": "string" } }, "type": "object" }, - "LiaCountrySettings": { - "id": "LiaCountrySettings", + "ActionInput": { + "description": "Input provided by the merchant.", + "id": "ActionInput", "properties": { - "about": { - "$ref": "LiaAboutPageSettings", - "description": "The settings for the About page." - }, - "country": { - "description": "Required. CLDR country code (for example, \"US\").", + "actionFlowId": { + "description": "Required. Id of the selected action flow.", "type": "string" }, - "hostedLocalStorefrontActive": { - "description": "The status of the \"Merchant hosted local storefront\" feature.", - "type": "boolean" - }, - "inventory": { - "$ref": "LiaInventorySettings", - "description": "LIA inventory verification settings." - }, - "omnichannelExperience": { - "$ref": "LiaOmnichannelExperience", - "description": "The omnichannel experience configured for this country." - }, - "onDisplayToOrder": { - "$ref": "LiaOnDisplayToOrderSettings", - "description": "LIA \"On Display To Order\" settings." - }, - "posDataProvider": { - "$ref": "LiaPosDataProvider", - "description": "The POS data provider linked with this country." - }, - "storePickupActive": { - "description": "The status of the \"Store pickup\" feature.", - "type": "boolean" + "inputValues": { + "description": "Required. Values for input fields.", + "items": { + "$ref": "InputValue" + }, + "type": "array" } }, "type": "object" }, - "LiaInventorySettings": { - "id": "LiaInventorySettings", + "ActionReason": { + "description": "A single reason why the action is not available.", + "id": "ActionReason", "properties": { - "inventoryVerificationContactEmail": { - "description": "The email of the contact for the inventory verification process.", - "type": "string" - }, - "inventoryVerificationContactName": { - "description": "The name of the contact for the inventory verification process.", - "type": "string" + "action": { + "$ref": "Action", + "description": "Optional. An action that needs to be performed to solve the problem represented by this reason. This action will always be available. Should be rendered as a link or button next to the summarizing message. For example, the review may be available only once merchant configure all required attributes. In such a situation this action can be a link to the form, where they can fill the missing attribute to unblock the main action." }, - "inventoryVerificationContactStatus": { - "description": "The status of the verification contact. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "detail": { + "description": "Detailed explanation of the reason. Should be displayed as a hint if present.", "type": "string" }, - "status": { - "description": "The status of the inventory verification process. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "message": { + "description": "Messages summarizing the reason, why the action is not available. For example: \"Review requested on Jan 03. Review requests can take a few days to complete.\"", "type": "string" } }, "type": "object" }, - "LiaOmnichannelExperience": { - "description": "Omnichannel experience details.", - "id": "LiaOmnichannelExperience", + "Address": { + "id": "Address", "properties": { - "country": { - "description": "The CLDR country code (for example, \"US\").", + "administrativeArea": { + "description": "Required. Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", "type": "string" }, - "lsfType": { - "description": "The Local Store Front (LSF) type for this country. Acceptable values are: - \"`ghlsf`\" (Google-Hosted Local Store Front) - \"`mhlsfBasic`\" (Merchant-Hosted Local Store Front Basic) - \"`mhlsfFull`\" (Merchant-Hosted Local Store Front Full) More details about these types can be found here.", + "city": { + "description": "Required. City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", "type": "string" }, - "pickupTypes": { - "description": "The Pickup types for this country. Acceptable values are: - \"`pickupToday`\" - \"`pickupLater`\" ", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "LiaOnDisplayToOrderSettings": { - "id": "LiaOnDisplayToOrderSettings", - "properties": { - "shippingCostPolicyUrl": { - "description": "Shipping cost and policy URL.", + "country": { + "description": "Required. [CLDR country code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) (for example, \"US\").", "type": "string" }, - "status": { - "description": "The status of the ?On display to order? feature. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "postalCode": { + "description": "Required. Postal code or ZIP (for example, \"94043\").", + "type": "string" + }, + "streetAddress": { + "description": "Street-level part of the address. Use `\\n` to add a second line.", "type": "string" } }, "type": "object" }, - "LiaPosDataProvider": { - "id": "LiaPosDataProvider", + "AlternateDisputeResolution": { + "description": "The Alternate Dispute Resolution (ADR) that may be available to merchants in some regions. If present, the link should be shown on the same page as the list of issues.", + "id": "AlternateDisputeResolution", "properties": { - "posDataProviderId": { - "description": "The ID of the POS data provider.", - "format": "uint64", + "label": { + "description": "The label for the alternate dispute resolution link.", "type": "string" }, - "posExternalAccountId": { - "description": "The account ID by which this merchant is known to the POS data provider.", + "uri": { + "description": "The URL pointing to a page, where merchant can request alternative dispute resolution with an [external body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501).", "type": "string" } }, "type": "object" }, - "LiaSettings": { - "description": "Local Inventory ads (LIA) settings. All methods except listposdataproviders require the admin role.", - "id": "LiaSettings", + "AttributionSettings": { + "description": "Represents attribution settings for conversion sources receiving pre-attribution data.", + "id": "AttributionSettings", "properties": { - "accountId": { - "description": "The ID of the account to which these LIA settings belong. Ignored upon update, always present in get request responses.", - "format": "uint64", + "attributionLookbackWindowInDays": { + "description": "Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.", + "format": "int32", + "type": "integer" + }, + "attributionModel": { + "description": "Required. Attribution model.", + "enum": [ + "ATTRIBUTION_MODEL_UNSPECIFIED", + "CROSS_CHANNEL_LAST_CLICK", + "ADS_PREFERRED_LAST_CLICK", + "CROSS_CHANNEL_DATA_DRIVEN", + "CROSS_CHANNEL_FIRST_CLICK", + "CROSS_CHANNEL_LINEAR", + "CROSS_CHANNEL_POSITION_BASED", + "CROSS_CHANNEL_TIME_DECAY" + ], + "enumDescriptions": [ + "", + "Cross-channel Last Click model.", + "Ads-preferred Last Click model.", + "Cross-channel Data Driven model.", + "Cross-channel First Click model.", + "Cross-channel Linear model.", + "Cross-channel Position Based model.", + "Cross-channel Time Decay model." + ], "type": "string" }, - "countrySettings": { - "description": "The LIA settings for each country.", + "conversionType": { + "description": "Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard \"purchase\" type will be automatically created if this list is empty at creation time.", "items": { - "$ref": "LiaCountrySettings" + "$ref": "AttributionSettingsConversionType" }, - "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liaSettings`\"", - "type": "string" + "type": "array" } }, "type": "object" }, - "LiasettingsCustomBatchRequest": { - "id": "LiasettingsCustomBatchRequest", + "AttributionSettingsConversionType": { + "description": "Message representing a types of conversion events", + "id": "AttributionSettingsConversionType", "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "LiasettingsCustomBatchRequestEntry" - }, - "type": "array" + "includeInReporting": { + "description": "Output only. Option indicating if the type should be included in Merchant Center reporting.", + "readOnly": true, + "type": "boolean" + }, + "name": { + "description": "Output only. Conversion event name, as it'll be reported by the client.", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "LiasettingsCustomBatchRequestEntry": { - "id": "LiasettingsCustomBatchRequestEntry", + "BestSellers": { + "description": "Fields related to the [Best sellers reports](https://support.google.com/merchants/answer/9488679).", + "id": "BestSellers", "properties": { - "accountId": { - "description": "The ID of the account for which to get/update account LIA settings.", - "format": "uint64", + "categoryId": { + "description": "Google product category ID to calculate the ranking for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). If a `WHERE` condition on `best_sellers.category_id` is not specified in the query, rankings for all top-level categories are returned.", + "format": "int64", "type": "string" }, - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" - }, - "contactEmail": { - "description": "Inventory validation contact email. Required only for SetInventoryValidationContact.", + "countryCode": { + "description": "Country where the ranking is calculated. A `WHERE` condition on `best_sellers.country_code` is required in the query.", "type": "string" }, - "contactName": { - "description": "Inventory validation contact name. Required only for SetInventoryValidationContact.", + "previousRank": { + "description": "Popularity rank in the previous week or month.", + "format": "int64", "type": "string" }, - "country": { - "description": "The country code. Required only for RequestInventoryVerification.", + "previousRelativeDemand": { + "description": "Estimated demand in relation to the item with the highest popularity rank in the same category and country in the previous week or month.", + "enum": [ + "RELATIVE_DEMAND_UNSPECIFIED", + "VERY_LOW", + "LOW", + "MEDIUM", + "HIGH", + "VERY_HIGH" + ], + "enumDescriptions": [ + "Relative demand is unknown.", + "Demand is 0-5% of the demand of the highest ranked product clusters or brands.", + "Demand is 6-10% of the demand of the highest ranked product clusters or brands.", + "Demand is 11-20% of the demand of the highest ranked product clusters or brands.", + "Demand is 21-50% of the demand of the highest ranked product clusters or brands.", + "Demand is 51-100% of the demand of the highest ranked product clusters or brands." + ], "type": "string" }, - "gmbEmail": { - "description": "The Business Profile. Required only for RequestGmbAccess.", + "rank": { + "description": "Popularity on Shopping ads and free listings, in the selected category and country, based on the estimated number of units sold.", + "format": "int64", "type": "string" }, - "liaSettings": { - "$ref": "LiaSettings", - "description": "The account Lia settings to update. Only defined if the method is `update`." - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "relativeDemand": { + "description": "Estimated demand in relation to the item with the highest popularity rank in the same category and country.", + "enum": [ + "RELATIVE_DEMAND_UNSPECIFIED", + "VERY_LOW", + "LOW", + "MEDIUM", + "HIGH", + "VERY_HIGH" + ], + "enumDescriptions": [ + "Relative demand is unknown.", + "Demand is 0-5% of the demand of the highest ranked product clusters or brands.", + "Demand is 6-10% of the demand of the highest ranked product clusters or brands.", + "Demand is 11-20% of the demand of the highest ranked product clusters or brands.", + "Demand is 21-50% of the demand of the highest ranked product clusters or brands.", + "Demand is 51-100% of the demand of the highest ranked product clusters or brands." + ], "type": "string" }, - "method": { - "description": "The method of the batch entry. Acceptable values are: - \"`get`\" - \"`getAccessibleGmbAccounts`\" - \"`requestGmbAccess`\" - \"`requestInventoryVerification`\" - \"`setInventoryVerificationContact`\" - \"`update`\" ", + "relativeDemandChange": { + "description": "Change in the estimated demand. Whether it rose, sank or remained flat.", + "enum": [ + "RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED", + "SINKER", + "FLAT", + "RISER" + ], + "enumDescriptions": [ + "Relative demand change is unknown.", + "Relative demand is lower than previous time period.", + "Relative demand is equal to previous time period.", + "Relative demand is higher than the previous time period." + ], "type": "string" }, - "omnichannelExperience": { - "$ref": "LiaOmnichannelExperience", - "description": "The omnichannel experience for a country. Required only for SetOmnichannelExperience." + "reportDate": { + "$ref": "Date", + "description": "Report date. The value of this field can only be one of the following: * The first day of the week (Monday) for weekly reports. * The first day of the month for monthly reports. If a `WHERE` condition on `best_sellers.report_date` is not specified in the query, the latest available weekly or monthly report is returned." }, - "posDataProviderId": { - "description": "The ID of POS data provider. Required only for SetPosProvider.", - "format": "uint64", + "reportGranularity": { + "description": "Granularity of the report. The ranking can be done over a week or a month timeframe. A `WHERE` condition on `best_sellers.report_granularity` is required in the query.", + "enum": [ + "REPORT_GRANULARITY_UNSPECIFIED", + "WEEKLY", + "MONTHLY" + ], + "enumDescriptions": [ + "Report granularity is unknown.", + "Ranking is done over a week timeframe.", + "Ranking is done over a month timeframe." + ], "type": "string" - }, - "posExternalAccountId": { - "description": "The account ID by which this merchant is known to the POS provider.", + } + }, + "type": "object" + }, + "Brand": { + "description": "Brand fields. Values are only set for fields requested explicitly in the request's search query.", + "id": "Brand", + "properties": { + "name": { + "description": "Name of the brand.", "type": "string" } }, "type": "object" }, - "LiasettingsCustomBatchResponse": { - "id": "LiasettingsCustomBatchResponse", + "Breakdown": { + "description": "A detailed impact breakdown for a group of regions where the impact of the issue on different shopping destinations is the same.", + "id": "Breakdown", "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", + "details": { + "description": "Human readable, localized description of issue's effect on different targets. Should be rendered as a list. For example: * \"Products not showing in ads\" * \"Products not showing organically\"", "items": { - "$ref": "LiasettingsCustomBatchResponseEntry" + "type": "string" }, "type": "array" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsCustomBatchResponse`\".", - "type": "string" + "regions": { + "description": "Lists of regions. Should be rendered as a title for this group of details. The full list should be shown to merchant. If the list is too long, it is recommended to make it expandable.", + "items": { + "$ref": "BreakdownRegion" + }, + "type": "array" } }, "type": "object" }, - "LiasettingsCustomBatchResponseEntry": { - "id": "LiasettingsCustomBatchResponseEntry", + "BreakdownRegion": { + "description": "Region with code and localized name.", + "id": "BreakdownRegion", "properties": { - "batchId": { - "description": "The ID of the request entry to which this entry responds.", - "format": "uint32", - "type": "integer" - }, - "errors": { - "$ref": "Errors", - "description": "A list of errors defined if, and only if, the request failed." - }, - "gmbAccounts": { - "$ref": "GmbAccounts", - "description": "The list of accessible Business Profiles." - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsCustomBatchResponseEntry`\"", + "code": { + "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml)", "type": "string" }, - "liaSettings": { - "$ref": "LiaSettings", - "description": "The retrieved or updated Lia settings." + "name": { + "description": "The localized name of the region. For region with code='001' the value is 'All countries' or the equivalent in other languages.", + "type": "string" + } + }, + "type": "object" + }, + "BuiltInSimpleAction": { + "description": "Action that is implemented and performed in (your) third-party application. Represents various functionality that is expected to be available to merchant and will help them with resolving the issue. The application should point the merchant to the place, where they can access the corresponding functionality. If the functionality is not supported, it is recommended to explain the situation to merchant and provide them with instructions how to solve the issue.", + "id": "BuiltInSimpleAction", + "properties": { + "additionalContent": { + "$ref": "BuiltInSimpleActionAdditionalContent", + "description": "Long text from an external source that should be available to the merchant. Present when the type is `SHOW_ADDITIONAL_CONTENT`." }, - "omnichannelExperience": { - "$ref": "LiaOmnichannelExperience", - "description": "The updated omnichannel experience for a country." + "attributeCode": { + "description": "The attribute that needs to be updated. Present when the type is `EDIT_ITEM_ATTRIBUTE`. This field contains a code for attribute, represented in snake_case. You can find a list of product's attributes, with their codes [here](https://support.google.com/merchants/answer/7052112).", + "type": "string" }, - "posDataProviders": { - "description": "The list of POS data providers.", + "type": { + "description": "The type of action that represents a functionality that is expected to be available in third-party application.", + "enum": [ + "BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED", + "VERIFY_PHONE", + "CLAIM_WEBSITE", + "ADD_PRODUCTS", + "ADD_CONTACT_INFO", + "LINK_ADS_ACCOUNT", + "ADD_BUSINESS_REGISTRATION_NUMBER", + "EDIT_ITEM_ATTRIBUTE", + "FIX_ACCOUNT_ISSUE", + "SHOW_ADDITIONAL_CONTENT" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Redirect merchant to the part of your application where they can verify their phone.", + "Redirect merchant to the part of your application where they can claim their website.", + "Redirect merchant to the part of your application where they can add products.", + "Open a form where the merchant can edit their contact information.", + "Redirect merchant to the part of your application where they can link ads account.", + "Open a form where the merchant can add their business registration number.", + "Open a form where the merchant can edit an attribute. The attribute that needs to be updated is specified in attribute_code field of the action.", + "Redirect merchant from the product issues to the diagnostic page with their account issues in your application. This action will be returned only for product issues that are caused by an account issue and thus merchant should resolve the problem on the account level.", + "Show additional content to the merchant. This action will be used for example to deliver a justification from national authority." + ], + "type": "string" + } + }, + "type": "object" + }, + "BuiltInSimpleActionAdditionalContent": { + "description": "Long text from external source.", + "id": "BuiltInSimpleActionAdditionalContent", + "properties": { + "paragraphs": { + "description": "Long text organized into paragraphs.", "items": { - "$ref": "PosDataProviders" + "type": "string" }, "type": "array" + }, + "title": { + "description": "Title of the additional content;", + "type": "string" } }, "type": "object" }, - "LiasettingsGetAccessibleGmbAccountsResponse": { - "id": "LiasettingsGetAccessibleGmbAccountsResponse", + "BuiltInUserInputAction": { + "description": "Action that is implemented and performed in (your) third-party application. The application needs to show an additional content and input form to the merchant. They can start the action only when they provided all required inputs. The application will request processing of the action by calling the [triggeraction method](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction).", + "id": "BuiltInUserInputAction", "properties": { - "accountId": { - "description": "The ID of the Merchant Center account.", - "format": "uint64", + "actionContext": { + "description": "Internal details. Not for display but need to be sent back when triggering the action.", "type": "string" }, - "gmbAccounts": { - "description": "A list of Business Profiles which are available to the merchant.", + "flows": { + "description": "Actions may provide multiple different flows. Merchant selects one that fits best to their intent. Selecting the flow is the first step in user's interaction with the action. It affects what input fields will be available and required and also how the request will be processed.", "items": { - "$ref": "GmbAccountsGmbAccount" + "$ref": "ActionFlow" }, "type": "array" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsGetAccessibleGmbAccountsResponse`\".", - "type": "string" } }, "type": "object" }, - "LiasettingsListPosDataProvidersResponse": { - "id": "LiasettingsListPosDataProvidersResponse", + "BusinessDayConfig": { + "id": "BusinessDayConfig", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsListPosDataProvidersResponse`\".", - "type": "string" - }, - "posDataProviders": { - "description": "The list of POS data providers for each eligible country", + "businessDays": { + "description": "Regular business days, such as '\"monday\"'. May not be empty.", "items": { - "$ref": "PosDataProviders" + "type": "string" }, "type": "array" } }, "type": "object" }, - "LiasettingsListResponse": { - "id": "LiasettingsListResponse", + "Callout": { + "description": "An important message that should be highlighted. Usually displayed as a banner.", + "id": "Callout", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsListResponse`\".", - "type": "string" + "fullMessage": { + "$ref": "TextWithTooltip", + "description": "A full message that needs to be shown to the merchant." }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of LIA settings.", + "styleHint": { + "description": "Can be used to render messages with different severity in different styles. Snippets off all types contain important information that should be displayed to merchants.", + "enum": [ + "CALLOUT_STYLE_HINT_UNSPECIFIED", + "ERROR", + "WARNING", + "INFO" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "The most important type of information highlighting problems, like an unsuccessful outcome of previously requested actions.", + "Information warning about pending problems, risks or deadlines.", + "Default severity for important information like pending status of previously requested action or cooldown for re-review." + ], "type": "string" - }, - "resources": { - "items": { - "$ref": "LiaSettings" - }, - "type": "array" } }, "type": "object" }, - "LiasettingsRequestGmbAccessResponse": { - "id": "LiasettingsRequestGmbAccessResponse", + "CarrierRate": { + "id": "CarrierRate", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsRequestGmbAccessResponse`\".", + "carrierName": { + "description": "Carrier service, such as `\"UPS\"` or `\"Fedex\"`. The list of supported carriers can be retrieved through the `getSupportedCarriers` method. Required.", + "type": "string" + }, + "carrierService": { + "description": "Carrier service, such as `\"ground\"` or `\"2 days\"`. The list of supported services for a carrier can be retrieved through the `getSupportedCarriers` method. Required.", + "type": "string" + }, + "flatAdjustment": { + "$ref": "Price", + "description": "Additive shipping rate modifier. Can be negative. For example `{ \"value\": \"1\", \"currency\" : \"USD\" }` adds $1 to the rate, `{ \"value\": \"-3\", \"currency\" : \"USD\" }` removes $3 from the rate. Optional." + }, + "name": { + "description": "Name of the carrier rate. Must be unique per rate group. Required.", + "type": "string" + }, + "originPostalCode": { + "description": "Shipping origin for this carrier rate. Required.", + "type": "string" + }, + "percentageAdjustment": { + "description": "Multiplicative shipping rate modifier as a number in decimal notation. Can be negative. For example `\"5.4\"` increases the rate by 5.4%, `\"-3\"` decreases the rate by 3%. Optional.", "type": "string" } }, "type": "object" }, - "LiasettingsRequestInventoryVerificationResponse": { - "id": "LiasettingsRequestInventoryVerificationResponse", + "CarriersCarrier": { + "id": "CarriersCarrier", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsRequestInventoryVerificationResponse`\".", + "country": { + "description": "The CLDR country code of the carrier (for example, \"US\"). Always present.", + "type": "string" + }, + "eddServices": { + "description": "A list of services supported for EDD (Estimated Delivery Date) calculation. This is the list of valid values for WarehouseBasedDeliveryTime.carrierService.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "The name of the carrier (for example, `\"UPS\"`). Always present.", "type": "string" + }, + "services": { + "description": "A list of supported services (for example, `\"ground\"`) for that carrier. Contains at least one service. This is the list of valid values for CarrierRate.carrierService.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "LiasettingsSetInventoryVerificationContactResponse": { - "id": "LiasettingsSetInventoryVerificationContactResponse", + "CheckoutSettings": { + "description": "`CheckoutSettings` for a specific merchant ID.", + "id": "CheckoutSettings", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsSetInventoryVerificationContactResponse`\".", + "effectiveEnrollmentState": { + "description": "Output only. The effective value of enrollment state for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account.", + "enum": [ + "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED", + "INACTIVE", + "ENROLLED", + "OPT_OUT" + ], + "enumDescriptions": [ + "Default enrollment state when enrollment state is not specified.", + "Merchant has not enrolled into the feature.", + "Merchant has enrolled into the feature by providing either an account level URL or checkout URLs as part of their feed.", + "Merchant has previously enrolled but opted out of the feature." + ], + "readOnly": true, + "type": "string" + }, + "effectiveReviewState": { + "description": "Output only. The effective value of review state for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account.", + "enum": [ + "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED", + "IN_REVIEW", + "APPROVED", + "DISAPPROVED" + ], + "enumDescriptions": [ + "Default review state when review state is not specified.", + "Merchant provided URLs are being reviewed for data quality issues.", + "Merchant account has been approved. Indicates the data quality checks have passed.", + "Merchant account has been disapproved due to data quality issues." + ], + "readOnly": true, + "type": "string" + }, + "effectiveUriSettings": { + "$ref": "UrlSettings", + "description": "The effective value of `url_settings` for a given merchant ID. If account level settings are present then this value will be a copy of the account level settings. Otherwise, it will have the value of the parent account." + }, + "enrollmentState": { + "description": "Output only. Reflects the merchant enrollment state in `Checkout` feature.", + "enum": [ + "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED", + "INACTIVE", + "ENROLLED", + "OPT_OUT" + ], + "enumDescriptions": [ + "Default enrollment state when enrollment state is not specified.", + "Merchant has not enrolled into the feature.", + "Merchant has enrolled into the feature by providing either an account level URL or checkout URLs as part of their feed.", + "Merchant has previously enrolled but opted out of the feature." + ], + "readOnly": true, + "type": "string" + }, + "merchantId": { + "description": "Required. The ID of the account.", + "format": "int64", + "type": "string" + }, + "reviewState": { + "description": "Output only. Reflects the merchant review state in `Checkout` feature. This is set based on the data quality reviews of the URL provided by the merchant. A merchant with enrollment state as `ENROLLED` can be in the following review states: `IN_REVIEW`, `APPROVED` or `DISAPPROVED`. A merchant must be in an enrollment_state of `ENROLLED` before a review can begin for the merchant.", + "enum": [ + "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED", + "IN_REVIEW", + "APPROVED", + "DISAPPROVED" + ], + "enumDescriptions": [ + "Default review state when review state is not specified.", + "Merchant provided URLs are being reviewed for data quality issues.", + "Merchant account has been approved. Indicates the data quality checks have passed.", + "Merchant account has been disapproved due to data quality issues." + ], + "readOnly": true, "type": "string" + }, + "uriSettings": { + "$ref": "UrlSettings", + "description": "URL settings for cart or checkout URL." } }, "type": "object" }, - "LiasettingsSetPosDataProviderResponse": { - "id": "LiasettingsSetPosDataProviderResponse", + "CloudExportAdditionalProperties": { + "description": "Product property for the Cloud Retail API. For example, properties for a TV product could be \"Screen-Resolution\" or \"Screen-Size\".", + "id": "CloudExportAdditionalProperties", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsSetPosDataProviderResponse`\".", + "boolValue": { + "description": "Boolean value of the given property. For example for a TV product, \"True\" or \"False\" if the screen is UHD.", + "type": "boolean" + }, + "floatValue": { + "description": "Float values of the given property. For example for a TV product 1.2345. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + }, + "intValue": { + "description": "Integer values of the given property. For example, 1080 for a screen resolution of a TV product. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "maxValue": { + "description": "Maximum float value of the given property. For example for a TV product 100.00.", + "format": "float", + "type": "number" + }, + "minValue": { + "description": "Minimum float value of the given property. For example for a TV product 1.00.", + "format": "float", + "type": "number" + }, + "propertyName": { + "description": "Name of the given property. For example, \"Screen-Resolution\" for a TV product. Maximum string size is 256 characters.", + "type": "string" + }, + "textValue": { + "description": "Text value of the given property. For example, \"8K(UHD)\" could be a text value for a TV product. Maximum number of specified values for this field is 400. Values are stored in an arbitrary but consistent order. Maximum string size is 256 characters.", + "items": { + "type": "string" + }, + "type": "array" + }, + "unitCode": { + "description": "Unit of the given property. For example, \"Pixels\" for a TV product. Maximum string size is 256 bytes.", "type": "string" } }, "type": "object" }, - "LinkService": { - "id": "LinkService", + "Collection": { + "description": "The collection message.", + "id": "Collection", "properties": { - "service": { - "description": "Service provided to or by the linked account. Acceptable values are: - \"`shoppingActionsOrderManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingAdsProductManagement`\" - \"`paymentProcessing`\" ", + "customLabel0": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns. [Custom label](https://support.google.com/merchants/answer/9674217)", "type": "string" }, - "status": { - "description": "Status of the link Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", + "customLabel1": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", "type": "string" - } - }, - "type": "object" - }, - "LinkedAccount": { - "id": "LinkedAccount", - "properties": { - "linkedAccountId": { - "description": "The ID of the linked account.", + }, + "customLabel2": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", "type": "string" }, - "services": { - "description": "List of provided services.", + "customLabel3": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", + "type": "string" + }, + "customLabel4": { + "description": "Label that you assign to a collection to help organize bidding and reporting in Shopping campaigns.", + "type": "string" + }, + "featuredProduct": { + "description": "This identifies one or more products associated with the collection. Used as a lookup to the corresponding product ID in your product feeds. Provide a maximum of 100 featuredProduct (for collections). Provide up to 10 featuredProduct (for Shoppable Images only) with ID and X and Y coordinates. [featured_product attribute](https://support.google.com/merchants/answer/9703736)", "items": { - "$ref": "LinkService" + "$ref": "CollectionFeaturedProduct" }, "type": "array" - } - }, - "type": "object" - }, - "ListAccountLabelsResponse": { - "description": "Response message for the `ListAccountLabels` method.", - "id": "ListAccountLabelsResponse", - "properties": { - "accountLabels": { - "description": "The labels from the specified account.", + }, + "headline": { + "description": "Your collection's name. [headline attribute](https://support.google.com/merchants/answer/9673580)", "items": { - "$ref": "AccountLabel" + "type": "string" }, "type": "array" }, - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "id": { + "description": "Required. The REST ID of the collection. Content API methods that operate on collections take this as their collectionId parameter. The REST ID for a collection is of the form collectionId. [id attribute](https://support.google.com/merchants/answer/9649290)", "type": "string" - } - }, - "type": "object" - }, - "ListAccountReturnCarrierResponse": { - "description": "Response for listing account return carriers.", - "id": "ListAccountReturnCarrierResponse", - "properties": { - "accountReturnCarriers": { - "description": "List of all available account return carriers for the merchant.", + }, + "imageLink": { + "description": "The URL of a collection’s image. [image_link attribute](https://support.google.com/merchants/answer/9703236)", "items": { - "$ref": "AccountReturnCarrier" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "ListCollectionStatusesResponse": { - "description": "Response message for the ListCollectionStatuses method.", - "id": "ListCollectionStatusesResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + }, + "language": { + "description": "The language of a collection and the language of any featured products linked to the collection. [language attribute](https://support.google.com/merchants/answer/9673781)", "type": "string" }, - "resources": { - "description": "The collectionstatuses listed.", - "items": { - "$ref": "CollectionStatus" - }, - "type": "array" + "link": { + "description": "A collection’s landing page. URL directly linking to your collection's page on your website. [link attribute](https://support.google.com/merchants/answer/9673983)", + "type": "string" + }, + "mobileLink": { + "description": "A collection’s mobile-optimized landing page when you have a different URL for mobile and desktop traffic. [mobile_link attribute](https://support.google.com/merchants/answer/9646123)", + "type": "string" + }, + "productCountry": { + "description": "[product_country attribute](https://support.google.com/merchants/answer/9674155)", + "type": "string" } }, "type": "object" }, - "ListCollectionsResponse": { - "description": "Response message for the ListCollections method.", - "id": "ListCollectionsResponse", + "CollectionFeaturedProduct": { + "description": "The message for FeaturedProduct. [FeaturedProduct](https://support.google.com/merchants/answer/9703736)", + "id": "CollectionFeaturedProduct", "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "offerId": { + "description": "The unique identifier for the product item.", "type": "string" }, - "resources": { - "description": "The collections listed.", - "items": { - "$ref": "Collection" - }, - "type": "array" + "x": { + "description": "Required. X-coordinate of the product callout on the Shoppable Image.", + "format": "float", + "type": "number" + }, + "y": { + "description": "Required. Y-coordinate of the product callout on the Shoppable Image.", + "format": "float", + "type": "number" } }, "type": "object" }, - "ListConversionSourcesResponse": { - "description": "Response message for the ListConversionSources method.", - "id": "ListConversionSourcesResponse", + "CollectionStatus": { + "description": "The collectionstatus message.", + "id": "CollectionStatus", "properties": { - "conversionSources": { - "description": "List of conversion sources.", + "collectionLevelIssuses": { + "description": "A list of all issues associated with the collection.", "items": { - "$ref": "ConversionSource" + "$ref": "CollectionStatusItemLevelIssue" }, "type": "array" }, - "nextPageToken": { - "description": "Token to be used to fetch the next results page.", + "creationDate": { + "description": "Date on which the collection has been created in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for example \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\"", "type": "string" - } - }, - "type": "object" - }, - "ListCssesResponse": { - "description": "The response message for the `ListCsses` method", - "id": "ListCssesResponse", - "properties": { - "csses": { - "description": "The CSS domains affiliated with the specified CSS group.", + }, + "destinationStatuses": { + "description": "The intended destinations for the collection.", "items": { - "$ref": "Css" + "$ref": "CollectionStatusDestinationStatus" }, "type": "array" }, - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "id": { + "description": "Required. The ID of the collection for which status is reported.", "type": "string" - } - }, - "type": "object" - }, - "ListMethodQuotasResponse": { - "description": "Response message for the ListMethodQuotas method.", - "id": "ListMethodQuotasResponse", - "properties": { - "methodQuotas": { - "description": "The current quota usage and limits per each method.", - "items": { - "$ref": "MethodQuota" - }, - "type": "array" }, - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "lastUpdateDate": { + "description": "Date on which the collection has been last updated in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for example \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\"", "type": "string" } }, "type": "object" }, - "ListPromotionResponse": { - "description": "Response message for Promotions.List method.", - "id": "ListPromotionResponse", + "CollectionStatusDestinationStatus": { + "description": "Destination status message.", + "id": "CollectionStatusDestinationStatus", "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "promotions": { - "description": "List of all available promotions for the merchant.", + "approvedCountries": { + "description": "Country codes (ISO 3166-1 alpha-2) where the collection is approved.", "items": { - "$ref": "Promotion" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "ListRegionsResponse": { - "description": "Response message for the `ListRegions` method.", - "id": "ListRegionsResponse", - "properties": { - "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + }, + "destination": { + "description": "The name of the destination", "type": "string" }, - "regions": { - "description": "The regions from the specified merchant.", + "disapprovedCountries": { + "description": "Country codes (ISO 3166-1 alpha-2) where the collection is disapproved.", "items": { - "$ref": "Region" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "ListReturnPolicyOnlineResponse": { - "description": "Response message for the `ListReturnPolicyOnline` method.", - "id": "ListReturnPolicyOnlineResponse", - "properties": { - "returnPolicies": { - "description": "The retrieved return policies.", + }, + "pendingCountries": { + "description": "Country codes (ISO 3166-1 alpha-2) where the collection is pending approval.", "items": { - "$ref": "ReturnPolicyOnline" + "type": "string" }, "type": "array" + }, + "status": { + "description": "The status for the specified destination in the collections target country.", + "type": "string" } }, "type": "object" }, - "LocalInventory": { - "description": "Local inventory resource. For accepted attribute values, see the local product inventory feed specification.", - "id": "LocalInventory", + "CollectionStatusItemLevelIssue": { + "description": "Issue associated with the collection.", + "id": "CollectionStatusItemLevelIssue", "properties": { - "availability": { - "description": "The availability of the product. For accepted attribute values, see the local product inventory feed specification.", - "type": "string" - }, - "customAttributes": { - "description": "A list of custom (merchant-provided) attributes. Can also be used to submit any attribute of the feed specification in its generic form, for example, `{ \"name\": \"size type\", \"value\": \"regular\" }`.", + "applicableCountries": { + "description": "Country codes (ISO 3166-1 alpha-2) where issue applies to the offer.", "items": { - "$ref": "CustomAttribute" + "type": "string" }, "type": "array" }, - "instoreProductLocation": { - "description": "The in-store product location.", + "attributeName": { + "description": "The attribute's name, if the issue is caused by a single attribute.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localInventory`\"", + "code": { + "description": "The error code of the issue.", "type": "string" }, - "pickupMethod": { - "description": "The supported pickup method for this offer. Unless the value is \"not supported\", this field must be submitted together with `pickupSla`. For accepted attribute values, see the local product inventory feed specification.", + "description": { + "description": "A short issue description in English.", "type": "string" }, - "pickupSla": { - "description": "The expected date that an order will be ready for pickup relative to the order date. Must be submitted together with `pickupMethod`. For accepted attribute values, see the local product inventory feed specification.", + "destination": { + "description": "The destination the issue applies to.", "type": "string" }, - "price": { - "$ref": "Price", - "description": "The price of the product." - }, - "quantity": { - "description": "The quantity of the product. Must be nonnegative.", - "format": "uint32", - "type": "integer" + "detail": { + "description": "A detailed issue description in English.", + "type": "string" }, - "salePrice": { - "$ref": "Price", - "description": "The sale price of the product. Mandatory if `sale_price_effective_date` is defined." + "documentation": { + "description": "The URL of a web page to help with resolving this issue.", + "type": "string" }, - "salePriceEffectiveDate": { - "description": "A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates may be specified as 'null' if undecided.", + "resolution": { + "description": "Whether the issue can be resolved by the merchant.", "type": "string" }, - "storeCode": { - "description": "Required. The store code of this local inventory resource.", + "servability": { + "description": "How this issue affects the serving of the collection.", "type": "string" } }, "type": "object" }, - "LocalinventoryCustomBatchRequest": { - "id": "LocalinventoryCustomBatchRequest", - "properties": { - "entries": { - "description": "The request entries to be processed in the batch.", - "items": { - "$ref": "LocalinventoryCustomBatchRequestEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "LocalinventoryCustomBatchRequestEntry": { - "description": "Batch entry encoding a single local inventory update request.", - "id": "LocalinventoryCustomBatchRequestEntry", + "CompetitiveVisibility": { + "description": "Fields related to [competitive visibility reports] (https://support.google.com/merchants/answer/11366442).", + "id": "CompetitiveVisibility", "properties": { - "batchId": { - "description": "An entry ID, unique within the batch request.", - "format": "uint32", - "type": "integer" + "adsOrganicRatio": { + "description": "[Ads / organic ratio] (https://support.google.com/merchants/answer/11366442#zippy=%2Cadsfree-ratio) shows how often a merchant receives impressions from Shopping ads compared to organic traffic. The number is rounded and bucketed. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" }, - "localInventory": { - "$ref": "LocalInventory", - "description": "Local inventory of the product." + "categoryBenchmarkVisibilityTrend": { + "description": "Change in visibility based on impressions with respect to the start of the selected time range (or first day with non-zero impressions) for a combined set of merchants with highest visibility approximating the market. Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "categoryId": { + "description": "Google product category ID to calculate the report for, represented in [Google's product taxonomy](https://support.google.com/merchants/answer/6324436). Required in the `SELECT` clause. A `WHERE` condition on `competitive_visibility.category_id` is required in the query.", + "format": "int64", "type": "string" }, - "method": { - "description": "Method of the batch request entry. Acceptable values are: - \"`insert`\" ", + "countryCode": { + "description": "The country where impression appeared. Required in the `SELECT` clause. A `WHERE` condition on `competitive_visibility.country_code` is required in the query.", "type": "string" }, - "productId": { - "description": "The ID of the product for which to update local inventory.", + "date": { + "$ref": "Date", + "description": "Date of this row. Available only in `CompetitiveVisibilityBenchmarkView` and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for `CompetitiveVisibilityMarketBenchmarkView`." + }, + "domain": { + "description": "Domain of your competitor or your domain, if 'is_your_domain' is true. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", "type": "string" - } - }, - "type": "object" - }, - "LocalinventoryCustomBatchResponse": { - "id": "LocalinventoryCustomBatchResponse", - "properties": { - "entries": { - "description": "The result of the execution of the batch requests.", - "items": { - "$ref": "LocalinventoryCustomBatchResponseEntry" - }, - "type": "array" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponse`\".", + "higherPositionRate": { + "description": "Higher position rate shows how often a competitor’s offer got placed in a higher position on the page than your offer. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" + }, + "isYourDomain": { + "description": "True if this row contains data for your domain. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "type": "boolean" + }, + "pageOverlapRate": { + "description": "Page overlap rate describes how frequently competing retailers’ offers are shown together with your offers on the same page. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" + }, + "rank": { + "description": "Position of the domain in the top merchants ranking for the selected keys (`date`, `category_id`, `country_code`, `listing_type`) based on impressions. 1 is the highest. Available only in `CompetitiveVisibilityTopMerchantView` and `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "uint64", + "type": "string" + }, + "relativeVisibility": { + "description": "Relative visibility shows how often your competitors’ offers are shown compared to your offers. In other words, this is the number of displayed impressions of a competitor retailer divided by the number of your displayed impressions during a selected time range for a selected product category and country. Available only in `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" + }, + "trafficSource": { + "description": "Type of impression listing. Required in the `SELECT` clause. Cannot be filtered on in the 'WHERE' clause.", + "enum": [ + "UNKNOWN", + "ORGANIC", + "ADS", + "ALL" + ], + "enumDescriptions": [ + "Traffic source is unknown.", + "Organic traffic.", + "Traffic from Ads.", + "Organic and Ads traffic." + ], "type": "string" + }, + "yourDomainVisibilityTrend": { + "description": "Change in visibility based on impressions for your domain with respect to the start of the selected time range (or first day with non-zero impressions). Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered on in the 'WHERE' clause.", + "format": "double", + "type": "number" } }, "type": "object" }, - "LocalinventoryCustomBatchResponseEntry": { - "description": "Batch entry encoding a single local inventory update response.", - "id": "LocalinventoryCustomBatchResponseEntry", + "ConversionSource": { + "description": "Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.", + "id": "ConversionSource", "properties": { - "batchId": { - "description": "The ID of the request entry this entry responds to.", - "format": "uint32", - "type": "integer" + "conversionSourceId": { + "description": "Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.", + "readOnly": true, + "type": "string" }, - "errors": { - "$ref": "Errors", - "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." + "expireTime": { + "description": "Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponseEntry`\"", + "googleAnalyticsLink": { + "$ref": "GoogleAnalyticsLink", + "description": "Immutable. Conversion Source of type \"Link to Google Analytics Property\"." + }, + "merchantCenterDestination": { + "$ref": "MerchantCenterDestination", + "description": "Conversion Source of type \"Merchant Center Tag Destination\"." + }, + "state": { + "description": "Output only. Current state of this conversion source. Can't be edited through the API.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "ARCHIVED", + "PENDING" + ], + "enumDescriptions": [ + "", + "Conversion source is fully functional.", + "Conversion source has been archived in the last 30 days and not currently functional. Can be restored using the undelete method.", + "Conversion source creation has started but not fully finished yet." + ], + "readOnly": true, "type": "string" } }, "type": "object" }, - "LocationIdSet": { - "id": "LocationIdSet", + "Css": { + "description": "Information about CSS domain.", + "id": "Css", "properties": { - "locationIds": { - "description": "A non-empty list of location IDs. They must all be of the same location type (for example, state).", + "cssDomainId": { + "description": "Output only. Immutable. The CSS domain ID.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "cssGroupId": { + "description": "Output only. Immutable. The ID of the CSS group this CSS domain is affiliated with. Only populated for CSS group users.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. Immutable. The CSS domain's display name, used when space is constrained.", + "readOnly": true, + "type": "string" + }, + "fullName": { + "description": "Output only. Immutable. The CSS domain's full name.", + "readOnly": true, + "type": "string" + }, + "homepageUri": { + "description": "Output only. Immutable. The CSS domain's homepage.", + "readOnly": true, + "type": "string" + }, + "labelIds": { + "description": "A list of label IDs that are assigned to this CSS domain by its CSS group. Only populated for CSS group users.", "items": { + "format": "int64", "type": "string" }, "type": "array" @@ -10793,2603 +7038,2486 @@ }, "type": "object" }, - "LoyaltyProgram": { - "description": "Allows the setting up of loyalty program benefits (for example price or points). https://support.google.com/merchants/answer/12922446", - "id": "LoyaltyProgram", + "CustomAttribute": { + "description": "A message that represents custom attributes. Exactly one of `value` or `groupValues` must be provided. Maximum allowed number of characters for each custom attribute is 10240 (represents sum of characters for name and value). Maximum 2500 custom attributes can be set per merchant, with total size of 102.4kB.", + "id": "CustomAttribute", "properties": { - "cashbackForFutureUse": { - "$ref": "Price", - "description": "Optional. The cashback that can be used for future purchases." - }, - "loyaltyPoints": { - "description": "Optional. The amount of loyalty points earned on a purchase.", - "format": "int64", - "type": "string" - }, - "memberPriceEffectiveDate": { - "description": "Optional. A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.", - "type": "string" - }, - "price": { - "$ref": "Price", - "description": "Optional. The price for members of the given tier (instant discount price). Must be smaller or equal to the regular price." + "groupValues": { + "description": "Subattributes within this attribute group. Exactly one of value or groupValues must be provided.", + "items": { + "$ref": "CustomAttribute" + }, + "type": "array" }, - "programLabel": { - "description": "Required. The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. It must be provided so that system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.", + "name": { + "description": "The name of the attribute. Underscores will be replaced by spaces upon insertion.", "type": "string" }, - "tierLabel": { - "description": "Required. The label of the tier within the loyalty program. Must match one of the labels within the program.", + "value": { + "description": "The value of the attribute.", "type": "string" } }, "type": "object" }, - "MerchantCenterDestination": { - "description": "\"Merchant Center Destination\" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created.", - "id": "MerchantCenterDestination", + "CutoffTime": { + "id": "CutoffTime", "properties": { - "attributionSettings": { - "$ref": "AttributionSettings", - "description": "Required. Attribution settings being used for the Merchant Center Destination." - }, - "currencyCode": { - "description": "Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.", - "type": "string" + "hour": { + "description": "Hour of the cutoff time until which an order has to be placed to be processed in the same day. Required.", + "format": "uint32", + "type": "integer" }, - "destinationId": { - "description": "Output only. Merchant Center Destination ID.", - "readOnly": true, - "type": "string" + "minute": { + "description": "Minute of the cutoff time until which an order has to be placed to be processed in the same day. Required.", + "format": "uint32", + "type": "integer" }, - "displayName": { - "description": "Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.", + "timezone": { + "description": "Timezone identifier for the cutoff time (for example, \"Europe/Zurich\"). List of identifiers. Required.", "type": "string" } }, "type": "object" }, - "MerchantOrderReturn": { - "description": "Order return. Production access (all methods) requires the order manager role. Sandbox access does not.", - "id": "MerchantOrderReturn", + "Datafeed": { + "description": "Datafeed configuration data.", + "id": "Datafeed", "properties": { - "creationDate": { - "description": "The date of creation of the return, in ISO 8601 format.", + "attributeLanguage": { + "description": "The two-letter ISO 639-1 language in which the attributes are defined in the data feed.", "type": "string" }, - "merchantOrderId": { - "description": "Merchant defined order ID.", + "contentType": { + "description": "Required. The type of data feed. For product inventory feeds, only feeds for local stores, not online stores, are supported. Acceptable values are: - \"`local products`\" - \"`product inventory`\" - \"`products`\" ", "type": "string" }, - "orderId": { - "description": "Google order ID.", + "fetchSchedule": { + "$ref": "DatafeedFetchSchedule", + "description": "Fetch schedule for the feed file." + }, + "fileName": { + "description": "Required. The filename of the feed. All feeds must have a unique file name.", "type": "string" }, - "orderReturnId": { - "description": "Order return ID generated by Google.", + "format": { + "$ref": "DatafeedFormat", + "description": "Format of the feed file." + }, + "id": { + "description": "Required for update. The ID of the data feed.", + "format": "int64", "type": "string" }, - "returnItems": { - "description": "Items of the return.", - "items": { - "$ref": "MerchantOrderReturnItem" - }, - "type": "array" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeed`\"", + "type": "string" }, - "returnPricingInfo": { - "$ref": "ReturnPricingInfo", - "description": "Information about shipping costs." + "name": { + "description": "Required for insert. A descriptive name of the data feed.", + "type": "string" }, - "returnShipments": { - "description": "Shipments of the return.", + "targets": { + "description": "The targets this feed should apply to (country, language, destinations).", "items": { - "$ref": "ReturnShipment" + "$ref": "DatafeedTarget" }, "type": "array" } }, "type": "object" }, - "MerchantOrderReturnItem": { - "id": "MerchantOrderReturnItem", + "DatafeedFetchSchedule": { + "description": "The required fields vary based on the frequency of fetching. For a monthly fetch schedule, day_of_month and hour are required. For a weekly fetch schedule, weekday and hour are required. For a daily fetch schedule, only hour is required.", + "id": "DatafeedFetchSchedule", "properties": { - "customerReturnReason": { - "$ref": "CustomerReturnReason", - "description": "The reason that the customer chooses to return an item." + "dayOfMonth": { + "description": "The day of the month the feed file should be fetched (1-31).", + "format": "uint32", + "type": "integer" }, - "itemId": { - "description": "Product level item ID. If the returned items are of the same product, they will have the same ID.", + "fetchUrl": { + "description": "The URL where the feed file can be fetched. Google Merchant Center will support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP protocols, so the value will need to be a valid link using one of those four protocols.", "type": "string" }, - "merchantRejectionReason": { - "$ref": "MerchantRejectionReason", - "description": "The reason that the merchant chose to reject an item return." - }, - "merchantReturnReason": { - "$ref": "RefundReason", - "description": "The reason that merchant chooses to accept a return item." - }, - "product": { - "$ref": "OrderLineItemProduct", - "description": "Product data from the time of the order placement." + "hour": { + "description": "The hour of the day the feed file should be fetched (0-23).", + "format": "uint32", + "type": "integer" }, - "refundableAmount": { - "$ref": "MonetaryAmount", - "description": "Maximum amount that can be refunded for this return item." + "minuteOfHour": { + "description": "The minute of the hour the feed file should be fetched (0-59). Read-only.", + "format": "uint32", + "type": "integer" }, - "returnItemId": { - "description": "Unit level ID for the return item. Different units of the same product will have different IDs.", + "password": { + "description": "An optional password for fetch_url.", "type": "string" }, - "returnShipmentIds": { - "description": "IDs of the return shipments that this return item belongs to.", - "items": { - "type": "string" - }, - "type": "array" - }, - "shipmentGroupId": { - "description": "ID of the original shipment group. Provided for shipments with invoice support.", - "type": "string" + "paused": { + "description": "Whether the scheduled fetch is paused or not.", + "type": "boolean" }, - "shipmentUnitId": { - "description": "ID of the shipment unit assigned by the merchant. Provided for shipments with invoice support.", + "timeZone": { + "description": "Time zone used for schedule. UTC by default. For example, \"America/Los_Angeles\".", "type": "string" }, - "state": { - "description": "State of the item. Acceptable values are: - \"`canceled`\" - \"`new`\" - \"`received`\" - \"`refunded`\" - \"`rejected`\" ", - "type": "string" - } - }, - "type": "object" - }, - "MerchantRejectionReason": { - "id": "MerchantRejectionReason", - "properties": { - "description": { - "description": "Description of the reason.", + "username": { + "description": "An optional user name for fetch_url.", "type": "string" }, - "reasonCode": { - "description": "Code of the rejection reason.", + "weekday": { + "description": "The day of the week the feed file should be fetched. Acceptable values are: - \"`monday`\" - \"`tuesday`\" - \"`wednesday`\" - \"`thursday`\" - \"`friday`\" - \"`saturday`\" - \"`sunday`\" ", "type": "string" } }, "type": "object" }, - "MethodQuota": { - "description": "The quota information per method in the Content API.", - "id": "MethodQuota", + "DatafeedFormat": { + "id": "DatafeedFormat", "properties": { - "method": { - "description": "Output only. The method name, for example `products.list`. Method name does not contain version because quota can be shared between different API versions of the same method.", - "readOnly": true, - "type": "string" - }, - "quotaLimit": { - "description": "Output only. The maximum number of calls allowed per day for the method.", - "format": "int64", - "readOnly": true, + "columnDelimiter": { + "description": "Delimiter for the separation of values in a delimiter-separated values feed. If not specified, the delimiter will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - \"`pipe`\" - \"`tab`\" - \"`tilde`\" ", "type": "string" }, - "quotaMinuteLimit": { - "description": "Output only. The maximum number of calls allowed per minute for the method.", - "format": "int64", - "readOnly": true, + "fileEncoding": { + "description": "Character encoding scheme of the data feed. If not specified, the encoding will be auto-detected. Acceptable values are: - \"`latin-1`\" - \"`utf-16be`\" - \"`utf-16le`\" - \"`utf-8`\" - \"`windows-1252`\" ", "type": "string" }, - "quotaUsage": { - "description": "Output only. The current quota usage, meaning the number of calls already made to the method per day. Usage is reset every day at 12 PM midday UTC.", - "format": "int64", - "readOnly": true, + "quotingMode": { + "description": "Specifies how double quotes are interpreted. If not specified, the mode will be auto-detected. Ignored for non-DSV data feeds. Acceptable values are: - \"`normal character`\" - \"`value quoting`\" ", "type": "string" } }, "type": "object" }, - "Metrics": { - "description": "Performance metrics. Values are only set for metrics requested explicitly in the request's search query.", - "id": "Metrics", + "DatafeedStatus": { + "description": "The status of a datafeed, that is, the result of the last retrieval of the datafeed computed asynchronously when the feed processing is finished.", + "id": "DatafeedStatus", "properties": { - "aos": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average order size - the average number of items in an order. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "double", - "type": "number" - }, - "aovMicros": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average order value in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) - the average value (total price of items) of all placed orders. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "double", - "type": "number" - }, - "clicks": { - "description": "Number of clicks.", - "format": "int64", - "type": "string" - }, - "conversionRate": { - "description": "Number of conversions divided by the number of clicks, reported on the impression date. The metric is currently available only for the `FREE_PRODUCT_LISTING` program.", - "format": "double", - "type": "number" - }, - "conversionValueMicros": { - "description": "Value of conversions in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) attributed to the product, reported on the conversion date. The metric is currently available only for the `FREE_PRODUCT_LISTING` program. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.", - "format": "int64", - "type": "string" - }, - "conversions": { - "description": "Number of conversions attributed to the product, reported on the conversion date. Depending on the attribution model, a conversion might be distributed across multiple clicks, where each click gets its own credit assigned. This metric is a sum of all such credits. The metric is currently available only for the `FREE_PRODUCT_LISTING` program.", - "format": "double", - "type": "number" - }, - "ctr": { - "description": "Click-through rate - the number of clicks merchant's products receive (clicks) divided by the number of times the products are shown (impressions).", - "format": "double", - "type": "number" - }, - "daysToShip": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average number of days between an order being placed and the order being fully shipped, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "double", - "type": "number" - }, - "impressions": { - "description": "Number of times merchant's products are shown.", - "format": "int64", + "country": { + "description": "The country for which the status is reported, represented as a CLDR territory code.", "type": "string" }, - "itemDaysToShip": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average number of days between an item being ordered and the item being **This metric cannot be segmented by customer_country_code.**", - "format": "double", - "type": "number" - }, - "itemFillRate": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Percentage of shipped items in relation to all finalized items (shipped or rejected by the merchant; unshipped items are not taken into account), reported on the order date. Item fill rate is lowered by merchant rejections. **This metric cannot be segmented by customer_country_code.**", - "format": "double", - "type": "number" - }, - "orderedItemSalesMicros": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of ordered items in micros (1 millionth of a standard unit, 1 USD = 1000000 micros). Excludes shipping, taxes (US only), and customer cancellations that happened within 30 minutes of placing the order. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "datafeedId": { + "description": "The ID of the feed for which the status is reported.", + "format": "uint64", "type": "string" }, - "orderedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", - "type": "string" + "errors": { + "description": "The list of errors occurring in the feed.", + "items": { + "$ref": "DatafeedStatusError" + }, + "type": "array" }, - "orders": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of placed orders. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "int64", + "feedLabel": { + "description": "The feed label status is reported for.", "type": "string" }, - "rejectedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items canceled by the merchant, reported on the order date. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "itemsTotal": { + "description": "The number of items in the feed that were processed.", + "format": "uint64", "type": "string" }, - "returnRate": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of returned items divided by the total price of shipped items, reported on the order date. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", - "format": "double", - "type": "number" - }, - "returnedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items sent back for return, reported on the date when the merchant accepted the return. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "itemsValid": { + "description": "The number of items in the feed that were valid.", + "format": "uint64", "type": "string" }, - "returnsMicros": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of ordered items sent back for return in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), reported on the date when the merchant accepted the return. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedStatus`\"", "type": "string" }, - "shippedItemSalesMicros": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of shipped items in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), reported on the order date. Excludes shipping and taxes (US only). The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "language": { + "description": "The two-letter ISO 639-1 language for which the status is reported.", "type": "string" }, - "shippedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of shipped items, reported on the shipment date. **This metric cannot be segmented by customer_country_code.**", - "format": "int64", + "lastUploadDate": { + "description": "The last date at which the feed was uploaded.", "type": "string" }, - "shippedOrders": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of fully shipped orders, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "int64", + "processingStatus": { + "description": "The processing status of the feed. Acceptable values are: - \"`\"`failure`\": The feed could not be processed or all items had errors.`\" - \"`in progress`\": The feed is being processed. - \"`none`\": The feed has not yet been processed. For example, a feed that has never been uploaded will have this processing status. - \"`success`\": The feed was processed successfully, though some items might have had errors. ", "type": "string" }, - "unshippedItems": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items not shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped items over the days in the queried period. **This metric cannot be segmented by customer_country_code.**", - "format": "double", - "type": "number" - }, - "unshippedOrders": { - "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of orders not shipped or partially shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped orders over the days in the queried period. **This metric cannot be segmented by product dimensions and customer_country_code.**", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "MinimumOrderValueTable": { - "id": "MinimumOrderValueTable", - "properties": { - "storeCodeSetWithMovs": { + "warnings": { + "description": "The list of errors occurring in the feed.", "items": { - "$ref": "MinimumOrderValueTableStoreCodeSetWithMov" + "$ref": "DatafeedStatusError" }, "type": "array" } }, "type": "object" }, - "MinimumOrderValueTableStoreCodeSetWithMov": { - "description": "A list of store code sets sharing the same minimum order value. At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency.", - "id": "MinimumOrderValueTableStoreCodeSetWithMov", + "DatafeedStatusError": { + "description": "An error occurring in the feed, like \"invalid price\".", + "id": "DatafeedStatusError", "properties": { - "storeCodes": { - "description": "A list of unique store codes or empty for the catch all.", + "code": { + "description": "The code of the error, for example, \"validation/invalid_value\".", + "type": "string" + }, + "count": { + "description": "The number of occurrences of the error in the feed.", + "format": "uint64", + "type": "string" + }, + "examples": { + "description": "A list of example occurrences of the error, grouped by product.", "items": { - "type": "string" + "$ref": "DatafeedStatusExample" }, "type": "array" }, - "value": { - "$ref": "Price", - "description": "The minimum order value for the given stores." + "message": { + "description": "The error message, for example, \"Invalid price\".", + "type": "string" } }, "type": "object" }, - "MonetaryAmount": { - "id": "MonetaryAmount", + "DatafeedStatusExample": { + "description": "An example occurrence for a particular error.", + "id": "DatafeedStatusExample", "properties": { - "priceAmount": { - "$ref": "Price", - "description": "The pre-tax or post-tax price depends on the location of the order. - For countries (for example, \"US\". where price attribute excludes tax, this field corresponds to the pre-tax value. - For coutries (for example, \"France\") where price attribute includes tax, this field corresponds to the post-tax value ." + "itemId": { + "description": "The ID of the example item.", + "type": "string" }, - "taxAmount": { - "$ref": "Price", - "description": "Tax value, present only for countries where price attribute excludes tax (for example, \"US\". No tax is referenced as 0 value with the corresponding `currency`." - } - }, - "type": "object" - }, - "OnboardBuyOnGoogleProgramRequest": { - "description": "Request message for the OnboardProgram method.", - "id": "OnboardBuyOnGoogleProgramRequest", - "properties": { - "customerServiceEmail": { - "description": "The customer service email.", + "lineNumber": { + "description": "Line number in the data feed where the example is found.", + "format": "uint64", + "type": "string" + }, + "value": { + "description": "The problematic value.", "type": "string" } }, "type": "object" }, - "Order": { - "description": "Order. Production access (all methods) requires the order manager role. Sandbox access does not.", - "id": "Order", + "DatafeedTarget": { + "id": "DatafeedTarget", "properties": { - "acknowledged": { - "description": "Whether the order was acknowledged.", - "type": "boolean" + "country": { + "description": "Deprecated. Use `feedLabel` instead. The country where the items in the feed will be included in the search index, represented as a CLDR territory code.", + "type": "string" }, - "annotations": { - "description": "List of key-value pairs that are attached to a given order.", + "excludedDestinations": { + "description": "The list of [destinations to exclude](//support.google.com/merchants/answer/6324486) for this target (corresponds to cleared check boxes in Merchant Center). Products that are excluded from all destinations for more than 7 days are automatically deleted.", "items": { - "$ref": "OrderOrderAnnotation" + "type": "string" }, "type": "array" }, - "billingAddress": { - "$ref": "OrderAddress", - "description": "The billing address." - }, - "customer": { - "$ref": "OrderCustomer", - "description": "The details of the customer who placed the order." - }, - "deliveryDetails": { - "$ref": "OrderDeliveryDetails", - "description": "Delivery details for shipments of type `delivery`." - }, - "id": { - "description": "The REST ID of the order. Globally unique.", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#order`\"", + "feedLabel": { + "description": "Feed label for the DatafeedTarget. Either `country` or `feedLabel` is required. If both `feedLabel` and `country` is specified, the values must match. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-).", "type": "string" }, - "lineItems": { - "description": "Line items that are ordered.", + "includedDestinations": { + "description": "The list of [destinations to include](//support.google.com/merchants/answer/7501026) for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`.", "items": { - "$ref": "OrderLineItem" + "type": "string" }, "type": "array" }, - "merchantId": { - "format": "uint64", - "type": "string" - }, - "merchantOrderId": { - "description": "Merchant-provided ID of the order.", - "type": "string" - }, - "netPriceAmount": { - "$ref": "Price", - "description": "The net amount for the order (price part). For example, if an order was originally for $100 and a refund was issued for $20, the net amount will be $80." - }, - "netTaxAmount": { - "$ref": "Price", - "description": "The net amount for the order (tax part). Note that in certain cases due to taxable base adjustment `netTaxAmount` might not match to a sum of tax field across all lineItems and refunds." - }, - "paymentStatus": { - "description": "The status of the payment. Acceptable values are: - \"`paymentCaptured`\" - \"`paymentRejected`\" - \"`paymentSecured`\" - \"`pendingAuthorization`\" ", - "type": "string" - }, - "pickupDetails": { - "$ref": "OrderPickupDetails", - "description": "Pickup details for shipments of type `pickup`." - }, - "placedDate": { - "description": "The date when the order was placed, in ISO 8601 format.", + "language": { + "description": "The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for `targets[].country`.", "type": "string" }, - "promotions": { - "description": "Promotions associated with the order. To determine which promotions apply to which products, check the `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` field for each promotion. If a promotion is applied to more than 1 offerId, divide the discount value by the number of affected offers to determine how much discount to apply to each offerId. Examples: 1. To calculate price paid by the customer for a single line item including the discount: For each promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` amount from the `LineItems[].Price.value`. 2. To calculate price paid by the customer for a single line item including the discount in case of multiple quantity: For each promotion, divide the `LineItems[].adjustments[].priceAdjustment.value` by the quantity of products then subtract the resulting value from the `LineItems[].Product.Price.value` for each quantity item. Only 1 promotion can be applied to an offerId in a given order. To refund an item which had a promotion applied to it, make sure to refund the amount after first subtracting the promotion discount from the item price. More details about the program are here.", - "items": { - "$ref": "OrderPromotion" - }, - "type": "array" - }, - "refunds": { - "description": "Refunds for the order.", + "targetCountries": { + "description": "The countries where the items may be displayed. Represented as a CLDR territory code. Will be ignored for \"product inventory\" feeds.", "items": { - "$ref": "OrderRefund" + "type": "string" }, "type": "array" - }, - "shipments": { - "description": "Shipments of the order.", + } + }, + "type": "object" + }, + "DatafeedsCustomBatchRequest": { + "id": "DatafeedsCustomBatchRequest", + "properties": { + "entries": { + "description": "The request entries to be processed in the batch.", "items": { - "$ref": "OrderShipment" + "$ref": "DatafeedsCustomBatchRequestEntry" }, "type": "array" + } + }, + "type": "object" + }, + "DatafeedsCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch datafeeds request.", + "id": "DatafeedsCustomBatchRequestEntry", + "properties": { + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" }, - "shippingCost": { - "$ref": "Price", - "description": "The total cost of shipping for all items." + "datafeed": { + "$ref": "Datafeed", + "description": "The data feed to insert." }, - "shippingCostTax": { - "$ref": "Price", - "description": "The tax for the total shipping cost." + "datafeedId": { + "description": "The ID of the data feed to get, delete or fetch.", + "format": "uint64", + "type": "string" }, - "status": { - "description": "The status of the order. Acceptable values are: - \"`canceled`\" - \"`delivered`\" - \"`inProgress`\" - \"`partiallyDelivered`\" - \"`partiallyReturned`\" - \"`partiallyShipped`\" - \"`pendingShipment`\" - \"`returned`\" - \"`shipped`\" ", + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "taxCollector": { - "description": "The party responsible for collecting and remitting taxes. Acceptable values are: - \"`marketplaceFacilitator`\" - \"`merchant`\" ", + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`delete`\" - \"`fetchNow`\" - \"`get`\" - \"`insert`\" - \"`update`\" ", "type": "string" } }, "type": "object" }, - "OrderAddress": { - "id": "OrderAddress", + "DatafeedsCustomBatchResponse": { + "id": "DatafeedsCustomBatchResponse", "properties": { - "country": { - "description": "CLDR country code (for example, \"US\").", - "type": "string" - }, - "fullAddress": { - "description": "Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States ", + "entries": { + "description": "The result of the execution of the batch requests.", "items": { - "type": "string" + "$ref": "DatafeedsCustomBatchResponseEntry" }, "type": "array" }, - "isPostOfficeBox": { - "description": "Whether the address is a post office box.", - "type": "boolean" - }, - "locality": { - "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsCustomBatchResponse`\".", "type": "string" + } + }, + "type": "object" + }, + "DatafeedsCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch datafeeds response.", + "id": "DatafeedsCustomBatchResponseEntry", + "properties": { + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "postalCode": { - "description": "Postal Code or ZIP (for example, \"94043\").", - "type": "string" + "datafeed": { + "$ref": "Datafeed", + "description": "The requested data feed. Defined if and only if the request was successful." }, - "recipientName": { - "description": "Name of the recipient.", + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." + } + }, + "type": "object" + }, + "DatafeedsFetchNowResponse": { + "id": "DatafeedsFetchNowResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsFetchNowResponse`\".", + "type": "string" + } + }, + "type": "object" + }, + "DatafeedsListResponse": { + "id": "DatafeedsListResponse", + "properties": { + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedsListResponse`\".", "type": "string" }, - "region": { - "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", + "nextPageToken": { + "description": "The token for the retrieval of the next page of datafeeds.", "type": "string" }, - "streetAddress": { - "description": "Street-level part of the address. Use `\\n` to add a second line.", + "resources": { "items": { - "type": "string" + "$ref": "Datafeed" + }, + "type": "array" + } + }, + "type": "object" + }, + "DatafeedstatusesCustomBatchRequest": { + "id": "DatafeedstatusesCustomBatchRequest", + "properties": { + "entries": { + "description": "The request entries to be processed in the batch.", + "items": { + "$ref": "DatafeedstatusesCustomBatchRequestEntry" }, "type": "array" } }, "type": "object" }, - "OrderCancellation": { - "id": "OrderCancellation", + "DatafeedstatusesCustomBatchRequestEntry": { + "description": "A batch entry encoding a single non-batch datafeedstatuses request.", + "id": "DatafeedstatusesCustomBatchRequestEntry", "properties": { - "actor": { - "description": "The actor that created the cancellation. Acceptable values are: - \"`customer`\" - \"`googleBot`\" - \"`googleCustomerService`\" - \"`googlePayments`\" - \"`googleSabre`\" - \"`merchant`\" ", + "batchId": { + "description": "An entry ID, unique within the batch request.", + "format": "uint32", + "type": "integer" + }, + "country": { + "description": "Deprecated. Use `feedLabel` instead. The country to get the datafeed status for. If this parameter is provided, then `language` must also be provided. Note that for multi-target datafeeds this parameter is required.", + "type": "string" + }, + "datafeedId": { + "description": "The ID of the data feed to get.", + "format": "uint64", "type": "string" }, - "creationDate": { - "description": "Date on which the cancellation has been created, in ISO 8601 format.", + "feedLabel": { + "description": "The feed label to get the datafeed status for. If this parameter is provided, then `language` must also be provided. Note that for multi-target datafeeds this parameter is required.", "type": "string" }, - "quantity": { - "description": "The quantity that was canceled.", - "format": "uint32", - "type": "integer" + "language": { + "description": "The language to get the datafeed status for. If this parameter is provided then `country` must also be provided. Note that for multi-target datafeeds this parameter is required.", + "type": "string" }, - "reason": { - "description": "The reason for the cancellation. Orders that are canceled with a noInventory reason will lead to the removal of the product from Buy on Google until you make an update to that product. This won't affect your Shopping ads. Acceptable values are: - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`customerCanceled`\" - \"`customerInitiatedCancel`\" - \"`customerSupportRequested`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceError`\" - \"`returnRefundAbuse`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ", + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`get`\" ", "type": "string" } }, "type": "object" }, - "OrderCustomer": { - "id": "OrderCustomer", + "DatafeedstatusesCustomBatchResponse": { + "id": "DatafeedstatusesCustomBatchResponse", "properties": { - "fullName": { - "description": "Full name of the customer.", - "type": "string" + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "DatafeedstatusesCustomBatchResponseEntry" + }, + "type": "array" }, - "invoiceReceivingEmail": { - "description": "Email address for the merchant to send value-added tax or invoice documentation of the order. Only the last document sent is made available to the customer. For more information, see About automated VAT invoicing for Buy on Google.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedstatusesCustomBatchResponse`\".", "type": "string" - }, - "loyaltyInfo": { - "$ref": "OrderCustomerLoyaltyInfo", - "description": "Loyalty program information." - }, - "marketingRightsInfo": { - "$ref": "OrderCustomerMarketingRightsInfo", - "description": "Customer's marketing preferences. Contains the marketing opt-in information that is current at the time that the merchant call. User preference selections can change from one order to the next so preferences must be checked with every order." } }, "type": "object" }, - "OrderCustomerLoyaltyInfo": { - "id": "OrderCustomerLoyaltyInfo", + "DatafeedstatusesCustomBatchResponseEntry": { + "description": "A batch entry encoding a single non-batch datafeedstatuses response.", + "id": "DatafeedstatusesCustomBatchResponseEntry", "properties": { - "loyaltyNumber": { - "description": "The loyalty card/membership number.", - "type": "string" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "name": { - "description": "Name of card/membership holder, this field will be populated when", - "type": "string" + "datafeedStatus": { + "$ref": "DatafeedStatus", + "description": "The requested data feed status. Defined if and only if the request was successful." + }, + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." } }, "type": "object" }, - "OrderCustomerMarketingRightsInfo": { - "id": "OrderCustomerMarketingRightsInfo", + "DatafeedstatusesListResponse": { + "id": "DatafeedstatusesListResponse", "properties": { - "explicitMarketingPreference": { - "description": "Last known customer selection regarding marketing preferences. In certain cases this selection might not be known, so this field would be empty. If a customer selected `granted` in their most recent order, they can be subscribed to marketing emails. Customers who have chosen `denied` must not be subscribed, or must be unsubscribed if already opted-in. Acceptable values are: - \"`denied`\" - \"`granted`\" ", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#datafeedstatusesListResponse`\".", "type": "string" }, - "lastUpdatedTimestamp": { - "description": "Timestamp when last time marketing preference was updated. Could be empty, if user wasn't offered a selection yet.", + "nextPageToken": { + "description": "The token for the retrieval of the next page of datafeed statuses.", "type": "string" }, - "marketingEmailAddress": { - "description": "Email address that can be used for marketing purposes. The field may be empty even if `explicitMarketingPreference` is 'granted'. This happens when retrieving an old order from the customer who deleted their account.", - "type": "string" + "resources": { + "items": { + "$ref": "DatafeedStatus" + }, + "type": "array" } }, "type": "object" }, - "OrderDeliveryDetails": { - "id": "OrderDeliveryDetails", + "Date": { + "description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp", + "id": "Date", "properties": { - "address": { - "$ref": "OrderAddress", - "description": "The delivery address" + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" }, - "phoneNumber": { - "description": "The phone number of the person receiving the delivery.", - "type": "string" + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "OrderLineItem": { - "id": "OrderLineItem", + "DateTime": { + "description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", + "id": "DateTime", "properties": { - "adjustments": { - "description": "Price and tax adjustments applied on the line item.", - "items": { - "$ref": "OrderLineItemAdjustment" - }, - "type": "array" - }, - "annotations": { - "description": "Annotations that are attached to the line item.", - "items": { - "$ref": "OrderMerchantProvidedAnnotation" - }, - "type": "array" - }, - "cancellations": { - "description": "Cancellations of the line item.", - "items": { - "$ref": "OrderCancellation" - }, - "type": "array" - }, - "id": { - "description": "The ID of the line item.", - "type": "string" - }, - "price": { - "$ref": "Price", - "description": "Total price for the line item. For example, if two items for $10 are purchased, the total price will be $20." - }, - "product": { - "$ref": "OrderLineItemProduct", - "description": "Product data as seen by customer from the time of the order placement. Note that certain attributes values (for example, title or gtin) might be reformatted and no longer match values submitted through product feed." - }, - "quantityCanceled": { - "description": "Number of items canceled.", - "format": "uint32", - "type": "integer" - }, - "quantityDelivered": { - "description": "Number of items delivered.", - "format": "uint32", - "type": "integer" - }, - "quantityOrdered": { - "description": "Number of items ordered.", - "format": "uint32", + "day": { + "description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", + "format": "int32", "type": "integer" }, - "quantityPending": { - "description": "Number of items pending.", - "format": "uint32", + "hours": { + "description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", "type": "integer" }, - "quantityReadyForPickup": { - "description": "Number of items ready for pickup.", - "format": "uint32", + "minutes": { + "description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", + "format": "int32", "type": "integer" }, - "quantityReturned": { - "description": "Number of items returned.", - "format": "uint32", + "month": { + "description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", + "format": "int32", "type": "integer" }, - "quantityShipped": { - "description": "Number of items shipped.", - "format": "uint32", + "nanos": { + "description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", + "format": "int32", "type": "integer" }, - "quantityUndeliverable": { - "description": "Number of items undeliverable.", - "format": "uint32", + "seconds": { + "description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", "type": "integer" }, - "returnInfo": { - "$ref": "OrderLineItemReturnInfo", - "description": "Details of the return policy for the line item." - }, - "returns": { - "description": "Returns of the line item.", - "items": { - "$ref": "OrderReturn" - }, - "type": "array" + "timeZone": { + "$ref": "TimeZone", + "description": "Time zone." }, - "shippingDetails": { - "$ref": "OrderLineItemShippingDetails", - "description": "Details of the requested shipping for the line item." + "utcOffset": { + "description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", + "format": "google-duration", + "type": "string" }, - "tax": { - "$ref": "Price", - "description": "Total tax amount for the line item. For example, if two items are purchased, and each have a cost tax of $2, the total tax amount will be $4." + "year": { + "description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "OrderLineItemAdjustment": { - "id": "OrderLineItemAdjustment", + "DeliveryArea": { + "description": "A delivery area for the product. Only one of `countryCode` or `postalCodeRange` must be set.", + "id": "DeliveryArea", "properties": { - "priceAdjustment": { - "$ref": "Price", - "description": "Adjustment for total price of the line item." + "countryCode": { + "description": "Required. The country that the product can be delivered to. Submit a [unicode CLDR region](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) such as `US` or `CH`.", + "type": "string" }, - "taxAdjustment": { - "$ref": "Price", - "description": "Adjustment for total tax of the line item." + "postalCodeRange": { + "$ref": "DeliveryAreaPostalCodeRange", + "description": "A postal code, postal code range or postal code prefix that defines this area. Limited to US and AUS." }, - "type": { - "description": "Type of this adjustment. Acceptable values are: - \"`promotion`\" ", + "regionCode": { + "description": "A state, territory, or prefecture. This is supported for the United States, Australia, and Japan. Provide a subdivision code from the ISO 3166-2 code tables ([US](https://en.wikipedia.org/wiki/ISO_3166-2:US), [AU](https://en.wikipedia.org/wiki/ISO_3166-2:AU), or [JP](https://en.wikipedia.org/wiki/ISO_3166-2:JP)) without country prefix (for example, `\"NY\"`, `\"NSW\"`, `\"03\"`).", "type": "string" } }, "type": "object" }, - "OrderLineItemProduct": { - "id": "OrderLineItemProduct", + "DeliveryAreaPostalCodeRange": { + "description": "A range of postal codes that defines the delivery area. Only set `firstPostalCode` when specifying a single postal code.", + "id": "DeliveryAreaPostalCodeRange", "properties": { - "brand": { - "description": "Brand of the item.", + "firstPostalCode": { + "description": "Required. A postal code or a pattern of the form prefix* denoting the inclusive lower bound of the range defining the area. Examples values: `\"94108\"`, `\"9410*\"`, `\"9*\"`.", "type": "string" }, - "condition": { - "description": "Condition or state of the item. Acceptable values are: - \"`new`\" - \"`refurbished`\" - \"`used`\" ", + "lastPostalCode": { + "description": "A postal code or a pattern of the form prefix* denoting the inclusive upper bound of the range defining the area (for example [070* - 078*] results in the range [07000 - 07899]). It must have the same length as `firstPostalCode`: if `firstPostalCode` is a postal code then `lastPostalCode` must be a postal code too; if firstPostalCode is a pattern then `lastPostalCode` must be a pattern with the same prefix length. Ignored if not set, then the area is defined as being all the postal codes matching `firstPostalCode`.", "type": "string" + } + }, + "type": "object" + }, + "DeliveryTime": { + "id": "DeliveryTime", + "properties": { + "cutoffTime": { + "$ref": "CutoffTime", + "description": "Business days cutoff time definition. If not configured, the cutoff time will be defaulted to 8AM PST. If local delivery, use Service.StoreConfig.CutoffConfig." }, - "contentLanguage": { - "description": "The two-letter ISO 639-1 language code for the item.", - "type": "string" + "handlingBusinessDayConfig": { + "$ref": "BusinessDayConfig", + "description": "The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed." }, - "fees": { - "description": "Associated fees at order creation time.", + "holidayCutoffs": { + "description": "Holiday cutoff definitions. If configured, they specify order cutoff times for holiday-specific shipping.", "items": { - "$ref": "OrderLineItemProductFee" + "$ref": "HolidayCutoff" }, "type": "array" }, - "gtin": { - "description": "Global Trade Item Number (GTIN) of the item.", - "type": "string" - }, - "id": { - "description": "The REST ID of the product.", - "type": "string" - }, - "imageLink": { - "description": "URL of an image of the item.", - "type": "string" - }, - "itemGroupId": { - "description": "Shared identifier for all variants of the same product.", - "type": "string" - }, - "mpn": { - "description": "Manufacturer Part Number (MPN) of the item.", - "type": "string" + "maxHandlingTimeInDays": { + "description": "Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `minHandlingTimeInDays`.", + "format": "uint32", + "type": "integer" }, - "offerId": { - "description": "An identifier of the item.", - "type": "string" + "maxTransitTimeInDays": { + "description": "Maximum number of business days that are spent in transit. 0 means same day delivery, 1 means next day delivery. Must be greater than or equal to `minTransitTimeInDays`.", + "format": "uint32", + "type": "integer" }, - "price": { - "$ref": "Price", - "description": "Price of the item." + "minHandlingTimeInDays": { + "description": "Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped.", + "format": "uint32", + "type": "integer" }, - "shownImage": { - "description": "URL to the cached image shown to the user when order was placed.", - "type": "string" + "minTransitTimeInDays": { + "description": "Minimum number of business days that are spent in transit. 0 means same day delivery, 1 means next day delivery. Either `{min,max}TransitTimeInDays` or `transitTimeTable` must be set, but not both.", + "format": "uint32", + "type": "integer" }, - "targetCountry": { - "description": "The CLDR territory code of the target country of the product.", - "type": "string" + "transitBusinessDayConfig": { + "$ref": "BusinessDayConfig", + "description": "The business days during which orders can be in-transit. If not provided, Monday to Friday business days will be assumed." }, - "title": { - "description": "The title of the product.", - "type": "string" + "transitTimeTable": { + "$ref": "TransitTable", + "description": "Transit time table, number of business days spent in transit based on row and column dimensions. Either `{min,max}TransitTimeInDays` or `transitTimeTable` can be set, but not both." }, - "variantAttributes": { - "description": "Variant attributes for the item. These are dimensions of the product, such as color, gender, material, pattern, and size. You can find a comprehensive list of variant attributes here.", + "warehouseBasedDeliveryTimes": { + "description": "Indicates that the delivery time should be calculated per warehouse (shipping origin location) based on the settings of the selected carrier. When set, no other transit time related field in DeliveryTime should be set.", "items": { - "$ref": "OrderLineItemProductVariantAttribute" + "$ref": "WarehouseBasedDeliveryTime" }, "type": "array" } }, "type": "object" }, - "OrderLineItemProductFee": { - "id": "OrderLineItemProductFee", - "properties": { - "amount": { - "$ref": "Price", - "description": "Amount of the fee." - }, - "name": { - "description": "Name of the fee.", - "type": "string" - } - }, - "type": "object" - }, - "OrderLineItemProductVariantAttribute": { - "id": "OrderLineItemProductVariantAttribute", + "Distance": { + "description": "Distance represented by an integer and unit.", + "id": "Distance", "properties": { - "dimension": { - "description": "The dimension of the variant.", + "unit": { + "description": "The distance unit. Acceptable values are `None`, `Miles`, and `Kilometers`.", "type": "string" }, "value": { - "description": "The value for the dimension.", + "description": "The distance represented as a number.", + "format": "int64", "type": "string" } }, "type": "object" }, - "OrderLineItemReturnInfo": { - "id": "OrderLineItemReturnInfo", + "ECommercePlatformLinkInfo": { + "description": "Additional information required for E_COMMERCE_PLATFORM link type.", + "id": "ECommercePlatformLinkInfo", "properties": { - "daysToReturn": { - "description": "Required. How many days later the item can be returned.", - "format": "int32", - "type": "integer" - }, - "isReturnable": { - "description": "Required. Whether the item is returnable.", - "type": "boolean" - }, - "policyUrl": { - "description": "Required. URL of the item return policy.", + "externalAccountId": { + "description": "The id used by the third party service provider to identify the merchant.", "type": "string" } }, "type": "object" }, - "OrderLineItemShippingDetails": { - "id": "OrderLineItemShippingDetails", + "Error": { + "description": "An error returned by the API.", + "id": "Error", "properties": { - "deliverByDate": { - "description": "Required. The delivery by date, in ISO 8601 format.", + "domain": { + "description": "The domain of the error.", "type": "string" }, - "method": { - "$ref": "OrderLineItemShippingDetailsMethod", - "description": "Required. Details of the shipping method." - }, - "pickupPromiseInMinutes": { - "description": "The promised time in minutes in which the order will be ready for pickup. This only applies to buy-online-pickup-in-store same-day order.", - "format": "uint32", - "type": "integer" - }, - "shipByDate": { - "description": "Required. The ship by date, in ISO 8601 format.", + "message": { + "description": "A description of the error.", "type": "string" }, - "type": { - "description": "Type of shipment. Indicates whether `deliveryDetails` or `pickupDetails` is applicable for this shipment. Acceptable values are: - \"`delivery`\" - \"`pickup`\" ", + "reason": { + "description": "The error code.", "type": "string" } }, "type": "object" }, - "OrderLineItemShippingDetailsMethod": { - "id": "OrderLineItemShippingDetailsMethod", + "Errors": { + "description": "A list of errors returned by a failed batch entry.", + "id": "Errors", "properties": { - "carrier": { - "description": "The carrier for the shipping. Optional. See `shipments[].carrier` for a list of acceptable values.", - "type": "string" - }, - "maxDaysInTransit": { - "description": "Required. Maximum transit time.", + "code": { + "description": "The HTTP status of the first error in `errors`.", "format": "uint32", "type": "integer" }, - "methodName": { - "description": "Required. The name of the shipping method.", - "type": "string" - }, - "minDaysInTransit": { - "description": "Required. Minimum transit time.", - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "OrderMerchantProvidedAnnotation": { - "id": "OrderMerchantProvidedAnnotation", - "properties": { - "key": { - "description": "Key for additional merchant provided (as key-value pairs) annotation about the line item.", - "type": "string" + "errors": { + "description": "A list of errors.", + "items": { + "$ref": "Error" + }, + "type": "array" }, - "value": { - "description": "Value for additional merchant provided (as key-value pairs) annotation about the line item.", + "message": { + "description": "The message of the first error in `errors`.", "type": "string" } }, "type": "object" }, - "OrderOrderAnnotation": { - "id": "OrderOrderAnnotation", + "ExternalAction": { + "description": "Action that is implemented and performed outside of the third-party application. It should redirect the merchant to the provided URL of an external system where they can perform the action. For example to request a review in the Merchant Center.", + "id": "ExternalAction", "properties": { - "key": { - "description": "Key for additional google provided (as key-value pairs) annotation.", + "type": { + "description": "The type of external action.", + "enum": [ + "EXTERNAL_ACTION_TYPE_UNSPECIFIED", + "REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER", + "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER", + "LEGAL_APPEAL_IN_HELP_CENTER", + "VERIFY_IDENTITY_IN_MERCHANT_CENTER" + ], + "enumDescriptions": [ + "Default value. Will never be provided by the API.", + "Redirect to Merchant Center where the merchant can request a review for issue related to their product.", + "Redirect to Merchant Center where the merchant can request a review for issue related to their account.", + "Redirect to the form in Help Center where the merchant can request a legal appeal for the issue.", + "Redirect to Merchant Center where the merchant can perform identity verification." + ], "type": "string" }, - "value": { - "description": "Value for additional google provided (as key-value pairs) annotation.", + "uri": { + "description": "URL to external system, for example Merchant Center, where the merchant can perform the action.", "type": "string" } }, "type": "object" }, - "OrderPickupDetails": { - "id": "OrderPickupDetails", + "FreeListingsProgramStatus": { + "description": "Response message for GetFreeListingsProgramStatus.", + "id": "FreeListingsProgramStatus", "properties": { - "address": { - "$ref": "OrderAddress", - "description": "Address of the pickup location where the shipment should be sent. Note that `recipientName` in the address is the name of the business at the pickup location." + "globalState": { + "description": "State of the program. `ENABLED` if there are offers for at least one region.", + "enum": [ + "PROGRAM_STATE_UNSPECIFIED", + "NOT_ENABLED", + "NO_OFFERS_UPLOADED", + "ENABLED" + ], + "enumDescriptions": [ + "State is unknown.", + "Program is not enabled for any country.", + "No products have been uploaded for any region. Upload products to Merchant Center.", + "Program is enabled and offers are uploaded for at least one country." + ], + "type": "string" }, - "collectors": { - "description": "Collectors authorized to pick up shipment from the pickup location.", + "regionStatuses": { + "description": "Status of the program in each region. Regions with the same status and review eligibility are grouped together in `regionCodes`.", "items": { - "$ref": "OrderPickupDetailsCollector" + "$ref": "FreeListingsProgramStatusRegionStatus" }, "type": "array" - }, - "locationId": { - "description": "ID of the pickup location.", - "type": "string" - }, - "pickupType": { - "description": "The pickup type of this order. Acceptable values are: - \"`merchantStore`\" - \"`merchantStoreCurbside`\" - \"`merchantStoreLocker`\" - \"`thirdPartyPickupPoint`\" - \"`thirdPartyLocker`\" ", - "type": "string" } }, "type": "object" }, - "OrderPickupDetailsCollector": { - "id": "OrderPickupDetailsCollector", + "FreeListingsProgramStatusRegionStatus": { + "description": "Status of program and region.", + "id": "FreeListingsProgramStatusRegionStatus", "properties": { - "name": { - "description": "Name of the person picking up the shipment.", + "disapprovalDate": { + "description": "Date by which eligibilityStatus will go from `WARNING` to `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`.", "type": "string" }, - "phoneNumber": { - "description": "Phone number of the person picking up the shipment.", + "eligibilityStatus": { + "description": "Eligibility status of the standard free listing program.", + "enum": [ + "STATE_UNSPECIFIED", + "APPROVED", + "DISAPPROVED", + "WARNING", + "UNDER_REVIEW", + "PENDING_REVIEW", + "ONBOARDING" + ], + "enumDescriptions": [ + "State is not known.", + "If the account has no issues and review is completed successfully.", + "There are one or more issues that needs to be resolved for account to be active for the program. Detailed list of account issues are available in [accountstatuses](https://developers.google.com/shopping-content/reference/rest/v2.1/accountstatuses) API.", + "If account has issues but offers are servable. Some of the issue can make account DISAPPROVED after a certain deadline.", + "Account is under review.", + "Account is waiting for review to start.", + "Program is currently onboarding. Upload valid offers to complete onboarding." + ], "type": "string" - } - }, - "type": "object" - }, - "OrderPromotion": { - "id": "OrderPromotion", - "properties": { - "applicableItems": { - "description": "Items that this promotion may be applied to. If empty, there are no restrictions on applicable items and quantity. This field will also be empty for shipping promotions because shipping is not tied to any specific item.", + }, + "onboardingIssues": { + "description": "Issues that must be fixed to be eligible for review.", "items": { - "$ref": "OrderPromotionItem" + "type": "string" }, "type": "array" }, - "appliedItems": { - "description": "Items that this promotion have been applied to. Do not provide for `orders.createtestorder`. This field will be empty for shipping promotions because shipping is not tied to any specific item.", + "regionCodes": { + "description": "The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions with the same `eligibilityStatus` and `reviewEligibility`.", "items": { - "$ref": "OrderPromotionItem" + "type": "string" }, "type": "array" }, - "endTime": { - "description": "Promotion end time in ISO 8601 format. Date, time, and offset required, for example, \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\".", - "type": "string" - }, - "funder": { - "description": "Required. The party funding the promotion. Only `merchant` is supported for `orders.createtestorder`. Acceptable values are: - \"`google`\" - \"`merchant`\" ", - "type": "string" - }, - "merchantPromotionId": { - "description": "Required. This field is used to identify promotions within merchants' own systems.", - "type": "string" - }, - "priceValue": { - "$ref": "Price", - "description": "Estimated discount applied to price. Amount is pre-tax or post-tax depending on location of order." - }, - "shortTitle": { - "description": "A short title of the promotion to be shown on the checkout page. Do not provide for `orders.createtestorder`.", - "type": "string" - }, - "startTime": { - "description": "Promotion start time in ISO 8601 format. Date, time, and offset required, for example, \"2020-01-02T09:00:00+01:00\" or \"2020-01-02T09:00:00Z\".", - "type": "string" - }, - "subtype": { - "description": "Required. The category of the promotion. Only `moneyOff` is supported for `orders.createtestorder`. Acceptable values are: - \"`buyMGetMoneyOff`\" - \"`buyMGetNMoneyOff`\" - \"`buyMGetNPercentOff`\" - \"`buyMGetPercentOff`\" - \"`freeGift`\" - \"`freeGiftWithItemId`\" - \"`freeGiftWithValue`\" - \"`freeShippingOvernight`\" - \"`freeShippingStandard`\" - \"`freeShippingTwoDay`\" - \"`moneyOff`\" - \"`percentOff`\" - \"`rewardPoints`\" - \"`salePrice`\" ", - "type": "string" - }, - "taxValue": { - "$ref": "Price", - "description": "Estimated discount applied to tax (if allowed by law). Do not provide for `orders.createtestorder`." - }, - "title": { - "description": "Required. The title of the promotion.", - "type": "string" - }, - "type": { - "description": "Required. The scope of the promotion. Only `product` is supported for `orders.createtestorder`. Acceptable values are: - \"`product`\" - \"`shipping`\" ", - "type": "string" - } - }, - "type": "object" - }, - "OrderPromotionItem": { - "id": "OrderPromotionItem", - "properties": { - "lineItemId": { - "description": "The line item ID of a product. Do not provide for `orders.createtestorder`.", - "type": "string" - }, - "offerId": { - "description": "Required. Offer ID of a product. Only for `orders.createtestorder`.", - "type": "string" - }, - "productId": { - "description": "`orders.createtestorder`.", + "reviewEligibilityStatus": { + "description": "If a program is eligible for review in a specific region. Only visible if `eligibilityStatus` is `DISAPPROVED`.", + "enum": [ + "REVIEW_ELIGIBILITY_UNSPECIFIED", + "ELIGIBLE", + "INELIGIBLE" + ], + "enumDescriptions": [ + "Review eligibility state is unknown.", + "Account is eligible for review for a specified region code.", + "Account is not eligible for review for a specified region code." + ], "type": "string" }, - "quantity": { - "description": "The quantity of the associated product. Do not provide for `orders.createtestorder`.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "OrderRefund": { - "id": "OrderRefund", - "properties": { - "actor": { - "description": "The actor that created the refund. Acceptable values are: - \"`customer`\" - \"`googleBot`\" - \"`googleCustomerService`\" - \"`googlePayments`\" - \"`googleSabre`\" - \"`merchant`\" ", + "reviewIneligibilityReason": { + "description": "Review ineligibility reason if account is not eligible for review.", + "enum": [ + "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED", + "ONBOARDING_ISSUES", + "NOT_ENOUGH_OFFERS", + "IN_COOLDOWN_PERIOD", + "ALREADY_UNDER_REVIEW", + "NO_REVIEW_REQUIRED", + "WILL_BE_REVIEWED_AUTOMATICALLY", + "IS_RETIRED", + "ALREADY_REVIEWED" + ], + "enumDescriptions": [ + "Requesting a review from Google is not possible.", + "All onboarding issues needs to be fixed.", + "Not enough offers uploaded for this country.", + "Cooldown period applies. Wait until cooldown period ends.", + "Account is already under review.", + "No issues available to review.", + "Account will be automatically reviewed at the end of the grace period.", + "Account is retired. Should not appear in MC.", + "Account was already reviewd." + ], "type": "string" }, - "amount": { - "$ref": "Price", - "description": "The amount that is refunded." - }, - "creationDate": { - "description": "Date on which the item has been created, in ISO 8601 format.", + "reviewIneligibilityReasonDescription": { + "description": "Reason a program in a specific region isn’t eligible for review. Only visible if `reviewEligibilityStatus` is `INELIGIBLE`.", "type": "string" }, - "reason": { - "description": "The reason for the refund. Acceptable values are: - \"`adjustment`\" - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`courtesyAdjustment`\" - \"`customerCanceled`\" - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`customerSupportRequested`\" - \"`deliveredLateByCarrier`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`feeAdjustment`\" - \"`invalidCoupon`\" - \"`lateShipmentCredit`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceAdjustment`\" - \"`priceError`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`promoReallocation`\" - \"`qualityNotAsExpected`\" - \"`returnRefundAbuse`\" - \"`shippingCostAdjustment`\" - \"`shippingPriceError`\" - \"`taxAdjustment`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", - "type": "string" + "reviewIneligibilityReasonDetails": { + "$ref": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", + "description": "Additional information for ineligibility. If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period is provided." }, - "reasonText": { - "description": "The explanation of the reason.", - "type": "string" + "reviewIssues": { + "description": "Issues evaluated in the review process. Fix all issues before requesting a review.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "OrderReportDisbursement": { - "description": "Order disbursement. All methods require the payment analyst role.", - "id": "OrderReportDisbursement", - "properties": { - "disbursementAmount": { - "$ref": "Price", - "description": "The disbursement amount." - }, - "disbursementCreationDate": { - "description": "The disbursement date, in ISO 8601 format.", - "type": "string" - }, - "disbursementDate": { - "description": "The date the disbursement was initiated, in ISO 8601 format.", - "type": "string" - }, - "disbursementId": { - "description": "The ID of the disbursement.", - "type": "string" - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", + "FreeListingsProgramStatusReviewIneligibilityReasonDetails": { + "description": "Additional details for review ineligibility reasons.", + "id": "FreeListingsProgramStatusReviewIneligibilityReasonDetails", + "properties": { + "cooldownTime": { + "description": "This timestamp represents end of cooldown period for review ineligbility reason `IN_COOLDOWN_PERIOD`.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "OrderReportTransaction": { - "id": "OrderReportTransaction", + "FreeShippingThreshold": { + "description": "Conditions to be met for a product to have free shipping.", + "id": "FreeShippingThreshold", "properties": { - "disbursementAmount": { - "$ref": "Price", - "description": "The disbursement amount." - }, - "disbursementCreationDate": { - "description": "The date the disbursement was created, in ISO 8601 format.", - "type": "string" - }, - "disbursementDate": { - "description": "The date the disbursement was initiated, in ISO 8601 format.", - "type": "string" - }, - "disbursementId": { - "description": "The ID of the disbursement.", - "type": "string" - }, - "merchantId": { - "description": "The ID of the managing account.", - "format": "uint64", - "type": "string" - }, - "merchantOrderId": { - "description": "Merchant-provided ID of the order.", - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", + "country": { + "description": "Required. The [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the country to which an item will ship.", "type": "string" }, - "productAmount": { - "$ref": "ProductAmount", - "description": "Total amount for the items." - }, - "transactionDate": { - "description": "The date of the transaction, in ISO 8601 format.", - "type": "string" + "priceThreshold": { + "$ref": "Price", + "description": "Required. The minimum product price for the shipping cost to become free. Represented as a number." } }, "type": "object" }, - "OrderReturn": { - "id": "OrderReturn", + "GenerateRecommendationsResponse": { + "description": "Response containing generated recommendations.", + "id": "GenerateRecommendationsResponse", "properties": { - "actor": { - "description": "The actor that created the refund. Acceptable values are: - \"`customer`\" - \"`googleBot`\" - \"`googleCustomerService`\" - \"`googlePayments`\" - \"`googleSabre`\" - \"`merchant`\" ", - "type": "string" - }, - "creationDate": { - "description": "Date on which the item has been created, in ISO 8601 format.", - "type": "string" - }, - "quantity": { - "description": "Quantity that is returned.", - "format": "uint32", - "type": "integer" - }, - "reason": { - "description": "The reason for the return. Acceptable values are: - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`other`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`qualityNotAsExpected`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", - "type": "string" + "recommendations": { + "description": "Recommendations generated for a request.", + "items": { + "$ref": "Recommendation" + }, + "type": "array" }, - "reasonText": { - "description": "The explanation of the reason.", + "responseToken": { + "description": "Output only. Response token is a string created for each `GenerateRecommendationsResponse`. This token doesn't expire, and is globally unique. This token must be used when reporting interactions for recommendations.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "OrderShipment": { - "id": "OrderShipment", + "GmbAccounts": { + "id": "GmbAccounts", "properties": { - "carrier": { - "description": "The carrier handling the shipment. For supported carriers, Google includes the carrier name and tracking URL in emails to customers. For select supported carriers, Google also automatically updates the shipment status based on the provided shipment ID. *Note:* You can also use unsupported carriers, but emails to customers won't include the carrier name or tracking URL, and there will be no automatic order status updates. Supported carriers for \"US\" are: - \"`ups`\" (United Parcel Service) *automatic status updates* - \"`usps`\" (United States Postal Service) *automatic status updates* - \"`fedex`\" (FedEx) *automatic status updates * - \"`dhl`\" (DHL eCommerce) *automatic status updates* (US only) - \"`ontrac`\" (OnTrac) *automatic status updates * - \"`dhl express`\" (DHL Express) - \"`deliv`\" (Deliv) - \"`dynamex`\" (TForce) - \"`lasership`\" (LaserShip) - \"`mpx`\" (Military Parcel Xpress) - \"`uds`\" (United Delivery Service) - \"`efw`\" (Estes Forwarding Worldwide) - \"`jd logistics`\" (JD Logistics) - \"`yunexpress`\" (YunExpress) - \"`china post`\" (China Post) - \"`china ems`\" (China Post Express Mail Service) - \"`singapore post`\" (Singapore Post) - \"`pos malaysia`\" (Pos Malaysia) - \"`postnl`\" (PostNL) - \"`ptt`\" (PTT Turkish Post) - \"`eub`\" (ePacket) - \"`chukou1`\" (Chukou1 Logistics) - \"`bestex`\" (Best Express) - \"`canada post`\" (Canada Post) - \"`purolator`\" (Purolator) - \"`canpar`\" (Canpar) - \"`india post`\" (India Post) - \"`blue dart`\" (Blue Dart) - \"`delhivery`\" (Delhivery) - \"`dtdc`\" (DTDC) - \"`tpc india`\" (TPC India) - \"`lso`\" (Lone Star Overnight) - \"`tww`\" (Team Worldwide) - \"`deliver-it`\" (Deliver-IT) - \"`cdl last mile`\" (CDL Last Mile) Supported carriers for FR are: - \"`la poste`\" (La Poste) *automatic status updates * - \"`colissimo`\" (Colissimo by La Poste) *automatic status updates* - \"`ups`\" (United Parcel Service) *automatic status updates * - \"`chronopost`\" (Chronopost by La Poste) - \"`gls`\" (General Logistics Systems France) - \"`dpd`\" (DPD Group by GeoPost) - \"`bpost`\" (Belgian Post Group) - \"`colis prive`\" (Colis Privé) - \"`boxtal`\" (Boxtal) - \"`geodis`\" (GEODIS) - \"`tnt`\" (TNT) - \"`db schenker`\" (DB Schenker) - \"`aramex`\" (Aramex) ", - "type": "string" - }, - "creationDate": { - "description": "Date on which the shipment has been created, in ISO 8601 format.", - "type": "string" - }, - "deliveryDate": { - "description": "Date on which the shipment has been delivered, in ISO 8601 format. Present only if `status` is `delivered`", - "type": "string" - }, - "id": { - "description": "The ID of the shipment.", + "accountId": { + "description": "The ID of the Merchant Center account.", + "format": "uint64", "type": "string" }, - "lineItems": { - "description": "The line items that are shipped.", + "gmbAccounts": { + "description": "A list of Business Profiles which are available to the merchant.", "items": { - "$ref": "OrderShipmentLineItemShipment" + "$ref": "GmbAccountsGmbAccount" }, "type": "array" - }, - "scheduledDeliveryDetails": { - "$ref": "OrderShipmentScheduledDeliveryDetails", - "description": "Delivery details of the shipment if scheduling is needed." - }, - "shipmentGroupId": { - "description": "The shipment group ID of the shipment. This is set in shiplineitems request.", - "type": "string" - }, - "status": { - "description": "The status of the shipment. Acceptable values are: - \"`delivered`\" - \"`readyForPickup`\" - \"`shipped`\" - \"`undeliverable`\" ", - "type": "string" - }, - "trackingId": { - "description": "The tracking ID for the shipment.", - "type": "string" } }, "type": "object" }, - "OrderShipmentLineItemShipment": { - "id": "OrderShipmentLineItemShipment", + "GmbAccountsGmbAccount": { + "id": "GmbAccountsGmbAccount", "properties": { - "lineItemId": { - "description": "The ID of the line item that is shipped. This value is assigned by Google when an order is created. Either lineItemId or productId is required.", + "email": { + "description": "The email which identifies the Business Profile.", "type": "string" }, - "productId": { - "description": "The ID of the product to ship. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "listingCount": { + "description": "Number of listings under this account.", + "format": "uint64", "type": "string" }, - "quantity": { - "description": "The quantity that is shipped.", - "format": "uint32", - "type": "integer" + "name": { + "description": "The name of the Business Profile.", + "type": "string" + }, + "type": { + "description": "The type of the Business Profile (User or Business).", + "type": "string" } }, "type": "object" }, - "OrderShipmentScheduledDeliveryDetails": { - "id": "OrderShipmentScheduledDeliveryDetails", + "GoogleAnalyticsLink": { + "description": "\"Google Analytics Link\" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account.", + "id": "GoogleAnalyticsLink", "properties": { - "carrierPhoneNumber": { - "description": "The phone number of the carrier fulfilling the delivery. The phone number is formatted as the international notation in ITU-T Recommendation E.123 (for example, \"+41 44 668 1800\").", + "attributionSettings": { + "$ref": "AttributionSettings", + "description": "Output only. Attribution settings for the linked Google Analytics property.", + "readOnly": true + }, + "propertyId": { + "description": "Required. Immutable. ID of the Google Analytics property the merchant is linked to.", + "format": "int64", "type": "string" }, - "scheduledDate": { - "description": "The date a shipment is scheduled for delivery, in ISO 8601 format.", + "propertyName": { + "description": "Output only. Name of the Google Analytics property the merchant is linked to.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "OrderTrackingSignal": { - "description": "Represents a merchant trade from which signals are extracted, e.g. shipping.", - "id": "OrderTrackingSignal", + "Headers": { + "description": "A non-empty list of row or column headers for a table. Exactly one of `prices`, `weights`, `numItems`, `postalCodeGroupNames`, or `location` must be set.", + "id": "Headers", "properties": { - "customerShippingFee": { - "$ref": "PriceAmount", - "description": "The shipping fee of the order; this value should be set to zero in the case of free shipping." + "locations": { + "description": "A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.", + "items": { + "$ref": "LocationIdSet" + }, + "type": "array" }, - "deliveryPostalCode": { - "description": "Required. The delivery postal code, as a continuous string without spaces or dashes, e.g. \"95016\". This field will be anonymized in returned OrderTrackingSignal creation response.", - "type": "string" + "numberOfItems": { + "description": "A list of inclusive number of items upper bounds. The last value can be `\"infinity\"`. For example `[\"10\", \"50\", \"infinity\"]` represents the headers \"\u003c= 10 items\", \"\u003c= 50 items\", and \"\u003e 50 items\". Must be non-empty. Can only be set if all other fields are not set.", + "items": { + "type": "string" + }, + "type": "array" }, - "deliveryRegionCode": { - "description": "Required. The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping destination.", - "type": "string" + "postalCodeGroupNames": { + "description": "A list of postal group names. The last value can be `\"all other locations\"`. Example: `[\"zone 1\", \"zone 2\", \"all other locations\"]`. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.", + "items": { + "type": "string" + }, + "type": "array" }, - "lineItems": { - "description": "Information about line items in the order.", + "prices": { + "description": "A list of inclusive order price upper bounds. The last price's value can be `\"infinity\"`. For example `[{\"value\": \"10\", \"currency\": \"USD\"}, {\"value\": \"500\", \"currency\": \"USD\"}, {\"value\": \"infinity\", \"currency\": \"USD\"}]` represents the headers \"\u003c= $10\", \"\u003c= $500\", and \"\u003e $500\". All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.", "items": { - "$ref": "OrderTrackingSignalLineItemDetails" + "$ref": "Price" }, "type": "array" }, - "merchantId": { - "description": "The Google merchant ID of this order tracking signal. This value is optional. If left unset, the caller's merchant ID is used. You must request access in order to provide data on behalf of another merchant. For more information, see [Submitting Order Tracking Signals](/shopping-content/guides/order-tracking-signals).", - "format": "int64", + "weights": { + "description": "A list of inclusive order weight upper bounds. The last weight's value can be `\"infinity\"`. For example `[{\"value\": \"10\", \"unit\": \"kg\"}, {\"value\": \"50\", \"unit\": \"kg\"}, {\"value\": \"infinity\", \"unit\": \"kg\"}]` represents the headers \"\u003c= 10kg\", \"\u003c= 50kg\", and \"\u003e 50kg\". All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.", + "items": { + "$ref": "Weight" + }, + "type": "array" + } + }, + "type": "object" + }, + "HolidayCutoff": { + "id": "HolidayCutoff", + "properties": { + "deadlineDate": { + "description": "Date of the order deadline, in ISO 8601 format. For example, \"2016-11-29\" for 29th November 2016. Required.", "type": "string" }, - "orderCreatedTime": { - "$ref": "DateTime", - "description": "Required. The time when the order was created on the merchant side. Include the year and timezone string, if available." + "deadlineHour": { + "description": "Hour of the day on the deadline date until which the order has to be placed to qualify for the delivery guarantee. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Required.", + "format": "uint32", + "type": "integer" }, - "orderId": { - "description": "Required. The ID of the order on the merchant side. This field will be hashed in returned OrderTrackingSignal creation response.", + "deadlineTimezone": { + "description": "Timezone identifier for the deadline hour (for example, \"Europe/Zurich\"). List of identifiers. Required.", "type": "string" }, - "orderTrackingSignalId": { - "description": "Output only. The ID that uniquely identifies this order tracking signal.", - "format": "int64", - "readOnly": true, + "holidayId": { + "description": "Unique identifier for the holiday. Required.", "type": "string" }, - "shipmentLineItemMapping": { - "description": "The mapping of the line items to the shipment information.", - "items": { - "$ref": "OrderTrackingSignalShipmentLineItemMapping" - }, - "type": "array" - }, - "shippingInfo": { - "description": "The shipping information for the order.", - "items": { - "$ref": "OrderTrackingSignalShippingInfo" - }, - "type": "array" + "visibleFromDate": { + "description": "Date on which the deadline will become visible to consumers in ISO 8601 format. For example, \"2016-10-31\" for 31st October 2016. Required.", + "type": "string" } }, "type": "object" }, - "OrderTrackingSignalLineItemDetails": { - "description": "The line items of the order.", - "id": "OrderTrackingSignalLineItemDetails", + "HolidaysHoliday": { + "id": "HolidaysHoliday", "properties": { - "brand": { - "description": "Brand of the product.", + "countryCode": { + "description": "The CLDR territory code of the country in which the holiday is available. For example, \"US\", \"DE\", \"GB\". A holiday cutoff can only be configured in a shipping settings service with matching delivery country. Always present.", "type": "string" }, - "gtin": { - "description": "The Global Trade Item Number.", + "date": { + "description": "Date of the holiday, in ISO 8601 format. For example, \"2016-12-25\" for Christmas 2016. Always present.", "type": "string" }, - "lineItemId": { - "description": "Required. The ID for this line item.", + "deliveryGuaranteeDate": { + "description": "Date on which the order has to arrive at the customer's, in ISO 8601 format. For example, \"2016-12-24\" for 24th December 2016. Always present.", "type": "string" }, - "mpn": { - "description": "The manufacturer part number.", + "deliveryGuaranteeHour": { + "description": "Hour of the day in the delivery location's timezone on the guaranteed delivery date by which the order has to arrive at the customer's. Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Always present.", + "format": "uint64", "type": "string" }, - "productDescription": { - "deprecated": true, - "description": "Plain text description of this product (deprecated: Please use product_title instead).", + "id": { + "description": "Unique identifier for the holiday to be used when configuring holiday cutoffs. Always present.", "type": "string" }, - "productId": { - "description": "Required. The Content API REST ID of the product, in the form channel:contentLanguage:targetCountry:offerId.", + "type": { + "description": "The holiday type. Always present. Acceptable values are: - \"`Christmas`\" - \"`Easter`\" - \"`Father's Day`\" - \"`Halloween`\" - \"`Independence Day (USA)`\" - \"`Mother's Day`\" - \"`Thanksgiving`\" - \"`Valentine's Day`\" ", "type": "string" + } + }, + "type": "object" + }, + "InputField": { + "description": "Input field that needs to be available to the merchant. If the field is marked as required, then a value needs to be provided for a successful processing of the request.", + "id": "InputField", + "properties": { + "checkboxInput": { + "$ref": "InputFieldCheckboxInput", + "description": "Input field to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox)." }, - "productTitle": { - "description": "Plain text title of this product.", + "choiceInput": { + "$ref": "InputFieldChoiceInput", + "description": "Input field to select one of the offered choices. Corresponds to the [html input type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio)." + }, + "id": { + "description": "Not for display but need to be sent back for the given input field.", "type": "string" }, - "quantity": { - "description": "The quantity of the line item in the order.", - "format": "int64", - "type": "string" + "label": { + "$ref": "TextWithTooltip", + "description": "Input field label. There may be more information to be shown in a tooltip." }, - "sku": { - "deprecated": true, - "description": "Merchant SKU for this item (deprecated).", - "type": "string" + "required": { + "description": "Whether the field is required. The action button needs to stay disabled till values for all required fields are provided.", + "type": "boolean" }, - "upc": { - "deprecated": true, - "description": "Universal product code for this item (deprecated: Please use GTIN instead).", - "type": "string" + "textInput": { + "$ref": "InputFieldTextInput", + "description": "Input field to provide text information. Corresponds to the [html input type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) or [html textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." } }, "type": "object" }, - "OrderTrackingSignalShipmentLineItemMapping": { - "description": "Represents how many items are in the shipment for the given shipment_id and line_item_id.", - "id": "OrderTrackingSignalShipmentLineItemMapping", + "InputFieldCheckboxInput": { + "description": "Checkbox input allows merchants to provide a boolean value. Corresponds to the [html input type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). If merchant checks the box, the input value for the field is `true`, otherwise it is `false`. This type of input is often used as a confirmation that the merchant completed required steps before they are allowed to start the action. In such a case, the input field is marked as required and the button to trigger the action should stay disabled until the merchant checks the box.", + "id": "InputFieldCheckboxInput", + "properties": {}, + "type": "object" + }, + "InputFieldChoiceInput": { + "description": "Choice input allows merchants to select one of the offered choices. Some choices may be linked to additional input fields that should be displayed under or next to the choice option. The value for the additional input field needs to be provided only when the specific choice is selected by the merchant. For example, additional input field can be hidden or disabled until the merchant selects the specific choice.", + "id": "InputFieldChoiceInput", "properties": { - "lineItemId": { - "description": "Required. The line item ID.", - "type": "string" - }, - "quantity": { - "description": "The line item quantity in the shipment.", - "format": "int64", - "type": "string" - }, - "shipmentId": { - "description": "Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.", - "type": "string" + "options": { + "description": "A list of choices. Only one option can be selected.", + "items": { + "$ref": "InputFieldChoiceInputChoiceInputOption" + }, + "type": "array" } }, "type": "object" }, - "OrderTrackingSignalShippingInfo": { - "description": "The shipping information for the order.", - "id": "OrderTrackingSignalShippingInfo", + "InputFieldChoiceInputChoiceInputOption": { + "description": "A choice that merchant can select.", + "id": "InputFieldChoiceInputChoiceInputOption", "properties": { - "actualDeliveryTime": { - "$ref": "DateTime", - "description": "The time when the shipment was actually delivered. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." - }, - "carrierName": { - "description": "The name of the shipping carrier for the delivery. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.", - "type": "string" + "additionalInput": { + "$ref": "InputField", + "description": "Input that should be displayed when this option is selected. The additional input will not contain a `ChoiceInput`." }, - "carrierServiceName": { - "description": "The service type for fulfillment, e.g., GROUND, FIRST_CLASS, etc.", + "id": { + "description": "Not for display but need to be sent back for the selected choice option.", "type": "string" }, - "earliestDeliveryPromiseTime": { - "$ref": "DateTime", - "description": "The earliest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." - }, - "latestDeliveryPromiseTime": { - "$ref": "DateTime", - "description": "The latest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." - }, - "originPostalCode": { - "description": "The origin postal code, as a continuous string without spaces or dashes, e.g. \"95016\". This field will be anonymized in returned OrderTrackingSignal creation response.", - "type": "string" + "label": { + "$ref": "TextWithTooltip", + "description": "Short description of the choice option. There may be more information to be shown as a tooltip." + } + }, + "type": "object" + }, + "InputFieldTextInput": { + "description": "Text input allows merchants to provide a text value.", + "id": "InputFieldTextInput", + "properties": { + "additionalInfo": { + "$ref": "TextWithTooltip", + "description": "Additional info regarding the field to be displayed to merchant. For example, warning to not include personal identifiable information. There may be more information to be shown in a tooltip." }, - "originRegionCode": { - "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping origin.", + "ariaLabel": { + "description": "Text to be used as the [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the input.", "type": "string" }, - "shipmentId": { - "description": "Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.", + "formatInfo": { + "description": "Information about the required format. If present, it should be shown close to the input field to help merchants to provide a correct value. For example: \"VAT numbers should be in a format similar to SK9999999999\"", "type": "string" }, - "shippedTime": { - "$ref": "DateTime", - "description": "The time when the shipment was shipped. Include the year and timezone string, if available." - }, - "shippingStatus": { - "description": "The status of the shipment.", + "type": { + "description": "Type of the text input", "enum": [ - "SHIPPING_STATE_UNSPECIFIED", - "SHIPPED", - "DELIVERED" + "TEXT_INPUT_TYPE_UNSPECIFIED", + "GENERIC_SHORT_TEXT", + "GENERIC_LONG_TEXT" ], "enumDescriptions": [ - "The shipping status is not known to merchant.", - "All items are shipped.", - "The shipment is already delivered." + "Default value. Will never be provided by the API.", + "Used when a short text is expected. The field can be rendered as a [text field](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text).", + "Used when a longer text is expected. The field should be rendered as a [textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea)." ], "type": "string" - }, - "trackingId": { - "description": "The tracking ID of the shipment. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.", - "type": "string" } }, "type": "object" }, - "OrderinvoicesCreateChargeInvoiceRequest": { - "id": "OrderinvoicesCreateChargeInvoiceRequest", + "InputValue": { + "description": "Input provided by the merchant for input field.", + "id": "InputValue", "properties": { - "invoiceId": { - "description": "[required] The ID of the invoice.", - "type": "string" - }, - "invoiceSummary": { - "$ref": "InvoiceSummary", - "description": "[required] Invoice summary." + "checkboxInputValue": { + "$ref": "InputValueCheckboxInputValue", + "description": "Value for checkbox input field." }, - "lineItemInvoices": { - "description": "[required] Invoice details per line item.", - "items": { - "$ref": "ShipmentInvoiceLineItemInvoice" - }, - "type": "array" + "choiceInputValue": { + "$ref": "InputValueChoiceInputValue", + "description": "Value for choice input field." }, - "operationId": { - "description": "[required] The ID of the operation, unique across all operations for a given order.", + "inputFieldId": { + "description": "Required. Id of the corresponding input field.", "type": "string" }, - "shipmentGroupId": { - "description": "[required] ID of the shipment group. It is assigned by the merchant in the `shipLineItems` method and is used to group multiple line items that have the same kind of shipping charges.", - "type": "string" + "textInputValue": { + "$ref": "InputValueTextInputValue", + "description": "Value for text input field." } }, "type": "object" }, - "OrderinvoicesCreateChargeInvoiceResponse": { - "id": "OrderinvoicesCreateChargeInvoiceResponse", + "InputValueCheckboxInputValue": { + "description": "Value for checkbox input field.", + "id": "InputValueCheckboxInputValue", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderinvoicesCreateChargeInvoiceResponse`\".", + "value": { + "description": "Required. True if the merchant checked the box field. False otherwise.", + "type": "boolean" + } + }, + "type": "object" + }, + "InputValueChoiceInputValue": { + "description": "Value for choice input field.", + "id": "InputValueChoiceInputValue", + "properties": { + "choiceInputOptionId": { + "description": "Required. Id of the option that was selected by the merchant.", "type": "string" } }, "type": "object" }, - "OrderinvoicesCreateRefundInvoiceRequest": { - "id": "OrderinvoicesCreateRefundInvoiceRequest", + "InputValueTextInputValue": { + "description": "Value for text input field.", + "id": "InputValueTextInputValue", "properties": { - "invoiceId": { - "description": "[required] The ID of the invoice.", + "value": { + "description": "Required. Text provided by the merchant.", "type": "string" + } + }, + "type": "object" + }, + "InsertCheckoutSettingsRequest": { + "description": "Request message for the `InsertCheckoutSettings` method.", + "id": "InsertCheckoutSettingsRequest", + "properties": { + "uriSettings": { + "$ref": "UrlSettings", + "description": "Required. The `UrlSettings` for the request. The presence of URL settings indicates `Checkout` enrollment." + } + }, + "type": "object" + }, + "Installment": { + "description": "Details of a monthly installment payment offering. [Learn more](https://support.google.com/merchants/answer/6324474) about installments.", + "id": "Installment", + "properties": { + "amount": { + "$ref": "Price", + "description": "The amount the buyer has to pay per month." }, - "operationId": { - "description": "[required] The ID of the operation, unique across all operations for a given order.", + "creditType": { + "description": "Optional. Type of installment payments. Supported values are: - \"`finance`\" - \"`lease`\" ", "type": "string" }, - "refundOnlyOption": { - "$ref": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption", - "description": "Option to create a refund-only invoice. Exactly one of `refundOnlyOption` or `returnOption` must be provided." - }, - "returnOption": { - "$ref": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption", - "description": "Option to create an invoice for a refund and mark all items within the invoice as returned. Exactly one of `refundOnlyOption` or `returnOption` must be provided." + "downpayment": { + "$ref": "Price", + "description": "Optional. The initial down payment amount the buyer has to pay." }, - "shipmentInvoices": { - "description": "Invoice details for different shipment groups.", + "months": { + "description": "The number of installments the buyer has to pay.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "LabelIds": { + "description": "The IDs of labels that should be assigned to the CSS domain.", + "id": "LabelIds", + "properties": { + "labelIds": { + "description": "The list of label IDs.", "items": { - "$ref": "ShipmentInvoice" + "format": "int64", + "type": "string" }, "type": "array" } }, "type": "object" }, - "OrderinvoicesCreateRefundInvoiceResponse": { - "id": "OrderinvoicesCreateRefundInvoiceResponse", + "LiaAboutPageSettings": { + "id": "LiaAboutPageSettings", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "status": { + "description": "The status of the verification process for the About page. Supported values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderinvoicesCreateRefundInvoiceResponse`\".", + "url": { + "description": "The URL for the About page.", "type": "string" } }, "type": "object" }, - "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption": { - "id": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption", + "LiaCountrySettings": { + "id": "LiaCountrySettings", "properties": { - "description": { - "description": "Optional description of the refund reason.", - "type": "string" + "about": { + "$ref": "LiaAboutPageSettings", + "description": "The settings for the About page." }, - "reason": { - "description": "[required] Reason for the refund. Acceptable values are: - \"`adjustment`\" - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`courtesyAdjustment`\" - \"`customerCanceled`\" - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`customerSupportRequested`\" - \"`deliveredLateByCarrier`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`feeAdjustment`\" - \"`invalidCoupon`\" - \"`lateShipmentCredit`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceAdjustment`\" - \"`priceError`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`promoReallocation`\" - \"`qualityNotAsExpected`\" - \"`returnRefundAbuse`\" - \"`shippingCostAdjustment`\" - \"`shippingPriceError`\" - \"`taxAdjustment`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", + "country": { + "description": "Required. CLDR country code (for example, \"US\").", "type": "string" + }, + "hostedLocalStorefrontActive": { + "description": "The status of the \"Merchant hosted local storefront\" feature.", + "type": "boolean" + }, + "inventory": { + "$ref": "LiaInventorySettings", + "description": "LIA inventory verification settings." + }, + "omnichannelExperience": { + "$ref": "LiaOmnichannelExperience", + "description": "The omnichannel experience configured for this country." + }, + "onDisplayToOrder": { + "$ref": "LiaOnDisplayToOrderSettings", + "description": "LIA \"On Display To Order\" settings." + }, + "posDataProvider": { + "$ref": "LiaPosDataProvider", + "description": "The POS data provider linked with this country." + }, + "storePickupActive": { + "description": "The status of the \"Store pickup\" feature.", + "type": "boolean" } }, "type": "object" }, - "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption": { - "id": "OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption", + "LiaInventorySettings": { + "id": "LiaInventorySettings", "properties": { - "description": { - "description": "Optional description of the return reason.", + "inventoryVerificationContactEmail": { + "description": "The email of the contact for the inventory verification process.", "type": "string" }, - "reason": { - "description": "[required] Reason for the return. Acceptable values are: - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`other`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`qualityNotAsExpected`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", + "inventoryVerificationContactName": { + "description": "The name of the contact for the inventory verification process.", "type": "string" - } - }, - "type": "object" - }, - "OrderreportsListDisbursementsResponse": { - "id": "OrderreportsListDisbursementsResponse", - "properties": { - "disbursements": { - "description": "The list of disbursements.", - "items": { - "$ref": "OrderReportDisbursement" - }, - "type": "array" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreportsListDisbursementsResponse`\".", + "inventoryVerificationContactStatus": { + "description": "The status of the verification contact. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of disbursements.", + "status": { + "description": "The status of the inventory verification process. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" } }, "type": "object" }, - "OrderreportsListTransactionsResponse": { - "id": "OrderreportsListTransactionsResponse", + "LiaOmnichannelExperience": { + "description": "Omnichannel experience details.", + "id": "LiaOmnichannelExperience", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreportsListTransactionsResponse`\".", + "country": { + "description": "The CLDR country code (for example, \"US\").", "type": "string" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of transactions.", + "lsfType": { + "description": "The Local Store Front (LSF) type for this country. Acceptable values are: - \"`ghlsf`\" (Google-Hosted Local Store Front) - \"`mhlsfBasic`\" (Merchant-Hosted Local Store Front Basic) - \"`mhlsfFull`\" (Merchant-Hosted Local Store Front Full) More details about these types can be found here.", "type": "string" }, - "transactions": { - "description": "The list of transactions.", + "pickupTypes": { + "description": "The Pickup types for this country. Acceptable values are: - \"`pickupToday`\" - \"`pickupLater`\" ", "items": { - "$ref": "OrderReportTransaction" + "type": "string" }, "type": "array" } }, "type": "object" }, - "OrderreturnsAcknowledgeRequest": { - "id": "OrderreturnsAcknowledgeRequest", + "LiaOnDisplayToOrderSettings": { + "id": "LiaOnDisplayToOrderSettings", "properties": { - "operationId": { - "description": "[required] The ID of the operation, unique across all operations for a given order return.", + "shippingCostPolicyUrl": { + "description": "Shipping cost and policy URL.", + "type": "string" + }, + "status": { + "description": "The status of the ?On display to order? feature. Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" } }, "type": "object" }, - "OrderreturnsAcknowledgeResponse": { - "id": "OrderreturnsAcknowledgeResponse", + "LiaPosDataProvider": { + "id": "LiaPosDataProvider", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "posDataProviderId": { + "description": "The ID of the POS data provider.", + "format": "uint64", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreturnsAcknowledgeResponse`\".", + "posExternalAccountId": { + "description": "The account ID by which this merchant is known to the POS data provider.", "type": "string" } }, "type": "object" }, - "OrderreturnsCreateOrderReturnRequest": { - "id": "OrderreturnsCreateOrderReturnRequest", + "LiaSettings": { + "description": "Local Inventory ads (LIA) settings. All methods except listposdataproviders require the admin role.", + "id": "LiaSettings", "properties": { - "lineItems": { - "description": "The list of line items to return.", + "accountId": { + "description": "The ID of the account to which these LIA settings belong. Ignored upon update, always present in get request responses.", + "format": "uint64", + "type": "string" + }, + "countrySettings": { + "description": "The LIA settings for each country.", "items": { - "$ref": "OrderreturnsLineItem" + "$ref": "LiaCountrySettings" }, "type": "array" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" - }, - "orderId": { - "description": "The ID of the order.", - "type": "string" - }, - "returnMethodType": { - "description": "The way of the package being returned.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liaSettings`\"", "type": "string" } }, "type": "object" }, - "OrderreturnsCreateOrderReturnResponse": { - "id": "OrderreturnsCreateOrderReturnResponse", + "LiasettingsCustomBatchRequest": { + "id": "LiasettingsCustomBatchRequest", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreturnsCreateOrderReturnResponse`\".", - "type": "string" - }, - "orderReturn": { - "$ref": "MerchantOrderReturn", - "description": "Created order return." + "entries": { + "description": "The request entries to be processed in the batch.", + "items": { + "$ref": "LiasettingsCustomBatchRequestEntry" + }, + "type": "array" } }, "type": "object" }, - "OrderreturnsLineItem": { - "id": "OrderreturnsLineItem", + "LiasettingsCustomBatchRequestEntry": { + "id": "LiasettingsCustomBatchRequestEntry", "properties": { - "lineItemId": { - "description": "The ID of the line item. This value is assigned by Google when an order is created. Either lineItemId or productId is required.", - "type": "string" - }, - "productId": { - "description": "The ID of the product to cancel. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "accountId": { + "description": "The ID of the account for which to get/update account LIA settings.", + "format": "uint64", "type": "string" }, - "quantity": { - "description": "The quantity of this line item.", + "batchId": { + "description": "An entry ID, unique within the batch request.", "format": "uint32", "type": "integer" - } - }, - "type": "object" - }, - "OrderreturnsListResponse": { - "id": "OrderreturnsListResponse", - "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreturnsListResponse`\".", - "type": "string" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of returns.", + "contactEmail": { + "description": "Inventory validation contact email. Required only for SetInventoryValidationContact.", "type": "string" }, - "resources": { - "items": { - "$ref": "MerchantOrderReturn" - }, - "type": "array" - } - }, - "type": "object" - }, - "OrderreturnsPartialRefund": { - "id": "OrderreturnsPartialRefund", - "properties": { - "priceAmount": { - "$ref": "Price", - "description": "The pre-tax or post-tax amount to be refunded, depending on the location of the order." + "contactName": { + "description": "Inventory validation contact name. Required only for SetInventoryValidationContact.", + "type": "string" }, - "taxAmount": { - "$ref": "Price", - "description": "Tax amount to be refunded. Note: This has different meaning depending on the location of the order." - } - }, - "type": "object" - }, - "OrderreturnsProcessRequest": { - "id": "OrderreturnsProcessRequest", - "properties": { - "fullChargeReturnShippingCost": { - "description": "Option to charge the customer return shipping cost.", - "type": "boolean" + "country": { + "description": "The country code. Required only for RequestInventoryVerification.", + "type": "string" }, - "operationId": { - "description": "[required] The ID of the operation, unique across all operations for a given order return.", + "gmbEmail": { + "description": "The Business Profile. Required only for RequestGmbAccess.", "type": "string" }, - "refundShippingFee": { - "$ref": "OrderreturnsRefundOperation", - "description": "Refunds for original shipping fee." + "liaSettings": { + "$ref": "LiaSettings", + "description": "The account Lia settings to update. Only defined if the method is `update`." }, - "returnItems": { - "description": "The list of items to return.", - "items": { - "$ref": "OrderreturnsReturnItem" - }, - "type": "array" - } - }, - "type": "object" - }, - "OrderreturnsProcessResponse": { - "id": "OrderreturnsProcessResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#orderreturnsProcessResponse`\".", + "method": { + "description": "The method of the batch entry. Acceptable values are: - \"`get`\" - \"`getAccessibleGmbAccounts`\" - \"`requestGmbAccess`\" - \"`requestInventoryVerification`\" - \"`setInventoryVerificationContact`\" - \"`update`\" ", "type": "string" - } - }, - "type": "object" - }, - "OrderreturnsRefundOperation": { - "id": "OrderreturnsRefundOperation", - "properties": { - "fullRefund": { - "description": "If true, the item will be fully refunded. Allowed only when payment_type is FOP. Merchant can choose this refund option to indicate the full remaining amount of corresponding object to be refunded to the customer through FOP.", - "type": "boolean" }, - "partialRefund": { - "$ref": "OrderreturnsPartialRefund", - "description": "If this is set, the item will be partially refunded. Merchant can choose this refund option to specify the customized amount that to be refunded to the customer." - }, - "paymentType": { - "description": "The payment way of issuing refund. Default value is ORIGINAL_FOP if not set.", - "type": "string" + "omnichannelExperience": { + "$ref": "LiaOmnichannelExperience", + "description": "The omnichannel experience for a country. Required only for SetOmnichannelExperience." }, - "reasonText": { - "description": "The explanation of the reason.", + "posDataProviderId": { + "description": "The ID of POS data provider. Required only for SetPosProvider.", + "format": "uint64", "type": "string" }, - "returnRefundReason": { - "description": "Code of the refund reason.", + "posExternalAccountId": { + "description": "The account ID by which this merchant is known to the POS provider.", "type": "string" } }, "type": "object" }, - "OrderreturnsRejectOperation": { - "id": "OrderreturnsRejectOperation", + "LiasettingsCustomBatchResponse": { + "id": "LiasettingsCustomBatchResponse", "properties": { - "reason": { - "description": "The reason for the return.", - "type": "string" + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "LiasettingsCustomBatchResponseEntry" + }, + "type": "array" }, - "reasonText": { - "description": "The explanation of the reason.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsCustomBatchResponse`\".", "type": "string" } }, "type": "object" }, - "OrderreturnsReturnItem": { - "id": "OrderreturnsReturnItem", + "LiasettingsCustomBatchResponseEntry": { + "id": "LiasettingsCustomBatchResponseEntry", "properties": { - "refund": { - "$ref": "OrderreturnsRefundOperation", - "description": "Refunds the item." + "batchId": { + "description": "The ID of the request entry to which this entry responds.", + "format": "uint32", + "type": "integer" }, - "reject": { - "$ref": "OrderreturnsRejectOperation", - "description": "Rejects the item." + "errors": { + "$ref": "Errors", + "description": "A list of errors defined if, and only if, the request failed." }, - "returnItemId": { - "description": "Unit level ID for the return item. Different units of the same product will have different IDs.", - "type": "string" - } - }, - "type": "object" - }, - "OrdersAcknowledgeRequest": { - "id": "OrdersAcknowledgeRequest", - "properties": { - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "gmbAccounts": { + "$ref": "GmbAccounts", + "description": "The list of accessible Business Profiles." + }, + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsCustomBatchResponseEntry`\"", "type": "string" + }, + "liaSettings": { + "$ref": "LiaSettings", + "description": "The retrieved or updated Lia settings." + }, + "omnichannelExperience": { + "$ref": "LiaOmnichannelExperience", + "description": "The updated omnichannel experience for a country." + }, + "posDataProviders": { + "description": "The list of POS data providers.", + "items": { + "$ref": "PosDataProviders" + }, + "type": "array" } }, "type": "object" }, - "OrdersAcknowledgeResponse": { - "id": "OrdersAcknowledgeResponse", + "LiasettingsGetAccessibleGmbAccountsResponse": { + "id": "LiasettingsGetAccessibleGmbAccountsResponse", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "accountId": { + "description": "The ID of the Merchant Center account.", + "format": "uint64", "type": "string" }, + "gmbAccounts": { + "description": "A list of Business Profiles which are available to the merchant.", + "items": { + "$ref": "GmbAccountsGmbAccount" + }, + "type": "array" + }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersAcknowledgeResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsGetAccessibleGmbAccountsResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersAdvanceTestOrderResponse": { - "id": "OrdersAdvanceTestOrderResponse", + "LiasettingsListPosDataProvidersResponse": { + "id": "LiasettingsListPosDataProvidersResponse", "properties": { "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersAdvanceTestOrderResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsListPosDataProvidersResponse`\".", "type": "string" + }, + "posDataProviders": { + "description": "The list of POS data providers for each eligible country", + "items": { + "$ref": "PosDataProviders" + }, + "type": "array" } }, "type": "object" }, - "OrdersCancelLineItemRequest": { - "id": "OrdersCancelLineItemRequest", + "LiasettingsListResponse": { + "id": "LiasettingsListResponse", "properties": { - "lineItemId": { - "description": "The ID of the line item to cancel. Either lineItemId or productId is required.", - "type": "string" - }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" - }, - "productId": { - "description": "The ID of the product to cancel. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsListResponse`\".", "type": "string" }, - "quantity": { - "description": "The quantity to cancel.", - "format": "uint32", - "type": "integer" - }, - "reason": { - "description": "The reason for the cancellation. Acceptable values are: - \"`customerInitiatedCancel`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`noInventory`\" - \"`other`\" - \"`priceError`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ", + "nextPageToken": { + "description": "The token for the retrieval of the next page of LIA settings.", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", - "type": "string" + "resources": { + "items": { + "$ref": "LiaSettings" + }, + "type": "array" } }, "type": "object" }, - "OrdersCancelLineItemResponse": { - "id": "OrdersCancelLineItemResponse", + "LiasettingsRequestGmbAccessResponse": { + "id": "LiasettingsRequestGmbAccessResponse", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCancelLineItemResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsRequestGmbAccessResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersCancelRequest": { - "id": "OrdersCancelRequest", + "LiasettingsRequestInventoryVerificationResponse": { + "id": "LiasettingsRequestInventoryVerificationResponse", "properties": { - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" - }, - "reason": { - "description": "The reason for the cancellation. Acceptable values are: - \"`customerInitiatedCancel`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`noInventory`\" - \"`other`\" - \"`priceError`\" - \"`shippingPriceError`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`failedToCaptureFunds`\" ", - "type": "string" - }, - "reasonText": { - "description": "The explanation of the reason.", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsRequestInventoryVerificationResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersCancelResponse": { - "id": "OrdersCancelResponse", + "LiasettingsSetInventoryVerificationContactResponse": { + "id": "LiasettingsSetInventoryVerificationContactResponse", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCancelResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsSetInventoryVerificationContactResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersCancelTestOrderByCustomerRequest": { - "id": "OrdersCancelTestOrderByCustomerRequest", + "LiasettingsSetPosDataProviderResponse": { + "id": "LiasettingsSetPosDataProviderResponse", "properties": { - "reason": { - "description": "The reason for the cancellation. Acceptable values are: - \"`changedMind`\" - \"`orderedWrongItem`\" - \"`other`\" ", + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#liasettingsSetPosDataProviderResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersCancelTestOrderByCustomerResponse": { - "id": "OrdersCancelTestOrderByCustomerResponse", + "LinkService": { + "id": "LinkService", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCancelTestOrderByCustomerResponse`\".", + "service": { + "description": "Service provided to or by the linked account. Acceptable values are: - \"`shoppingActionsOrderManagement`\" - \"`shoppingActionsProductManagement`\" - \"`shoppingAdsProductManagement`\" - \"`paymentProcessing`\" ", + "type": "string" + }, + "status": { + "description": "Status of the link Acceptable values are: - \"`active`\" - \"`inactive`\" - \"`pending`\" ", "type": "string" } }, "type": "object" }, - "OrdersCreateTestOrderRequest": { - "id": "OrdersCreateTestOrderRequest", + "LinkedAccount": { + "id": "LinkedAccount", "properties": { - "country": { - "description": "The CLDR territory code of the country of the test order to create. Affects the currency and addresses of orders created through `template_name`, or the addresses of orders created through `test_order`. Acceptable values are: - \"`US`\" - \"`FR`\" Defaults to \"`US`\".", - "type": "string" - }, - "templateName": { - "description": "The test order template to use. Specify as an alternative to `testOrder` as a shortcut for retrieving a template and then creating an order using that template. Acceptable values are: - \"`template1`\" - \"`template1a`\" - \"`template1b`\" - \"`template2`\" - \"`template3`\" ", + "linkedAccountId": { + "description": "The ID of the linked account.", "type": "string" }, - "testOrder": { - "$ref": "TestOrder", - "description": "The test order to create." + "services": { + "description": "List of provided services.", + "items": { + "$ref": "LinkService" + }, + "type": "array" } }, "type": "object" }, - "OrdersCreateTestOrderResponse": { - "id": "OrdersCreateTestOrderResponse", + "ListAccountLabelsResponse": { + "description": "Response message for the `ListAccountLabels` method.", + "id": "ListAccountLabelsResponse", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCreateTestOrderResponse`\".", - "type": "string" + "accountLabels": { + "description": "The labels from the specified account.", + "items": { + "$ref": "AccountLabel" + }, + "type": "array" }, - "orderId": { - "description": "The ID of the newly created test order.", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" } }, "type": "object" }, - "OrdersCreateTestReturnRequest": { - "id": "OrdersCreateTestReturnRequest", + "ListAccountReturnCarrierResponse": { + "description": "Response for listing account return carriers.", + "id": "ListAccountReturnCarrierResponse", "properties": { - "items": { - "description": "Returned items.", + "accountReturnCarriers": { + "description": "List of all available account return carriers for the merchant.", "items": { - "$ref": "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem" + "$ref": "AccountReturnCarrier" }, "type": "array" } }, "type": "object" }, - "OrdersCreateTestReturnResponse": { - "id": "OrdersCreateTestReturnResponse", + "ListCollectionStatusesResponse": { + "description": "Response message for the ListCollectionStatuses method.", + "id": "ListCollectionStatusesResponse", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersCreateTestReturnResponse`\".", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "returnId": { - "description": "The ID of the newly created test order return.", - "type": "string" + "resources": { + "description": "The collectionstatuses listed.", + "items": { + "$ref": "CollectionStatus" + }, + "type": "array" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem": { - "id": "OrdersCustomBatchRequestEntryCreateTestReturnReturnItem", + "ListCollectionsResponse": { + "description": "Response message for the ListCollections method.", + "id": "ListCollectionsResponse", "properties": { - "lineItemId": { - "description": "The ID of the line item to return.", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "quantity": { - "description": "Quantity that is returned.", - "format": "uint32", - "type": "integer" + "resources": { + "description": "The collections listed.", + "items": { + "$ref": "Collection" + }, + "type": "array" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryRefundItemItem": { - "id": "OrdersCustomBatchRequestEntryRefundItemItem", + "ListConversionSourcesResponse": { + "description": "Response message for the ListConversionSources method.", + "id": "ListConversionSourcesResponse", "properties": { - "amount": { - "$ref": "MonetaryAmount", - "description": "The total amount that is refunded. (for example, refunding $5 each for 2 products should be done by setting quantity to 2 and amount to 10$) In case of multiple refunds, this should be the amount you currently want to refund to the customer." - }, - "fullRefund": { - "description": "If true, the full item will be refunded. If this is true, amount shouldn't be provided and will be ignored.", - "type": "boolean" - }, - "lineItemId": { - "description": "The ID of the line item. Either lineItemId or productId is required.", - "type": "string" + "conversionSources": { + "description": "List of conversion sources.", + "items": { + "$ref": "ConversionSource" + }, + "type": "array" }, - "productId": { - "description": "The ID of the product. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "nextPageToken": { + "description": "Token to be used to fetch the next results page.", "type": "string" - }, - "quantity": { - "description": "The number of products that are refunded.", - "format": "int32", - "type": "integer" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryRefundItemShipping": { - "id": "OrdersCustomBatchRequestEntryRefundItemShipping", + "ListCssesResponse": { + "description": "The response message for the `ListCsses` method", + "id": "ListCssesResponse", "properties": { - "amount": { - "$ref": "Price", - "description": "The amount that is refunded. If this is not the first refund for the shipment, this should be the newly refunded amount." + "csses": { + "description": "The CSS domains affiliated with the specified CSS group.", + "items": { + "$ref": "Css" + }, + "type": "array" }, - "fullRefund": { - "description": "If set to true, all shipping costs for the order will be refunded. If this is true, amount shouldn't be provided and will be ignored. If set to false, submit the amount of the partial shipping refund, excluding the shipping tax. The shipping tax is calculated and handled on Google's side.", - "type": "boolean" + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo": { - "id": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo", + "ListMethodQuotasResponse": { + "description": "Response message for the ListMethodQuotas method.", + "id": "ListMethodQuotasResponse", "properties": { - "carrier": { - "description": "The carrier handling the shipment. See `shipments[].carrier` in the Orders resource representation for a list of acceptable values.", - "type": "string" - }, - "shipmentId": { - "description": "Required. The ID of the shipment. This is assigned by the merchant and is unique to each shipment.", - "type": "string" + "methodQuotas": { + "description": "The current quota usage and limits per each method.", + "items": { + "$ref": "MethodQuota" + }, + "type": "array" }, - "trackingId": { - "description": "The tracking ID for the shipment.", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" } }, "type": "object" }, - "OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails": { - "description": "ScheduledDeliveryDetails used to update the scheduled delivery order.", - "id": "OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails", + "ListPromotionResponse": { + "description": "Response message for Promotions.List method.", + "id": "ListPromotionResponse", "properties": { - "carrierPhoneNumber": { - "description": "The phone number of the carrier fulfilling the delivery. The phone number should be formatted as the international notation in", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "scheduledDate": { - "description": "The date a shipment is scheduled for delivery, in ISO 8601 format.", - "type": "string" + "promotions": { + "description": "List of all available promotions for the merchant.", + "items": { + "$ref": "Promotion" + }, + "type": "array" } }, "type": "object" }, - "OrdersGetByMerchantOrderIdResponse": { - "id": "OrdersGetByMerchantOrderIdResponse", + "ListRegionsResponse": { + "description": "Response message for the `ListRegions` method.", + "id": "ListRegionsResponse", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersGetByMerchantOrderIdResponse`\".", + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "order": { - "$ref": "Order", - "description": "The requested order." + "regions": { + "description": "The regions from the specified merchant.", + "items": { + "$ref": "Region" + }, + "type": "array" } }, "type": "object" }, - "OrdersGetTestOrderTemplateResponse": { - "id": "OrdersGetTestOrderTemplateResponse", + "ListReturnPolicyOnlineResponse": { + "description": "Response message for the `ListReturnPolicyOnline` method.", + "id": "ListReturnPolicyOnlineResponse", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersGetTestOrderTemplateResponse`\".", - "type": "string" - }, - "template": { - "$ref": "TestOrder", - "description": "The requested test order template." + "returnPolicies": { + "description": "The retrieved return policies.", + "items": { + "$ref": "ReturnPolicyOnline" + }, + "type": "array" } }, "type": "object" }, - "OrdersInStoreRefundLineItemRequest": { - "id": "OrdersInStoreRefundLineItemRequest", + "LocalInventory": { + "description": "Local inventory resource. For accepted attribute values, see the local product inventory feed specification.", + "id": "LocalInventory", "properties": { - "lineItemId": { - "description": "The ID of the line item to return. Either lineItemId or productId is required.", + "availability": { + "description": "The availability of the product. For accepted attribute values, see the local product inventory feed specification.", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "customAttributes": { + "description": "A list of custom (merchant-provided) attributes. Can also be used to submit any attribute of the feed specification in its generic form, for example, `{ \"name\": \"size type\", \"value\": \"regular\" }`.", + "items": { + "$ref": "CustomAttribute" + }, + "type": "array" + }, + "instoreProductLocation": { + "description": "The in-store product location.", "type": "string" }, - "priceAmount": { - "$ref": "Price", - "description": "The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. Required." + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localInventory`\"", + "type": "string" }, - "productId": { - "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "pickupMethod": { + "description": "The supported pickup method for this offer. Unless the value is \"not supported\", this field must be submitted together with `pickupSla`. For accepted attribute values, see the local product inventory feed specification.", "type": "string" }, + "pickupSla": { + "description": "The expected date that an order will be ready for pickup relative to the order date. Must be submitted together with `pickupMethod`. For accepted attribute values, see the local product inventory feed specification.", + "type": "string" + }, + "price": { + "$ref": "Price", + "description": "The price of the product." + }, "quantity": { - "description": "The quantity to return and refund.", + "description": "The quantity of the product. Must be nonnegative.", + "format": "uint32", + "type": "integer" + }, + "salePrice": { + "$ref": "Price", + "description": "The sale price of the product. Mandatory if `sale_price_effective_date` is defined." + }, + "salePriceEffectiveDate": { + "description": "A date range represented by a pair of ISO 8601 dates separated by a space, comma, or slash. Both dates may be specified as 'null' if undecided.", + "type": "string" + }, + "storeCode": { + "description": "Required. The store code of this local inventory resource.", + "type": "string" + } + }, + "type": "object" + }, + "LocalinventoryCustomBatchRequest": { + "id": "LocalinventoryCustomBatchRequest", + "properties": { + "entries": { + "description": "The request entries to be processed in the batch.", + "items": { + "$ref": "LocalinventoryCustomBatchRequestEntry" + }, + "type": "array" + } + }, + "type": "object" + }, + "LocalinventoryCustomBatchRequestEntry": { + "description": "Batch entry encoding a single local inventory update request.", + "id": "LocalinventoryCustomBatchRequestEntry", + "properties": { + "batchId": { + "description": "An entry ID, unique within the batch request.", "format": "uint32", "type": "integer" }, - "reason": { - "description": "The reason for the return. Acceptable values are: - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`other`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`qualityNotAsExpected`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", + "localInventory": { + "$ref": "LocalInventory", + "description": "Local inventory of the product." + }, + "merchantId": { + "description": "The ID of the managing account.", + "format": "uint64", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "method": { + "description": "Method of the batch request entry. Acceptable values are: - \"`insert`\" ", "type": "string" }, - "taxAmount": { - "$ref": "Price", - "description": "The amount of tax to be refunded. Required." + "productId": { + "description": "The ID of the product for which to update local inventory.", + "type": "string" } }, "type": "object" }, - "OrdersInStoreRefundLineItemResponse": { - "id": "OrdersInStoreRefundLineItemResponse", + "LocalinventoryCustomBatchResponse": { + "id": "LocalinventoryCustomBatchResponse", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" + "entries": { + "description": "The result of the execution of the batch requests.", + "items": { + "$ref": "LocalinventoryCustomBatchResponseEntry" + }, + "type": "array" }, "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersInStoreRefundLineItemResponse`\".", + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponse`\".", "type": "string" } }, "type": "object" }, - "OrdersListResponse": { - "id": "OrdersListResponse", + "LocalinventoryCustomBatchResponseEntry": { + "description": "Batch entry encoding a single local inventory update response.", + "id": "LocalinventoryCustomBatchResponseEntry", "properties": { - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersListResponse`\".", - "type": "string" + "batchId": { + "description": "The ID of the request entry this entry responds to.", + "format": "uint32", + "type": "integer" }, - "nextPageToken": { - "description": "The token for the retrieval of the next page of orders.", - "type": "string" + "errors": { + "$ref": "Errors", + "description": "A list of errors for failed custombatch entries. *Note:* Schema errors fail the whole request." }, - "resources": { - "items": { - "$ref": "Order" - }, - "type": "array" + "kind": { + "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#localinventoryCustomBatchResponseEntry`\"", + "type": "string" } }, "type": "object" }, - "OrdersRefundItemRequest": { - "id": "OrdersRefundItemRequest", + "LocationIdSet": { + "id": "LocationIdSet", "properties": { - "items": { - "description": "The items that are refunded. Either Item or Shipping must be provided in the request.", + "locationIds": { + "description": "A non-empty list of location IDs. They must all be of the same location type (for example, state).", "items": { - "$ref": "OrdersCustomBatchRequestEntryRefundItemItem" + "type": "string" }, "type": "array" + } + }, + "type": "object" + }, + "LoyaltyProgram": { + "description": "Allows the setting up of loyalty program benefits (for example price or points). https://support.google.com/merchants/answer/12922446", + "id": "LoyaltyProgram", + "properties": { + "cashbackForFutureUse": { + "$ref": "Price", + "description": "Optional. The cashback that can be used for future purchases." }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "loyaltyPoints": { + "description": "Optional. The amount of loyalty points earned on a purchase.", + "format": "int64", "type": "string" }, - "reason": { - "description": "The reason for the refund. Acceptable values are: - \"`shippingCostAdjustment`\" - \"`priceAdjustment`\" - \"`taxAdjustment`\" - \"`feeAdjustment`\" - \"`courtesyAdjustment`\" - \"`adjustment`\" - \"`customerCancelled`\" - \"`noInventory`\" - \"`productNotAsDescribed`\" - \"`undeliverableShippingAddress`\" - \"`wrongProductShipped`\" - \"`lateShipmentCredit`\" - \"`deliveredLateByCarrier`\" - \"`productArrivedDamaged`\" ", + "memberPriceEffectiveDate": { + "description": "Optional. A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", - "type": "string" + "price": { + "$ref": "Price", + "description": "Optional. The price for members of the given tier (instant discount price). Must be smaller or equal to the regular price." }, - "shipping": { - "$ref": "OrdersCustomBatchRequestEntryRefundItemShipping", - "description": "The refund on shipping. Optional, but either Item or Shipping must be provided in the request." - } - }, - "type": "object" - }, - "OrdersRefundItemResponse": { - "id": "OrdersRefundItemResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "programLabel": { + "description": "Required. The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. It must be provided so that system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersRefundItemResponse`\".", + "tierLabel": { + "description": "Required. The label of the tier within the loyalty program. Must match one of the labels within the program.", "type": "string" } }, "type": "object" }, - "OrdersRefundOrderRequest": { - "id": "OrdersRefundOrderRequest", + "MerchantCenterDestination": { + "description": "\"Merchant Center Destination\" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created.", + "id": "MerchantCenterDestination", "properties": { - "amount": { - "$ref": "MonetaryAmount", - "description": "The amount that is refunded. If this is not the first refund for the order, this should be the newly refunded amount." - }, - "fullRefund": { - "description": "If true, the full order will be refunded, including shipping. If this is true, amount shouldn't be provided and will be ignored.", - "type": "boolean" + "attributionSettings": { + "$ref": "AttributionSettings", + "description": "Required. Attribution settings being used for the Merchant Center Destination." }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "currencyCode": { + "description": "Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.", "type": "string" }, - "reason": { - "description": "The reason for the refund. Acceptable values are: - \"`courtesyAdjustment`\" - \"`other`\" ", + "destinationId": { + "description": "Output only. Merchant Center Destination ID.", + "readOnly": true, "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "displayName": { + "description": "Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.", "type": "string" } }, "type": "object" }, - "OrdersRefundOrderResponse": { - "id": "OrdersRefundOrderResponse", + "MethodQuota": { + "description": "The quota information per method in the Content API.", + "id": "MethodQuota", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "method": { + "description": "Output only. The method name, for example `products.list`. Method name does not contain version because quota can be shared between different API versions of the same method.", + "readOnly": true, "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersRefundOrderResponse`\".", + "quotaLimit": { + "description": "Output only. The maximum number of calls allowed per day for the method.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "quotaMinuteLimit": { + "description": "Output only. The maximum number of calls allowed per minute for the method.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "quotaUsage": { + "description": "Output only. The current quota usage, meaning the number of calls already made to the method per day. Usage is reset every day at 12 PM midday UTC.", + "format": "int64", + "readOnly": true, "type": "string" } }, "type": "object" }, - "OrdersRejectReturnLineItemRequest": { - "id": "OrdersRejectReturnLineItemRequest", + "Metrics": { + "description": "Performance metrics. Values are only set for metrics requested explicitly in the request's search query.", + "id": "Metrics", "properties": { - "lineItemId": { - "description": "The ID of the line item to return. Either lineItemId or productId is required.", - "type": "string" + "aos": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average order size - the average number of items in an order. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "double", + "type": "number" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" + "aovMicros": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average order value in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) - the average value (total price of items) of all placed orders. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "double", + "type": "number" }, - "productId": { - "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "clicks": { + "description": "Number of clicks.", + "format": "int64", "type": "string" }, - "quantity": { - "description": "The quantity to return and refund.", - "format": "uint32", - "type": "integer" + "conversionRate": { + "description": "Number of conversions divided by the number of clicks, reported on the impression date. The metric is currently available only for the `FREE_PRODUCT_LISTING` program.", + "format": "double", + "type": "number" }, - "reason": { - "description": "The reason for the return. Acceptable values are: - \"`damagedOrUsed`\" - \"`missingComponent`\" - \"`notEligible`\" - \"`other`\" - \"`outOfReturnWindow`\" ", + "conversionValueMicros": { + "description": "Value of conversions in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) attributed to the product, reported on the conversion date. The metric is currently available only for the `FREE_PRODUCT_LISTING` program. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response.", + "format": "int64", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "conversions": { + "description": "Number of conversions attributed to the product, reported on the conversion date. Depending on the attribution model, a conversion might be distributed across multiple clicks, where each click gets its own credit assigned. This metric is a sum of all such credits. The metric is currently available only for the `FREE_PRODUCT_LISTING` program.", + "format": "double", + "type": "number" + }, + "ctr": { + "description": "Click-through rate - the number of clicks merchant's products receive (clicks) divided by the number of times the products are shown (impressions).", + "format": "double", + "type": "number" + }, + "daysToShip": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average number of days between an order being placed and the order being fully shipped, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "double", + "type": "number" + }, + "impressions": { + "description": "Number of times merchant's products are shown.", + "format": "int64", "type": "string" - } - }, - "type": "object" - }, - "OrdersRejectReturnLineItemResponse": { - "id": "OrdersRejectReturnLineItemResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + }, + "itemDaysToShip": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Average number of days between an item being ordered and the item being **This metric cannot be segmented by customer_country_code.**", + "format": "double", + "type": "number" + }, + "itemFillRate": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Percentage of shipped items in relation to all finalized items (shipped or rejected by the merchant; unshipped items are not taken into account), reported on the order date. Item fill rate is lowered by merchant rejections. **This metric cannot be segmented by customer_country_code.**", + "format": "double", + "type": "number" + }, + "orderedItemSalesMicros": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of ordered items in micros (1 millionth of a standard unit, 1 USD = 1000000 micros). Excludes shipping, taxes (US only), and customer cancellations that happened within 30 minutes of placing the order. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersRejectReturnLineItemResponse`\".", + "orderedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" - } - }, - "type": "object" - }, - "OrdersReturnRefundLineItemRequest": { - "id": "OrdersReturnRefundLineItemRequest", - "properties": { - "lineItemId": { - "description": "The ID of the line item to return. Either lineItemId or productId is required.", + }, + "orders": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of placed orders. Excludes customer cancellations that happened within 30 minutes of placing the order. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "int64", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "rejectedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items canceled by the merchant, reported on the order date. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" }, - "priceAmount": { - "$ref": "Price", - "description": "The amount to be refunded. This may be pre-tax or post-tax depending on the location of the order. If omitted, refundless return is assumed." + "returnRate": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of returned items divided by the total price of shipped items, reported on the order date. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", + "format": "double", + "type": "number" }, - "productId": { - "description": "The ID of the product to return. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "returnedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items sent back for return, reported on the date when the merchant accepted the return. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" }, - "quantity": { - "description": "The quantity to return and refund. Quantity is required.", - "format": "uint32", - "type": "integer" + "returnsMicros": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of ordered items sent back for return in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), reported on the date when the merchant accepted the return. The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", + "type": "string" }, - "reason": { - "description": "The reason for the return. Acceptable values are: - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`invalidCoupon`\" - \"`malformedShippingAddress`\" - \"`other`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`qualityNotAsExpected`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", + "shippedItemSalesMicros": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Total price of shipped items in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), reported on the order date. Excludes shipping and taxes (US only). The currency of the returned value is stored in the currency_code segment. If this metric is selected, 'segments.currency_code' is automatically added to the SELECT clause in the search query (unless it is explicitly selected by the user) and the currency_code segment is populated in the response. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", + "type": "string" + }, + "shippedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of shipped items, reported on the shipment date. **This metric cannot be segmented by customer_country_code.**", + "format": "int64", "type": "string" }, - "reasonText": { - "description": "The explanation of the reason.", + "shippedOrders": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of fully shipped orders, reported on the last shipment date. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "int64", "type": "string" }, - "taxAmount": { - "$ref": "Price", - "description": "The amount of tax to be refunded. Optional, but if filled, then priceAmount must be set. Calculated automatically if not provided." + "unshippedItems": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of ordered items not shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped items over the days in the queried period. **This metric cannot be segmented by customer_country_code.**", + "format": "double", + "type": "number" + }, + "unshippedOrders": { + "description": "*Deprecated*: This field is no longer supported and retrieving it returns 0 starting from May 2024. Number of orders not shipped or partially shipped up until the end of the queried day. If a multi-day period is specified in the search query, the returned value is the average number of unshipped orders over the days in the queried period. **This metric cannot be segmented by product dimensions and customer_country_code.**", + "format": "double", + "type": "number" } }, "type": "object" }, - "OrdersReturnRefundLineItemResponse": { - "id": "OrdersReturnRefundLineItemResponse", + "MinimumOrderValueTable": { + "id": "MinimumOrderValueTable", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", - "type": "string" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersReturnRefundLineItemResponse`\".", - "type": "string" + "storeCodeSetWithMovs": { + "items": { + "$ref": "MinimumOrderValueTableStoreCodeSetWithMov" + }, + "type": "array" } }, "type": "object" }, - "OrdersSetLineItemMetadataRequest": { - "id": "OrdersSetLineItemMetadataRequest", + "MinimumOrderValueTableStoreCodeSetWithMov": { + "description": "A list of store code sets sharing the same minimum order value. At least two sets are required and the last one must be empty, which signifies 'MOV for all other stores'. Each store code can only appear once across all the sets. All prices within a service must have the same currency.", + "id": "MinimumOrderValueTableStoreCodeSetWithMov", "properties": { - "annotations": { + "storeCodes": { + "description": "A list of unique store codes or empty for the catch all.", "items": { - "$ref": "OrderMerchantProvidedAnnotation" + "type": "string" }, "type": "array" }, - "lineItemId": { - "description": "The ID of the line item to set metadata. Either lineItemId or productId is required.", - "type": "string" - }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", - "type": "string" - }, - "productId": { - "description": "The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required.", - "type": "string" + "value": { + "$ref": "Price", + "description": "The minimum order value for the given stores." } }, "type": "object" }, - "OrdersSetLineItemMetadataResponse": { - "id": "OrdersSetLineItemMetadataResponse", + "OrderTrackingSignal": { + "description": "Represents a merchant trade from which signals are extracted, e.g. shipping.", + "id": "OrderTrackingSignal", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "customerShippingFee": { + "$ref": "PriceAmount", + "description": "The shipping fee of the order; this value should be set to zero in the case of free shipping." + }, + "deliveryPostalCode": { + "description": "Required. The delivery postal code, as a continuous string without spaces or dashes, e.g. \"95016\". This field will be anonymized in returned OrderTrackingSignal creation response.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersSetLineItemMetadataResponse`\".", + "deliveryRegionCode": { + "description": "Required. The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping destination.", "type": "string" - } - }, - "type": "object" - }, - "OrdersShipLineItemsRequest": { - "id": "OrdersShipLineItemsRequest", - "properties": { + }, "lineItems": { - "description": "Line items to ship.", + "description": "Information about line items in the order.", "items": { - "$ref": "OrderShipmentLineItemShipment" + "$ref": "OrderTrackingSignalLineItemDetails" }, "type": "array" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "merchantId": { + "description": "The Google merchant ID of this order tracking signal. This value is optional. If left unset, the caller's merchant ID is used. You must request access in order to provide data on behalf of another merchant. For more information, see [Submitting Order Tracking Signals](/shopping-content/guides/order-tracking-signals).", + "format": "int64", + "type": "string" + }, + "orderCreatedTime": { + "$ref": "DateTime", + "description": "Required. The time when the order was created on the merchant side. Include the year and timezone string, if available." + }, + "orderId": { + "description": "Required. The ID of the order on the merchant side. This field will be hashed in returned OrderTrackingSignal creation response.", "type": "string" }, - "shipmentGroupId": { - "description": "ID of the shipment group. Required for orders that use the orderinvoices service.", + "orderTrackingSignalId": { + "description": "Output only. The ID that uniquely identifies this order tracking signal.", + "format": "int64", + "readOnly": true, "type": "string" }, - "shipmentInfos": { - "description": "Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs).", + "shipmentLineItemMapping": { + "description": "The mapping of the line items to the shipment information.", + "items": { + "$ref": "OrderTrackingSignalShipmentLineItemMapping" + }, + "type": "array" + }, + "shippingInfo": { + "description": "The shipping information for the order.", "items": { - "$ref": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo" + "$ref": "OrderTrackingSignalShippingInfo" }, "type": "array" } }, "type": "object" }, - "OrdersShipLineItemsResponse": { - "id": "OrdersShipLineItemsResponse", + "OrderTrackingSignalLineItemDetails": { + "description": "The line items of the order.", + "id": "OrderTrackingSignalLineItemDetails", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "brand": { + "description": "Brand of the product.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersShipLineItemsResponse`\".", - "type": "string" - } - }, - "type": "object" - }, - "OrdersUpdateLineItemShippingDetailsRequest": { - "id": "OrdersUpdateLineItemShippingDetailsRequest", - "properties": { - "deliverByDate": { - "description": "Updated delivery by date, in ISO 8601 format. If not specified only ship by date is updated. Provided date should be within 1 year timeframe and can't be a date in the past.", + "gtin": { + "description": "The Global Trade Item Number.", "type": "string" }, "lineItemId": { - "description": "The ID of the line item to set metadata. Either lineItemId or productId is required.", + "description": "Required. The ID for this line item.", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "mpn": { + "description": "The manufacturer part number.", "type": "string" }, - "productId": { - "description": "The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required.", + "productDescription": { + "deprecated": true, + "description": "Plain text description of this product (deprecated: Please use product_title instead).", "type": "string" }, - "shipByDate": { - "description": "Updated ship by date, in ISO 8601 format. If not specified only deliver by date is updated. Provided date should be within 1 year timeframe and can't be a date in the past.", + "productId": { + "description": "Required. The Content API REST ID of the product, in the form channel:contentLanguage:targetCountry:offerId.", "type": "string" - } - }, - "type": "object" - }, - "OrdersUpdateLineItemShippingDetailsResponse": { - "id": "OrdersUpdateLineItemShippingDetailsResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + }, + "productTitle": { + "description": "Plain text title of this product.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersUpdateLineItemShippingDetailsResponse`\".", + "quantity": { + "description": "The quantity of the line item in the order.", + "format": "int64", "type": "string" - } - }, - "type": "object" - }, - "OrdersUpdateMerchantOrderIdRequest": { - "id": "OrdersUpdateMerchantOrderIdRequest", - "properties": { - "merchantOrderId": { - "description": "The merchant order id to be assigned to the order. Must be unique per merchant.", + }, + "sku": { + "deprecated": true, + "description": "Merchant SKU for this item (deprecated).", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "upc": { + "deprecated": true, + "description": "Universal product code for this item (deprecated: Please use GTIN instead).", "type": "string" } }, "type": "object" }, - "OrdersUpdateMerchantOrderIdResponse": { - "id": "OrdersUpdateMerchantOrderIdResponse", + "OrderTrackingSignalShipmentLineItemMapping": { + "description": "Represents how many items are in the shipment for the given shipment_id and line_item_id.", + "id": "OrderTrackingSignalShipmentLineItemMapping", "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "lineItemId": { + "description": "Required. The line item ID.", "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersUpdateMerchantOrderIdResponse`\".", + "quantity": { + "description": "The line item quantity in the shipment.", + "format": "int64", + "type": "string" + }, + "shipmentId": { + "description": "Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.", "type": "string" } }, "type": "object" }, - "OrdersUpdateShipmentRequest": { - "id": "OrdersUpdateShipmentRequest", + "OrderTrackingSignalShippingInfo": { + "description": "The shipping information for the order.", + "id": "OrderTrackingSignalShippingInfo", "properties": { - "carrier": { - "description": "The carrier handling the shipment. Not updated if missing. See `shipments[].carrier` in the Orders resource representation for a list of acceptable values.", - "type": "string" - }, - "deliveryDate": { - "description": "Date on which the shipment has been delivered, in ISO 8601 format. Optional and can be provided only if `status` is `delivered`.", - "type": "string" + "actualDeliveryTime": { + "$ref": "DateTime", + "description": "The time when the shipment was actually delivered. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." }, - "lastPickupDate": { - "description": "Date after which the pickup will expire, in ISO 8601 format. Required only when order is buy-online-pickup-in-store(BOPIS) and `status` is `ready for pickup`.", + "carrierName": { + "description": "The name of the shipping carrier for the delivery. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.", "type": "string" }, - "operationId": { - "description": "The ID of the operation. Unique across all operations for a given order.", + "carrierServiceName": { + "description": "The service type for fulfillment, e.g., GROUND, FIRST_CLASS, etc.", "type": "string" }, - "readyPickupDate": { - "description": "Date on which the shipment has been ready for pickup, in ISO 8601 format. Optional and can be provided only if `status` is `ready for pickup`.", - "type": "string" + "earliestDeliveryPromiseTime": { + "$ref": "DateTime", + "description": "The earliest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." }, - "scheduledDeliveryDetails": { - "$ref": "OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails", - "description": "Delivery details of the shipment if scheduling is needed." + "latestDeliveryPromiseTime": { + "$ref": "DateTime", + "description": "The latest delivery promised time. Include the year and timezone string, if available. This field is required, if one of the following fields is absent: tracking_id or carrier_name." }, - "shipmentId": { - "description": "The ID of the shipment.", + "originPostalCode": { + "description": "The origin postal code, as a continuous string without spaces or dashes, e.g. \"95016\". This field will be anonymized in returned OrderTrackingSignal creation response.", "type": "string" }, - "status": { - "description": "New status for the shipment. Not updated if missing. Acceptable values are: - \"`delivered`\" - \"`undeliverable`\" - \"`readyForPickup`\" ", + "originRegionCode": { + "description": "The [CLDR territory code] (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the shipping origin.", "type": "string" }, - "trackingId": { - "description": "The tracking ID for the shipment. Not updated if missing.", + "shipmentId": { + "description": "Required. The shipment ID. This field will be hashed in returned OrderTrackingSignal creation response.", "type": "string" }, - "undeliveredDate": { - "description": "Date on which the shipment has been undeliverable, in ISO 8601 format. Optional and can be provided only if `status` is `undeliverable`.", - "type": "string" - } - }, - "type": "object" - }, - "OrdersUpdateShipmentResponse": { - "id": "OrdersUpdateShipmentResponse", - "properties": { - "executionStatus": { - "description": "The status of the execution. Acceptable values are: - \"`duplicate`\" - \"`executed`\" ", + "shippedTime": { + "$ref": "DateTime", + "description": "The time when the shipment was shipped. Include the year and timezone string, if available." + }, + "shippingStatus": { + "description": "The status of the shipment.", + "enum": [ + "SHIPPING_STATE_UNSPECIFIED", + "SHIPPED", + "DELIVERED" + ], + "enumDescriptions": [ + "The shipping status is not known to merchant.", + "All items are shipped.", + "The shipment is already delivered." + ], "type": "string" }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#ordersUpdateShipmentResponse`\".", + "trackingId": { + "description": "The tracking ID of the shipment. This field is required if one of the following fields is absent: earliest_delivery_promise_time, latest_delivery_promise_time, and actual_delivery_time.", "type": "string" } }, "type": "object" }, - "PauseBuyOnGoogleProgramRequest": { - "description": "Request message for the PauseProgram method.", - "id": "PauseBuyOnGoogleProgramRequest", - "properties": {}, - "type": "object" - }, "PaymentServiceProviderLinkInfo": { "description": "Additional information required for PAYMENT_SERVICE_PROVIDER link type.", "id": "PaymentServiceProviderLinkInfo", @@ -14553,24 +10681,6 @@ }, "type": "object" }, - "ProductAmount": { - "id": "ProductAmount", - "properties": { - "priceAmount": { - "$ref": "Price", - "description": "The pre-tax or post-tax price depending on the location of the order." - }, - "remittedTaxAmount": { - "$ref": "Price", - "description": "Remitted tax value." - }, - "taxAmount": { - "$ref": "Price", - "description": "Tax value." - } - }, - "type": "object" - }, "ProductCertification": { "description": "Product [certification](https://support.google.com/merchants/answer/13528839), introduced for EU energy efficiency labeling compliance using the [EU EPREL](https://eprel.ec.europa.eu/screen/home) database.", "id": "ProductCertification", @@ -16229,20 +12339,6 @@ }, "type": "object" }, - "RefundReason": { - "id": "RefundReason", - "properties": { - "description": { - "description": "Description of the reason.", - "type": "string" - }, - "reasonCode": { - "description": "Code of the refund reason. Acceptable values are: - \"`adjustment`\" - \"`autoPostInternal`\" - \"`autoPostInvalidBillingAddress`\" - \"`autoPostNoInventory`\" - \"`autoPostPriceError`\" - \"`autoPostUndeliverableShippingAddress`\" - \"`couponAbuse`\" - \"`courtesyAdjustment`\" - \"`customerCanceled`\" - \"`customerDiscretionaryReturn`\" - \"`customerInitiatedMerchantCancel`\" - \"`customerSupportRequested`\" - \"`deliveredLateByCarrier`\" - \"`deliveredTooLate`\" - \"`expiredItem`\" - \"`failToPushOrderGoogleError`\" - \"`failToPushOrderMerchantError`\" - \"`failToPushOrderMerchantFulfillmentError`\" - \"`failToPushOrderToMerchant`\" - \"`failToPushOrderToMerchantOutOfStock`\" - \"`feeAdjustment`\" - \"`invalidCoupon`\" - \"`lateShipmentCredit`\" - \"`malformedShippingAddress`\" - \"`merchantDidNotShipOnTime`\" - \"`noInventory`\" - \"`orderTimeout`\" - \"`other`\" - \"`paymentAbuse`\" - \"`paymentDeclined`\" - \"`priceAdjustment`\" - \"`priceError`\" - \"`productArrivedDamaged`\" - \"`productNotAsDescribed`\" - \"`promoReallocation`\" - \"`qualityNotAsExpected`\" - \"`returnRefundAbuse`\" - \"`shippingCostAdjustment`\" - \"`shippingPriceError`\" - \"`taxAdjustment`\" - \"`taxError`\" - \"`undeliverableShippingAddress`\" - \"`unsupportedPoBoxAddress`\" - \"`wrongProductShipped`\" ", - "type": "string" - } - }, - "type": "object" - }, "Region": { "description": "Represents a geographic region that you can use as a target with both the `RegionalInventory` and `ShippingSettings` services. You can define regions as collections of either postal codes or, in some countries, using predefined geotargets.", "id": "Region", @@ -16678,12 +12774,6 @@ }, "type": "object" }, - "RequestReviewBuyOnGoogleProgramRequest": { - "description": "Request message for the RequestReviewProgram method.", - "id": "RequestReviewBuyOnGoogleProgramRequest", - "properties": {}, - "type": "object" - }, "RequestReviewFreeListingsRequest": { "description": "Request message for the RequestReviewFreeListings Program method.", "id": "RequestReviewFreeListingsRequest", @@ -17013,122 +13103,40 @@ }, "ReturnPolicyPolicy": { "id": "ReturnPolicyPolicy", - "properties": { - "lastReturnDate": { - "description": "Required. Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to \"lastReturnDate\". Use this for seasonal overrides only.", - "type": "string" - }, - "numberOfDays": { - "description": "The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to \"numberOfDaysAfterDelivery\". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "Policy type. Use \"lastReturnDate\" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items. Acceptable values are: - \"`lastReturnDate`\" - \"`lifetimeReturns`\" - \"`noReturns`\" - \"`numberOfDaysAfterDelivery`\" ", - "type": "string" - } - }, - "type": "object" - }, - "ReturnPolicySeasonalOverride": { - "id": "ReturnPolicySeasonalOverride", - "properties": { - "endDate": { - "description": "Required. Last day on which the override applies. In ISO 8601 format.", - "type": "string" - }, - "name": { - "description": "Required. The name of the seasonal override as shown in Merchant Center.", - "type": "string" - }, - "policy": { - "$ref": "ReturnPolicyPolicy", - "description": "Required. The policy which is in effect during that time." - }, - "startDate": { - "description": "Required. First day on which the override applies. In ISO 8601 format.", - "type": "string" - } - }, - "type": "object" - }, - "ReturnPricingInfo": { - "id": "ReturnPricingInfo", - "properties": { - "chargeReturnShippingFee": { - "description": "Default option for whether merchant should charge the customer for return shipping costs, based on customer selected return reason and merchant's return policy for the items being returned.", - "type": "boolean" - }, - "maxReturnShippingFee": { - "$ref": "MonetaryAmount", - "description": "Maximum return shipping costs that may be charged to the customer depending on merchant's assessment of the return reason and the merchant's return policy for the items being returned." - }, - "refundableItemsTotalAmount": { - "$ref": "MonetaryAmount", - "description": "Total amount that can be refunded for the items in this return. It represents the total amount received by the merchant for the items, after applying merchant coupons." - }, - "refundableShippingAmount": { - "$ref": "MonetaryAmount", - "description": "Maximum amount that can be refunded for the original shipping fee." - }, - "totalRefundedAmount": { - "$ref": "MonetaryAmount", - "description": "Total amount already refunded by the merchant. It includes all types of refunds (items, shipping, etc.) Not provided if no refund has been applied yet." - } - }, - "type": "object" - }, - "ReturnShipment": { - "id": "ReturnShipment", - "properties": { - "creationDate": { - "description": "The date of creation of the shipment, in ISO 8601 format.", - "type": "string" - }, - "deliveryDate": { - "description": "The date of delivery of the shipment, in ISO 8601 format.", - "type": "string" - }, - "returnMethodType": { - "description": "Type of the return method. Acceptable values are: - \"`byMail`\" - \"`contactCustomerSupport`\" - \"`returnless`\" - \"`inStore`\" ", - "type": "string" - }, - "shipmentId": { - "description": "Shipment ID generated by Google.", + "properties": { + "lastReturnDate": { + "description": "Required. Last day for returning the items. In ISO 8601 format. When specifying the return window like this, set the policy type to \"lastReturnDate\". Use this for seasonal overrides only.", "type": "string" }, - "shipmentTrackingInfos": { - "description": "Tracking information of the shipment. One return shipment might be handled by several shipping carriers sequentially.", - "items": { - "$ref": "ShipmentTrackingInfo" - }, - "type": "array" - }, - "shippingDate": { - "description": "The date of shipping of the shipment, in ISO 8601 format.", + "numberOfDays": { + "description": "The number of days items can be returned after delivery, where one day is defined to be 24 hours after the delivery timestamp. When specifying the return window like this, set the policy type to \"numberOfDaysAfterDelivery\". Acceptable values are 30, 45, 60, 90, 100, 180, 270 and 365 for the default policy. Additional policies further allow 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics. A policy of less than 30 days can only be applied to those items.", + "format": "int64", "type": "string" }, - "state": { - "description": "State of the shipment. Acceptable values are: - \"`completed`\" - \"`new`\" - \"`shipped`\" - \"`undeliverable`\" - \"`pending`\" ", + "type": { + "description": "Policy type. Use \"lastReturnDate\" for seasonal overrides only. Note that for most items a minimum of 30 days is required for returns. Exceptions may be made for electronics or non-returnable items such as food, perishables, and living things. A policy of less than 30 days can only be applied to those items. Acceptable values are: - \"`lastReturnDate`\" - \"`lifetimeReturns`\" - \"`noReturns`\" - \"`numberOfDaysAfterDelivery`\" ", "type": "string" } }, "type": "object" }, - "ReturnShippingLabel": { - "description": "Return shipping label for a Buy on Google merchant-managed return.", - "id": "ReturnShippingLabel", + "ReturnPolicySeasonalOverride": { + "id": "ReturnPolicySeasonalOverride", "properties": { - "carrier": { - "description": "Name of the carrier.", + "endDate": { + "description": "Required. Last day on which the override applies. In ISO 8601 format.", "type": "string" }, - "labelUri": { - "description": "The URL for the return shipping label in PDF format", + "name": { + "description": "Required. The name of the seasonal override as shown in Merchant Center.", "type": "string" }, - "trackingId": { - "description": "The tracking id of this return label.", + "policy": { + "$ref": "ReturnPolicyPolicy", + "description": "Required. The policy which is in effect during that time." + }, + "startDate": { + "description": "Required. First day on which the override applies. In ISO 8601 format.", "type": "string" } }, @@ -17803,66 +13811,6 @@ }, "type": "object" }, - "ShipmentInvoice": { - "id": "ShipmentInvoice", - "properties": { - "invoiceSummary": { - "$ref": "InvoiceSummary", - "description": "[required] Invoice summary." - }, - "lineItemInvoices": { - "description": "[required] Invoice details per line item.", - "items": { - "$ref": "ShipmentInvoiceLineItemInvoice" - }, - "type": "array" - }, - "shipmentGroupId": { - "description": "[required] ID of the shipment group. It is assigned by the merchant in the `shipLineItems` method and is used to group multiple line items that have the same kind of shipping charges.", - "type": "string" - } - }, - "type": "object" - }, - "ShipmentInvoiceLineItemInvoice": { - "id": "ShipmentInvoiceLineItemInvoice", - "properties": { - "lineItemId": { - "description": "ID of the line item. Either lineItemId or productId must be set.", - "type": "string" - }, - "productId": { - "description": "ID of the product. This is the REST ID used in the products service. Either lineItemId or productId must be set.", - "type": "string" - }, - "shipmentUnitIds": { - "description": "[required] The shipment unit ID is assigned by the merchant and defines individual quantities within a line item. The same ID can be assigned to units that are the same while units that differ must be assigned a different ID (for example: free or promotional units).", - "items": { - "type": "string" - }, - "type": "array" - }, - "unitInvoice": { - "$ref": "UnitInvoice", - "description": "[required] Invoice details for a single unit." - } - }, - "type": "object" - }, - "ShipmentTrackingInfo": { - "id": "ShipmentTrackingInfo", - "properties": { - "carrier": { - "description": "The shipping carrier that handles the package. Acceptable values are: - \"`boxtal`\" - \"`bpost`\" - \"`chronopost`\" - \"`colisPrive`\" - \"`colissimo`\" - \"`cxt`\" - \"`deliv`\" - \"`dhl`\" - \"`dpd`\" - \"`dynamex`\" - \"`eCourier`\" - \"`easypost`\" - \"`efw`\" - \"`fedex`\" - \"`fedexSmartpost`\" - \"`geodis`\" - \"`gls`\" - \"`googleCourier`\" - \"`gsx`\" - \"`jdLogistics`\" - \"`laPoste`\" - \"`lasership`\" - \"`manual`\" - \"`mpx`\" - \"`onTrac`\" - \"`other`\" - \"`tnt`\" - \"`uds`\" - \"`ups`\" - \"`usps`\" ", - "type": "string" - }, - "trackingNumber": { - "description": "The tracking number for the package.", - "type": "string" - } - }, - "type": "object" - }, "ShippingSettings": { "description": "The merchant account's shipping settings. All methods except getsupportedcarriers and getsupportedholidays require the admin role.", "id": "ShippingSettings", @@ -18220,258 +14168,6 @@ }, "type": "object" }, - "TestOrder": { - "id": "TestOrder", - "properties": { - "deliveryDetails": { - "$ref": "TestOrderDeliveryDetails", - "description": "Overrides the predefined delivery details if provided." - }, - "enableOrderinvoices": { - "description": "Whether the orderinvoices service should support this order.", - "type": "boolean" - }, - "kind": { - "description": "Identifies what kind of resource this is. Value: the fixed string \"`content#testOrder`\"", - "type": "string" - }, - "lineItems": { - "description": "Required. Line items that are ordered. At least one line item must be provided.", - "items": { - "$ref": "TestOrderLineItem" - }, - "type": "array" - }, - "notificationMode": { - "description": "Restricted. Do not use.", - "type": "string" - }, - "pickupDetails": { - "$ref": "TestOrderPickupDetails", - "description": "Overrides the predefined pickup details if provided." - }, - "predefinedBillingAddress": { - "description": "Required. The billing address. Acceptable values are: - \"`dwight`\" - \"`jim`\" - \"`pam`\" ", - "type": "string" - }, - "predefinedDeliveryAddress": { - "description": "Required. Identifier of one of the predefined delivery addresses for the delivery. Acceptable values are: - \"`dwight`\" - \"`jim`\" - \"`pam`\" ", - "type": "string" - }, - "predefinedEmail": { - "description": "Required. Email address of the customer. Acceptable values are: - \"`pog.dwight.schrute@gmail.com`\" - \"`pog.jim.halpert@gmail.com`\" - \"`penpog.pam.beesly@gmail.comding`\" ", - "type": "string" - }, - "predefinedPickupDetails": { - "description": "Identifier of one of the predefined pickup details. Required for orders containing line items with shipping type `pickup`. Acceptable values are: - \"`dwight`\" - \"`jim`\" - \"`pam`\" ", - "type": "string" - }, - "promotions": { - "description": "Promotions associated with the order.", - "items": { - "$ref": "OrderPromotion" - }, - "type": "array" - }, - "shippingCost": { - "$ref": "Price", - "description": "Required. The price of shipping for all items. Shipping tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied. Note that shipping is not taxed in certain states." - }, - "shippingOption": { - "description": "Required. The requested shipping option. Acceptable values are: - \"`economy`\" - \"`expedited`\" - \"`oneDay`\" - \"`sameDay`\" - \"`standard`\" - \"`twoDay`\" ", - "type": "string" - } - }, - "type": "object" - }, - "TestOrderAddress": { - "id": "TestOrderAddress", - "properties": { - "country": { - "description": "CLDR country code (for example, \"US\").", - "type": "string" - }, - "fullAddress": { - "description": "Strings representing the lines of the printed label for mailing the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, CA, 94043 United States ", - "items": { - "type": "string" - }, - "type": "array" - }, - "isPostOfficeBox": { - "description": "Whether the address is a post office box.", - "type": "boolean" - }, - "locality": { - "description": "City, town or commune. May also include dependent localities or sublocalities (for example, neighborhoods or suburbs).", - "type": "string" - }, - "postalCode": { - "description": "Postal Code or ZIP (for example, \"94043\").", - "type": "string" - }, - "recipientName": { - "description": "Name of the recipient.", - "type": "string" - }, - "region": { - "description": "Top-level administrative subdivision of the country. For example, a state like California (\"CA\") or a province like Quebec (\"QC\").", - "type": "string" - }, - "streetAddress": { - "description": "Street-level part of the address. Use `\\n` to add a second line.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestOrderDeliveryDetails": { - "id": "TestOrderDeliveryDetails", - "properties": { - "address": { - "$ref": "TestOrderAddress", - "description": "The delivery address" - }, - "isScheduledDelivery": { - "description": "Whether the order is scheduled delivery order.", - "type": "boolean" - }, - "phoneNumber": { - "description": "The phone number of the person receiving the delivery.", - "type": "string" - } - }, - "type": "object" - }, - "TestOrderLineItem": { - "id": "TestOrderLineItem", - "properties": { - "product": { - "$ref": "TestOrderLineItemProduct", - "description": "Required. Product data from the time of the order placement." - }, - "quantityOrdered": { - "description": "Required. Number of items ordered.", - "format": "uint32", - "type": "integer" - }, - "returnInfo": { - "$ref": "OrderLineItemReturnInfo", - "description": "Required. Details of the return policy for the line item." - }, - "shippingDetails": { - "$ref": "OrderLineItemShippingDetails", - "description": "Required. Details of the requested shipping for the line item." - } - }, - "type": "object" - }, - "TestOrderLineItemProduct": { - "id": "TestOrderLineItemProduct", - "properties": { - "brand": { - "description": "Required. Brand of the item.", - "type": "string" - }, - "condition": { - "description": "Required. Condition or state of the item. Acceptable values are: - \"`new`\" ", - "type": "string" - }, - "contentLanguage": { - "description": "Required. The two-letter ISO 639-1 language code for the item. Acceptable values are: - \"`en`\" - \"`fr`\" ", - "type": "string" - }, - "fees": { - "description": "Fees for the item. Optional.", - "items": { - "$ref": "OrderLineItemProductFee" - }, - "type": "array" - }, - "gtin": { - "description": "Global Trade Item Number (GTIN) of the item. Optional.", - "type": "string" - }, - "imageLink": { - "description": "Required. URL of an image of the item.", - "type": "string" - }, - "itemGroupId": { - "description": "Shared identifier for all variants of the same product. Optional.", - "type": "string" - }, - "mpn": { - "description": "Manufacturer Part Number (MPN) of the item. Optional.", - "type": "string" - }, - "offerId": { - "description": "Required. An identifier of the item.", - "type": "string" - }, - "price": { - "$ref": "Price", - "description": "Required. The price for the product. Tax is automatically calculated for orders where marketplace facilitator tax laws are applicable. Otherwise, tax settings from Merchant Center are applied." - }, - "targetCountry": { - "description": "Required. The CLDR territory code of the target country of the product.", - "type": "string" - }, - "title": { - "description": "Required. The title of the product.", - "type": "string" - }, - "variantAttributes": { - "description": "Variant attributes for the item. Optional.", - "items": { - "$ref": "OrderLineItemProductVariantAttribute" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestOrderPickupDetails": { - "id": "TestOrderPickupDetails", - "properties": { - "locationCode": { - "description": "Required. Code of the location defined by provider or merchant.", - "type": "string" - }, - "pickupLocationAddress": { - "$ref": "TestOrderAddress", - "description": "Required. Pickup location address." - }, - "pickupLocationType": { - "description": "Pickup location type. Acceptable values are: - \"`locker`\" - \"`store`\" - \"`curbside`\" ", - "type": "string" - }, - "pickupPersons": { - "description": "Required. all pickup persons set by users.", - "items": { - "$ref": "TestOrderPickupDetailsPickupPerson" - }, - "type": "array" - } - }, - "type": "object" - }, - "TestOrderPickupDetailsPickupPerson": { - "id": "TestOrderPickupDetailsPickupPerson", - "properties": { - "name": { - "description": "Required. Full name of the pickup person.", - "type": "string" - }, - "phoneNumber": { - "description": "Required. The phone number of the person picking up the items.", - "type": "string" - } - }, - "type": "object" - }, "TextWithTooltip": { "description": "Block of text that may contain a tooltip with more information.", "id": "TextWithTooltip", @@ -18668,62 +14364,6 @@ "properties": {}, "type": "object" }, - "UnitInvoice": { - "id": "UnitInvoice", - "properties": { - "additionalCharges": { - "description": "Additional charges for a unit, for example, shipping costs.", - "items": { - "$ref": "UnitInvoiceAdditionalCharge" - }, - "type": "array" - }, - "unitPrice": { - "$ref": "Price", - "description": "[required] Pre-tax or post-tax price of one unit depending on the locality of the order. *Note:* Invoicing works on a per unit basis. The `unitPrice` is the price of a single unit, and will be multiplied by the number of entries in `shipmentUnitId`." - }, - "unitPriceTaxes": { - "description": "Tax amounts to apply to the unit price.", - "items": { - "$ref": "UnitInvoiceTaxLine" - }, - "type": "array" - } - }, - "type": "object" - }, - "UnitInvoiceAdditionalCharge": { - "id": "UnitInvoiceAdditionalCharge", - "properties": { - "additionalChargeAmount": { - "$ref": "Amount", - "description": "[required] Amount of the additional charge per unit. *Note:* Invoicing works on a per unit bases. The `additionalChargeAmount` is the amount charged per unit, and will be multiplied by the number of entries in `shipmentUnitID`." - }, - "type": { - "description": "[required] Type of the additional charge. Acceptable values are: - \"`shipping`\" ", - "type": "string" - } - }, - "type": "object" - }, - "UnitInvoiceTaxLine": { - "id": "UnitInvoiceTaxLine", - "properties": { - "taxAmount": { - "$ref": "Price", - "description": "[required] Tax amount for the tax type." - }, - "taxName": { - "description": "Optional name of the tax type. This should only be provided if `taxType` is `otherFeeTax`.", - "type": "string" - }, - "taxType": { - "description": "[required] Type of the tax. Acceptable values are: - \"`otherFee`\" - \"`otherFeeTax`\" - \"`sales`\" ", - "type": "string" - } - }, - "type": "object" - }, "UrlSettings": { "description": "Specifications related to the `Checkout` URL. The `UriTemplate` is of the form `https://www.mystore.com/checkout?item_id={id}` where `{id}` will be automatically replaced with data from the merchant account with this attribute [offer_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id)", "id": "UrlSettings", diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 46657fd967b..bfcdfba6dd7 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -137,7 +137,6 @@ func New(client *http.Client) (*APIService, error) { s.Accounts = NewAccountsService(s) s.Accountstatuses = NewAccountstatusesService(s) s.Accounttax = NewAccounttaxService(s) - s.Buyongoogleprograms = NewBuyongoogleprogramsService(s) s.Collections = NewCollectionsService(s) s.Collectionstatuses = NewCollectionstatusesService(s) s.Conversionsources = NewConversionsourcesService(s) @@ -148,10 +147,6 @@ func New(client *http.Client) (*APIService, error) { s.Liasettings = NewLiasettingsService(s) s.Localinventory = NewLocalinventoryService(s) s.Merchantsupport = NewMerchantsupportService(s) - s.Orderinvoices = NewOrderinvoicesService(s) - s.Orderreports = NewOrderreportsService(s) - s.Orderreturns = NewOrderreturnsService(s) - s.Orders = NewOrdersService(s) s.Ordertrackingsignals = NewOrdertrackingsignalsService(s) s.Pos = NewPosService(s) s.Productdeliverytime = NewProductdeliverytimeService(s) @@ -185,8 +180,6 @@ type APIService struct { Accounttax *AccounttaxService - Buyongoogleprograms *BuyongoogleprogramsService - Collections *CollectionsService Collectionstatuses *CollectionstatusesService @@ -207,14 +200,6 @@ type APIService struct { Merchantsupport *MerchantsupportService - Orderinvoices *OrderinvoicesService - - Orderreports *OrderreportsService - - Orderreturns *OrderreturnsService - - Orders *OrdersService - Ordertrackingsignals *OrdertrackingsignalsService Pos *PosService @@ -324,15 +309,6 @@ type AccounttaxService struct { s *APIService } -func NewBuyongoogleprogramsService(s *APIService) *BuyongoogleprogramsService { - rs := &BuyongoogleprogramsService{s: s} - return rs -} - -type BuyongoogleprogramsService struct { - s *APIService -} - func NewCollectionsService(s *APIService) *CollectionsService { rs := &CollectionsService{s: s} return rs @@ -435,54 +411,6 @@ type MerchantsupportService struct { s *APIService } -func NewOrderinvoicesService(s *APIService) *OrderinvoicesService { - rs := &OrderinvoicesService{s: s} - return rs -} - -type OrderinvoicesService struct { - s *APIService -} - -func NewOrderreportsService(s *APIService) *OrderreportsService { - rs := &OrderreportsService{s: s} - return rs -} - -type OrderreportsService struct { - s *APIService -} - -func NewOrderreturnsService(s *APIService) *OrderreturnsService { - rs := &OrderreturnsService{s: s} - rs.Labels = NewOrderreturnsLabelsService(s) - return rs -} - -type OrderreturnsService struct { - s *APIService - - Labels *OrderreturnsLabelsService -} - -func NewOrderreturnsLabelsService(s *APIService) *OrderreturnsLabelsService { - rs := &OrderreturnsLabelsService{s: s} - return rs -} - -type OrderreturnsLabelsService struct { - s *APIService -} - -func NewOrdersService(s *APIService) *OrdersService { - rs := &OrdersService{s: s} - return rs -} - -type OrdersService struct { - s *APIService -} - func NewOrdertrackingsignalsService(s *APIService) *OrdertrackingsignalsService { rs := &OrdertrackingsignalsService{s: s} return rs @@ -2605,11 +2533,6 @@ func (s ActionReason) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ActivateBuyOnGoogleProgramRequest: Request message for the ActivateProgram -// method. -type ActivateBuyOnGoogleProgramRequest struct { -} - type Address struct { // AdministrativeArea: Required. Top-level administrative subdivision of the // country. For example, a state like California ("CA") or a province like @@ -2673,30 +2596,6 @@ func (s AlternateDisputeResolution) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type Amount struct { - // PriceAmount: [required] The pre-tax or post-tax price depending on the - // location of the order. - PriceAmount *Price `json:"priceAmount,omitempty"` - // TaxAmount: [required] Tax value. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAmount") 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. "PriceAmount") 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 Amount) MarshalJSON() ([]byte, error) { - type NoMethod Amount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // AttributionSettings: Represents attribution settings for conversion sources // receiving pre-attribution data. type AttributionSettings struct { @@ -3078,102 +2977,6 @@ func (s BusinessDayConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BuyOnGoogleProgramStatus: Response message for the GetProgramStatus method. -type BuyOnGoogleProgramStatus struct { - // BusinessModel: The business models in which merchant participates. - // - // Possible values: - // "BUSINESS_MODEL_UNSPECIFIED" - Default value when business model is not - // set. - // "MANUFACTURER" - Merchant is a manufacturer. - // "IMPORTER" - Merchant is an importer. - // "RESELLER" - Merchant is a reseller. - // "OTHER" - Merchant has a different business model. - BusinessModel []string `json:"businessModel,omitempty"` - // CustomerServicePendingEmail: The customer service pending email. After - // verification this field becomes empty. - CustomerServicePendingEmail string `json:"customerServicePendingEmail,omitempty"` - // CustomerServicePendingPhoneNumber: The pending phone number specified for - // BuyOnGoogle program. It might be different than account level phone number. - // In order to update this field the customer_service_pending_phone_region_code - // must also be set. After verification this field becomes empty. - CustomerServicePendingPhoneNumber string `json:"customerServicePendingPhoneNumber,omitempty"` - // CustomerServicePendingPhoneRegionCode: Two letter country code for the - // pending phone number, for example `CA` for Canadian numbers. See the ISO - // 3166-1 alpha-2 - // (https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // officially assigned codes. In order to update this field the - // customer_service_pending_phone_number must also be set. After verification - // this field becomes empty. - CustomerServicePendingPhoneRegionCode string `json:"customerServicePendingPhoneRegionCode,omitempty"` - // CustomerServiceVerifiedEmail: Output only. The customer service verified - // email. - CustomerServiceVerifiedEmail string `json:"customerServiceVerifiedEmail,omitempty"` - // CustomerServiceVerifiedPhoneNumber: Output only. The verified phone number - // specified for BuyOnGoogle program. It might be different than account level - // phone number. - CustomerServiceVerifiedPhoneNumber string `json:"customerServiceVerifiedPhoneNumber,omitempty"` - // CustomerServiceVerifiedPhoneRegionCode: Output only. Two letter country code - // for the verified phone number, for example `CA` for Canadian numbers. See - // the ISO 3166-1 alpha-2 - // (https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // officially assigned codes. - CustomerServiceVerifiedPhoneRegionCode string `json:"customerServiceVerifiedPhoneRegionCode,omitempty"` - // OnlineSalesChannel: The channels through which the merchant is selling. - // - // Possible values: - // "ONLINE_SALES_CHANNEL_UNSPECIFIED" - Default value when online sales - // channel is not set. - // "GOOGLE_EXCLUSIVE" - Merchant is selling exclusively on Google. - // "GOOGLE_AND_OTHER_WEBSITES" - Merchant is selling on Google and other - // websites. - OnlineSalesChannel string `json:"onlineSalesChannel,omitempty"` - // ParticipationStage: Output only. The current participation stage for the - // program. - // - // Possible values: - // "PROGRAM_PARTICIPATION_STAGE_UNSPECIFIED" - Default value when - // participation stage is not set. - // "NOT_ELIGIBLE" - Merchant is not eligible for onboarding to a given - // program in a specific region code. - // "ELIGIBLE" - Merchant is eligible for onboarding to a given program in a - // specific region code. - // "ONBOARDING" - Merchant is onboarding to a given program in a specific - // region code. - // "ELIGIBLE_FOR_REVIEW" - Merchant fulfilled all the requirements and is - // ready to request review in a specific region code. - // "PENDING_REVIEW" - Merchant is waiting for the review to be completed in a - // specific region code. - // "REVIEW_DISAPPROVED" - The review for a merchant has been rejected in a - // specific region code. - // "ACTIVE" - Merchant's program participation is active for a specific - // region code. - // "PAUSED" - Participation has been paused. - // "DEPRECATED" - The program cannot be further reactivated or paused. See - // more about [Buy on - // Google](https://support.google.com/merchants/answer/7679273). - ParticipationStage string `json:"participationStage,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BusinessModel") 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. "BusinessModel") 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 BuyOnGoogleProgramStatus) MarshalJSON() ([]byte, error) { - type NoMethod BuyOnGoogleProgramStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Callout: An important message that should be highlighted. Usually displayed // as a banner. type Callout struct { @@ -3211,42 +3014,6 @@ func (s Callout) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CaptureOrderRequest: Request message for the CaptureOrder method. -type CaptureOrderRequest struct { -} - -// CaptureOrderResponse: Response message for the CaptureOrder method. -type CaptureOrderResponse struct { - // ExecutionStatus: The status of the execution. Only defined if the request - // was successful. Acceptable values are: * "duplicate" * "executed" - // - // Possible values: - // "EXECUTION_STATUS_UNSPECIFIED" - Default value. This value is unused. - // "EXECUTED" - The request was completed successfully. - // "DUPLICATE" - The request was not performed because it already executed - // once successfully. - ExecutionStatus string `json:"executionStatus,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 CaptureOrderResponse) MarshalJSON() ([]byte, error) { - type NoMethod CaptureOrderResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type CarrierRate struct { // CarrierName: Carrier service, such as "UPS" or "Fedex". The list of // supported carriers can be retrieved through the `getSupportedCarriers` @@ -3954,34 +3721,6 @@ func (s CustomAttribute) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type CustomerReturnReason struct { - // Description: Description of the reason. - Description string `json:"description,omitempty"` - // ReasonCode: Code of the return reason. Acceptable values are: - - // "betterPriceFound" - "changedMind" - "damagedOrDefectiveItem" - - // "didNotMatchDescription" - "doesNotFit" - "expiredItem" - - // "incorrectItemReceived" - "noLongerNeeded" - "notSpecified" - - // "orderedWrongItem" - "other" - "qualityNotExpected" - - // "receivedTooLate" - "undeliverable" - ReasonCode string `json:"reasonCode,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 CustomerReturnReason) MarshalJSON() ([]byte, error) { - type NoMethod CustomerReturnReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type CutoffTime struct { // Hour: Hour of the cutoff time until which an order has to be placed to be // processed in the same day. Required. @@ -5693,54 +5432,6 @@ func (s Installment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type InvoiceSummary struct { - // AdditionalChargeSummaries: Summary of the total amounts of the additional - // charges. - AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"` - // ProductTotal: [required] Total price for the product. - ProductTotal *Amount `json:"productTotal,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalChargeSummaries") - // 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. "AdditionalChargeSummaries") 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 InvoiceSummary) MarshalJSON() ([]byte, error) { - type NoMethod InvoiceSummary - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type InvoiceSummaryAdditionalChargeSummary struct { - // TotalAmount: [required] Total additional charge for this type. - TotalAmount *Amount `json:"totalAmount,omitempty"` - // Type: [required] Type of the additional charge. Acceptable values are: - - // "shipping" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalAmount") 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. "TotalAmount") 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 InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) { - type NoMethod InvoiceSummaryAdditionalChargeSummary - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // LabelIds: The IDs of labels that should be assigned to the CSS domain. type LabelIds struct { // LabelIds: The list of label IDs. @@ -6888,117 +6579,6 @@ func (s MerchantCenterDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MerchantOrderReturn: Order return. Production access (all methods) requires -// the order manager role. Sandbox access does not. -type MerchantOrderReturn struct { - // CreationDate: The date of creation of the return, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // MerchantOrderId: Merchant defined order ID. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // OrderId: Google order ID. - OrderId string `json:"orderId,omitempty"` - // OrderReturnId: Order return ID generated by Google. - OrderReturnId string `json:"orderReturnId,omitempty"` - // ReturnItems: Items of the return. - ReturnItems []*MerchantOrderReturnItem `json:"returnItems,omitempty"` - // ReturnPricingInfo: Information about shipping costs. - ReturnPricingInfo *ReturnPricingInfo `json:"returnPricingInfo,omitempty"` - // ReturnShipments: Shipments of the return. - ReturnShipments []*ReturnShipment `json:"returnShipments,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationDate") 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. "CreationDate") 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 MerchantOrderReturn) MarshalJSON() ([]byte, error) { - type NoMethod MerchantOrderReturn - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MerchantOrderReturnItem struct { - // CustomerReturnReason: The reason that the customer chooses to return an - // item. - CustomerReturnReason *CustomerReturnReason `json:"customerReturnReason,omitempty"` - // ItemId: Product level item ID. If the returned items are of the same - // product, they will have the same ID. - ItemId string `json:"itemId,omitempty"` - // MerchantRejectionReason: The reason that the merchant chose to reject an - // item return. - MerchantRejectionReason *MerchantRejectionReason `json:"merchantRejectionReason,omitempty"` - // MerchantReturnReason: The reason that merchant chooses to accept a return - // item. - MerchantReturnReason *RefundReason `json:"merchantReturnReason,omitempty"` - // Product: Product data from the time of the order placement. - Product *OrderLineItemProduct `json:"product,omitempty"` - // RefundableAmount: Maximum amount that can be refunded for this return item. - RefundableAmount *MonetaryAmount `json:"refundableAmount,omitempty"` - // ReturnItemId: Unit level ID for the return item. Different units of the same - // product will have different IDs. - ReturnItemId string `json:"returnItemId,omitempty"` - // ReturnShipmentIds: IDs of the return shipments that this return item belongs - // to. - ReturnShipmentIds []string `json:"returnShipmentIds,omitempty"` - // ShipmentGroupId: ID of the original shipment group. Provided for shipments - // with invoice support. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // ShipmentUnitId: ID of the shipment unit assigned by the merchant. Provided - // for shipments with invoice support. - ShipmentUnitId string `json:"shipmentUnitId,omitempty"` - // State: State of the item. Acceptable values are: - "canceled" - "new" - - // "received" - "refunded" - "rejected" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerReturnReason") 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. "CustomerReturnReason") 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 MerchantOrderReturnItem) MarshalJSON() ([]byte, error) { - type NoMethod MerchantOrderReturnItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type MerchantRejectionReason struct { - // Description: Description of the reason. - Description string `json:"description,omitempty"` - // ReasonCode: Code of the rejection reason. - ReasonCode string `json:"reasonCode,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 MerchantRejectionReason) MarshalJSON() ([]byte, error) { - type NoMethod MerchantRejectionReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // MethodQuota: The quota information per method in the Content API. type MethodQuota struct { // Method: Output only. The method name, for example `products.list`. Method @@ -7281,14101 +6861,6301 @@ func (s MinimumOrderValueTableStoreCodeSetWithMov) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type MonetaryAmount struct { - // PriceAmount: The pre-tax or post-tax price depends on the location of the - // order. - For countries (for example, "US". where price attribute excludes - // tax, this field corresponds to the pre-tax value. - For coutries (for - // example, "France") where price attribute includes tax, this field - // corresponds to the post-tax value . - PriceAmount *Price `json:"priceAmount,omitempty"` - // TaxAmount: Tax value, present only for countries where price attribute - // excludes tax (for example, "US". No tax is referenced as 0 value with the - // corresponding `currency`. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAmount") to +// OrderTrackingSignal: Represents a merchant trade from which signals are +// extracted, e.g. shipping. +type OrderTrackingSignal struct { + // CustomerShippingFee: The shipping fee of the order; this value should be set + // to zero in the case of free shipping. + CustomerShippingFee *PriceAmount `json:"customerShippingFee,omitempty"` + // DeliveryPostalCode: Required. The delivery postal code, as a continuous + // string without spaces or dashes, e.g. "95016". This field will be anonymized + // in returned OrderTrackingSignal creation response. + DeliveryPostalCode string `json:"deliveryPostalCode,omitempty"` + // DeliveryRegionCode: Required. The [CLDR territory code] + // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the + // shipping destination. + DeliveryRegionCode string `json:"deliveryRegionCode,omitempty"` + // LineItems: Information about line items in the order. + LineItems []*OrderTrackingSignalLineItemDetails `json:"lineItems,omitempty"` + // MerchantId: The Google merchant ID of this order tracking signal. This value + // is optional. If left unset, the caller's merchant ID is used. You must + // request access in order to provide data on behalf of another merchant. For + // more information, see Submitting Order Tracking Signals + // (/shopping-content/guides/order-tracking-signals). + MerchantId int64 `json:"merchantId,omitempty,string"` + // OrderCreatedTime: Required. The time when the order was created on the + // merchant side. Include the year and timezone string, if available. + OrderCreatedTime *DateTime `json:"orderCreatedTime,omitempty"` + // OrderId: Required. The ID of the order on the merchant side. This field will + // be hashed in returned OrderTrackingSignal creation response. + OrderId string `json:"orderId,omitempty"` + // OrderTrackingSignalId: Output only. The ID that uniquely identifies this + // order tracking signal. + OrderTrackingSignalId int64 `json:"orderTrackingSignalId,omitempty,string"` + // ShipmentLineItemMapping: The mapping of the line items to the shipment + // information. + ShipmentLineItemMapping []*OrderTrackingSignalShipmentLineItemMapping `json:"shipmentLineItemMapping,omitempty"` + // ShippingInfo: The shipping information for the order. + ShippingInfo []*OrderTrackingSignalShippingInfo `json:"shippingInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CustomerShippingFee") 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. "PriceAmount") 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. "CustomerShippingFee") 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 MonetaryAmount) MarshalJSON() ([]byte, error) { - type NoMethod MonetaryAmount +func (s OrderTrackingSignal) MarshalJSON() ([]byte, error) { + type NoMethod OrderTrackingSignal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// OnboardBuyOnGoogleProgramRequest: Request message for the OnboardProgram -// method. -type OnboardBuyOnGoogleProgramRequest struct { - // CustomerServiceEmail: The customer service email. - CustomerServiceEmail string `json:"customerServiceEmail,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerServiceEmail") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// OrderTrackingSignalLineItemDetails: The line items of the order. +type OrderTrackingSignalLineItemDetails struct { + // Brand: Brand of the product. + Brand string `json:"brand,omitempty"` + // Gtin: The Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // LineItemId: Required. The ID for this line item. + LineItemId string `json:"lineItemId,omitempty"` + // Mpn: The manufacturer part number. + Mpn string `json:"mpn,omitempty"` + // ProductDescription: Plain text description of this product (deprecated: + // Please use product_title instead). + ProductDescription string `json:"productDescription,omitempty"` + // ProductId: Required. The Content API REST ID of the product, in the form + // channel:contentLanguage:targetCountry:offerId. + ProductId string `json:"productId,omitempty"` + // ProductTitle: Plain text title of this product. + ProductTitle string `json:"productTitle,omitempty"` + // Quantity: The quantity of the line item in the order. + Quantity int64 `json:"quantity,omitempty,string"` + // Sku: Merchant SKU for this item (deprecated). + Sku string `json:"sku,omitempty"` + // Upc: Universal product code for this item (deprecated: Please use GTIN + // instead). + Upc string `json:"upc,omitempty"` + // ForceSendFields is a list of field names (e.g. "Brand") 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. "CustomerServiceEmail") 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. "Brand") 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 OnboardBuyOnGoogleProgramRequest) MarshalJSON() ([]byte, error) { - type NoMethod OnboardBuyOnGoogleProgramRequest +func (s OrderTrackingSignalLineItemDetails) MarshalJSON() ([]byte, error) { + type NoMethod OrderTrackingSignalLineItemDetails return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Order: Order. Production access (all methods) requires the order manager -// role. Sandbox access does not. -type Order struct { - // Acknowledged: Whether the order was acknowledged. - Acknowledged bool `json:"acknowledged,omitempty"` - // Annotations: List of key-value pairs that are attached to a given order. - Annotations []*OrderOrderAnnotation `json:"annotations,omitempty"` - // BillingAddress: The billing address. - BillingAddress *OrderAddress `json:"billingAddress,omitempty"` - // Customer: The details of the customer who placed the order. - Customer *OrderCustomer `json:"customer,omitempty"` - // DeliveryDetails: Delivery details for shipments of type `delivery`. - DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"` - // Id: The REST ID of the order. Globally unique. - Id string `json:"id,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#order" - Kind string `json:"kind,omitempty"` - // LineItems: Line items that are ordered. - LineItems []*OrderLineItem `json:"lineItems,omitempty"` - MerchantId uint64 `json:"merchantId,omitempty,string"` - // MerchantOrderId: Merchant-provided ID of the order. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // NetPriceAmount: The net amount for the order (price part). For example, if - // an order was originally for $100 and a refund was issued for $20, the net - // amount will be $80. - NetPriceAmount *Price `json:"netPriceAmount,omitempty"` - // NetTaxAmount: The net amount for the order (tax part). Note that in certain - // cases due to taxable base adjustment `netTaxAmount` might not match to a sum - // of tax field across all lineItems and refunds. - NetTaxAmount *Price `json:"netTaxAmount,omitempty"` - // PaymentStatus: The status of the payment. Acceptable values are: - - // "paymentCaptured" - "paymentRejected" - "paymentSecured" - - // "pendingAuthorization" - PaymentStatus string `json:"paymentStatus,omitempty"` - // PickupDetails: Pickup details for shipments of type `pickup`. - PickupDetails *OrderPickupDetails `json:"pickupDetails,omitempty"` - // PlacedDate: The date when the order was placed, in ISO 8601 format. - PlacedDate string `json:"placedDate,omitempty"` - // Promotions: Promotions associated with the order. To determine which - // promotions apply to which products, check the - // `Promotions[].appliedItems[].lineItemId` field against the `LineItems[].id` - // field for each promotion. If a promotion is applied to more than 1 offerId, - // divide the discount value by the number of affected offers to determine how - // much discount to apply to each offerId. Examples: 1. To calculate price paid - // by the customer for a single line item including the discount: For each - // promotion, subtract the `LineItems[].adjustments[].priceAdjustment.value` - // amount from the `LineItems[].Price.value`. 2. To calculate price paid by the - // customer for a single line item including the discount in case of multiple - // quantity: For each promotion, divide the - // `LineItems[].adjustments[].priceAdjustment.value` by the quantity of - // products then subtract the resulting value from the - // `LineItems[].Product.Price.value` for each quantity item. Only 1 promotion - // can be applied to an offerId in a given order. To refund an item which had a - // promotion applied to it, make sure to refund the amount after first - // subtracting the promotion discount from the item price. More details about - // the program are here. - Promotions []*OrderPromotion `json:"promotions,omitempty"` - // Refunds: Refunds for the order. - Refunds []*OrderRefund `json:"refunds,omitempty"` - // Shipments: Shipments of the order. - Shipments []*OrderShipment `json:"shipments,omitempty"` - // ShippingCost: The total cost of shipping for all items. - ShippingCost *Price `json:"shippingCost,omitempty"` - // ShippingCostTax: The tax for the total shipping cost. - ShippingCostTax *Price `json:"shippingCostTax,omitempty"` - // Status: The status of the order. Acceptable values are: - "canceled" - - // "delivered" - "inProgress" - "partiallyDelivered" - - // "partiallyReturned" - "partiallyShipped" - "pendingShipment" - - // "returned" - "shipped" - Status string `json:"status,omitempty"` - // TaxCollector: The party responsible for collecting and remitting taxes. - // Acceptable values are: - "marketplaceFacilitator" - "merchant" - TaxCollector string `json:"taxCollector,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Acknowledged") to +// OrderTrackingSignalShipmentLineItemMapping: Represents how many items are in +// the shipment for the given shipment_id and line_item_id. +type OrderTrackingSignalShipmentLineItemMapping struct { + // LineItemId: Required. The line item ID. + LineItemId string `json:"lineItemId,omitempty"` + // Quantity: The line item quantity in the shipment. + Quantity int64 `json:"quantity,omitempty,string"` + // ShipmentId: Required. The shipment ID. This field will be hashed in returned + // OrderTrackingSignal creation response. + ShipmentId string `json:"shipmentId,omitempty"` + // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "Acknowledged") to include in API + // NullFields is a list of field names (e.g. "LineItemId") 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 Order) MarshalJSON() ([]byte, error) { - type NoMethod Order +func (s OrderTrackingSignalShipmentLineItemMapping) MarshalJSON() ([]byte, error) { + type NoMethod OrderTrackingSignalShipmentLineItemMapping return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderAddress struct { - // Country: CLDR country code (for example, "US"). - Country string `json:"country,omitempty"` - // FullAddress: Strings representing the lines of the printed label for mailing - // the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, - // CA, 94043 United States - FullAddress []string `json:"fullAddress,omitempty"` - // IsPostOfficeBox: Whether the address is a post office box. - IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` - // Locality: City, town or commune. May also include dependent localities or - // sublocalities (for example, neighborhoods or suburbs). - Locality string `json:"locality,omitempty"` - // PostalCode: Postal Code or ZIP (for example, "94043"). - PostalCode string `json:"postalCode,omitempty"` - // RecipientName: Name of the recipient. - RecipientName string `json:"recipientName,omitempty"` - // Region: Top-level administrative subdivision of the country. For example, a - // state like California ("CA") or a province like Quebec ("QC"). - Region string `json:"region,omitempty"` - // StreetAddress: Street-level part of the address. Use `\n` to add a second - // line. - StreetAddress []string `json:"streetAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// OrderTrackingSignalShippingInfo: The shipping information for the order. +type OrderTrackingSignalShippingInfo struct { + // ActualDeliveryTime: The time when the shipment was actually delivered. + // Include the year and timezone string, if available. This field is required, + // if one of the following fields is absent: tracking_id or carrier_name. + ActualDeliveryTime *DateTime `json:"actualDeliveryTime,omitempty"` + // CarrierName: The name of the shipping carrier for the delivery. This field + // is required if one of the following fields is absent: + // earliest_delivery_promise_time, latest_delivery_promise_time, and + // actual_delivery_time. + CarrierName string `json:"carrierName,omitempty"` + // CarrierServiceName: The service type for fulfillment, e.g., GROUND, + // FIRST_CLASS, etc. + CarrierServiceName string `json:"carrierServiceName,omitempty"` + // EarliestDeliveryPromiseTime: The earliest delivery promised time. Include + // the year and timezone string, if available. This field is required, if one + // of the following fields is absent: tracking_id or carrier_name. + EarliestDeliveryPromiseTime *DateTime `json:"earliestDeliveryPromiseTime,omitempty"` + // LatestDeliveryPromiseTime: The latest delivery promised time. Include the + // year and timezone string, if available. This field is required, if one of + // the following fields is absent: tracking_id or carrier_name. + LatestDeliveryPromiseTime *DateTime `json:"latestDeliveryPromiseTime,omitempty"` + // OriginPostalCode: The origin postal code, as a continuous string without + // spaces or dashes, e.g. "95016". This field will be anonymized in returned + // OrderTrackingSignal creation response. + OriginPostalCode string `json:"originPostalCode,omitempty"` + // OriginRegionCode: The [CLDR territory code] + // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the + // shipping origin. + OriginRegionCode string `json:"originRegionCode,omitempty"` + // ShipmentId: Required. The shipment ID. This field will be hashed in returned + // OrderTrackingSignal creation response. + ShipmentId string `json:"shipmentId,omitempty"` + // ShippedTime: The time when the shipment was shipped. Include the year and + // timezone string, if available. + ShippedTime *DateTime `json:"shippedTime,omitempty"` + // ShippingStatus: The status of the shipment. + // + // Possible values: + // "SHIPPING_STATE_UNSPECIFIED" - The shipping status is not known to + // merchant. + // "SHIPPED" - All items are shipped. + // "DELIVERED" - The shipment is already delivered. + ShippingStatus string `json:"shippingStatus,omitempty"` + // TrackingId: The tracking ID of the shipment. This field is required if one + // of the following fields is absent: earliest_delivery_promise_time, + // latest_delivery_promise_time, and actual_delivery_time. + TrackingId string `json:"trackingId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActualDeliveryTime") 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. "Country") 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. "ActualDeliveryTime") 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 OrderAddress) MarshalJSON() ([]byte, error) { - type NoMethod OrderAddress +func (s OrderTrackingSignalShippingInfo) MarshalJSON() ([]byte, error) { + type NoMethod OrderTrackingSignalShippingInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderCancellation struct { - // Actor: The actor that created the cancellation. Acceptable values are: - - // "customer" - "googleBot" - "googleCustomerService" - - // "googlePayments" - "googleSabre" - "merchant" - Actor string `json:"actor,omitempty"` - // CreationDate: Date on which the cancellation has been created, in ISO 8601 - // format. - CreationDate string `json:"creationDate,omitempty"` - // Quantity: The quantity that was canceled. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the cancellation. Orders that are canceled with a - // noInventory reason will lead to the removal of the product from Buy on - // Google until you make an update to that product. This won't affect your - // Shopping ads. Acceptable values are: - "autoPostInternal" - - // "autoPostInvalidBillingAddress" - "autoPostNoInventory" - - // "autoPostPriceError" - "autoPostUndeliverableShippingAddress" - - // "couponAbuse" - "customerCanceled" - "customerInitiatedCancel" - - // "customerSupportRequested" - "failToPushOrderGoogleError" - - // "failToPushOrderMerchantError" - - // "failToPushOrderMerchantFulfillmentError" - "failToPushOrderToMerchant" - // - "failToPushOrderToMerchantOutOfStock" - "invalidCoupon" - - // "malformedShippingAddress" - "merchantDidNotShipOnTime" - - // "noInventory" - "orderTimeout" - "other" - "paymentAbuse" - - // "paymentDeclined" - "priceError" - "returnRefundAbuse" - - // "shippingPriceError" - "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "failedToCaptureFunds" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actor") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// PaymentServiceProviderLinkInfo: Additional information required for +// PAYMENT_SERVICE_PROVIDER link type. +type PaymentServiceProviderLinkInfo struct { + // ExternalAccountBusinessCountry: The business country of the merchant account + // as identified by the third party service provider. + ExternalAccountBusinessCountry string `json:"externalAccountBusinessCountry,omitempty"` + // ExternalAccountId: The id used by the third party service provider to + // identify the merchant. + ExternalAccountId string `json:"externalAccountId,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ExternalAccountBusinessCountry") 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. "Actor") 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. "ExternalAccountBusinessCountry") + // 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 OrderCancellation) MarshalJSON() ([]byte, error) { - type NoMethod OrderCancellation +func (s PaymentServiceProviderLinkInfo) MarshalJSON() ([]byte, error) { + type NoMethod PaymentServiceProviderLinkInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderCustomer struct { - // FullName: Full name of the customer. - FullName string `json:"fullName,omitempty"` - // InvoiceReceivingEmail: Email address for the merchant to send value-added - // tax or invoice documentation of the order. Only the last document sent is - // made available to the customer. For more information, see About automated - // VAT invoicing for Buy on Google. - InvoiceReceivingEmail string `json:"invoiceReceivingEmail,omitempty"` - // LoyaltyInfo: Loyalty program information. - LoyaltyInfo *OrderCustomerLoyaltyInfo `json:"loyaltyInfo,omitempty"` - // MarketingRightsInfo: Customer's marketing preferences. Contains the - // marketing opt-in information that is current at the time that the merchant - // call. User preference selections can change from one order to the next so - // preferences must be checked with every order. - MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullName") to +type PickupCarrierService struct { + // CarrierName: The name of the pickup carrier (for example, "UPS"). + // Required. + CarrierName string `json:"carrierName,omitempty"` + // ServiceName: The name of the pickup service (for example, "Access point"). + // Required. + ServiceName string `json:"serviceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CarrierName") 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. "FullName") to include in API + // NullFields is a list of field names (e.g. "CarrierName") 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 OrderCustomer) MarshalJSON() ([]byte, error) { - type NoMethod OrderCustomer +func (s PickupCarrierService) MarshalJSON() ([]byte, error) { + type NoMethod PickupCarrierService return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderCustomerLoyaltyInfo struct { - // LoyaltyNumber: The loyalty card/membership number. - LoyaltyNumber string `json:"loyaltyNumber,omitempty"` - // Name: Name of card/membership holder, this field will be populated when - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "LoyaltyNumber") to +type PickupServicesPickupService struct { + // CarrierName: The name of the carrier (for example, "UPS"). Always present. + CarrierName string `json:"carrierName,omitempty"` + // Country: The CLDR country code of the carrier (for example, "US"). Always + // present. + Country string `json:"country,omitempty"` + // ServiceName: The name of the pickup service (for example, "Access point"). + // Always present. + ServiceName string `json:"serviceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CarrierName") 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. "LoyaltyNumber") to include in API + // NullFields is a list of field names (e.g. "CarrierName") 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 OrderCustomerLoyaltyInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrderCustomerLoyaltyInfo +func (s PickupServicesPickupService) MarshalJSON() ([]byte, error) { + type NoMethod PickupServicesPickupService return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderCustomerMarketingRightsInfo struct { - // ExplicitMarketingPreference: Last known customer selection regarding - // marketing preferences. In certain cases this selection might not be known, - // so this field would be empty. If a customer selected `granted` in their most - // recent order, they can be subscribed to marketing emails. Customers who have - // chosen `denied` must not be subscribed, or must be unsubscribed if already - // opted-in. Acceptable values are: - "denied" - "granted" - ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"` - // LastUpdatedTimestamp: Timestamp when last time marketing preference was - // updated. Could be empty, if user wasn't offered a selection yet. - LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"` - // MarketingEmailAddress: Email address that can be used for marketing - // purposes. The field may be empty even if `explicitMarketingPreference` is - // 'granted'. This happens when retrieving an old order from the customer who - // deleted their account. - MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ExplicitMarketingPreference") 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. +type PosCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "ExplicitMarketingPreference") 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. "Entries") 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 OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrderCustomerMarketingRightsInfo +func (s PosCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod PosCustomBatchRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderDeliveryDetails struct { - // Address: The delivery address - Address *OrderAddress `json:"address,omitempty"` - // PhoneNumber: The phone number of the person receiving the delivery. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") to unconditionally +type PosCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // Inventory: The inventory to submit. This should be set only if the method is + // `inventory`. + Inventory *PosInventory `json:"inventory,omitempty"` + // MerchantId: The ID of the POS data provider. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: The method of the batch entry. Acceptable values are: - "delete" - + // "get" - "insert" - "inventory" - "sale" + Method string `json:"method,omitempty"` + // Sale: The sale information to submit. This should be set only if the method + // is `sale`. + Sale *PosSale `json:"sale,omitempty"` + // Store: The store information to submit. This should be set only if the + // method is `insert`. + Store *PosStore `json:"store,omitempty"` + // StoreCode: The store code. This should be set only if the method is `delete` + // or `get`. + StoreCode string `json:"storeCode,omitempty"` + // TargetMerchantId: The ID of the account for which to get/submit data. + TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "Address") to include in API + // NullFields is a list of field names (e.g. "BatchId") 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 OrderDeliveryDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderDeliveryDetails +func (s PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod PosCustomBatchRequestEntry return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItem struct { - // Adjustments: Price and tax adjustments applied on the line item. - Adjustments []*OrderLineItemAdjustment `json:"adjustments,omitempty"` - // Annotations: Annotations that are attached to the line item. - Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` - // Cancellations: Cancellations of the line item. - Cancellations []*OrderCancellation `json:"cancellations,omitempty"` - // Id: The ID of the line item. - Id string `json:"id,omitempty"` - // Price: Total price for the line item. For example, if two items for $10 are - // purchased, the total price will be $20. - Price *Price `json:"price,omitempty"` - // Product: Product data as seen by customer from the time of the order - // placement. Note that certain attributes values (for example, title or gtin) - // might be reformatted and no longer match values submitted through product - // feed. - Product *OrderLineItemProduct `json:"product,omitempty"` - // QuantityCanceled: Number of items canceled. - QuantityCanceled int64 `json:"quantityCanceled,omitempty"` - // QuantityDelivered: Number of items delivered. - QuantityDelivered int64 `json:"quantityDelivered,omitempty"` - // QuantityOrdered: Number of items ordered. - QuantityOrdered int64 `json:"quantityOrdered,omitempty"` - // QuantityPending: Number of items pending. - QuantityPending int64 `json:"quantityPending,omitempty"` - // QuantityReadyForPickup: Number of items ready for pickup. - QuantityReadyForPickup int64 `json:"quantityReadyForPickup,omitempty"` - // QuantityReturned: Number of items returned. - QuantityReturned int64 `json:"quantityReturned,omitempty"` - // QuantityShipped: Number of items shipped. - QuantityShipped int64 `json:"quantityShipped,omitempty"` - // QuantityUndeliverable: Number of items undeliverable. - QuantityUndeliverable int64 `json:"quantityUndeliverable,omitempty"` - // ReturnInfo: Details of the return policy for the line item. - ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` - // Returns: Returns of the line item. - Returns []*OrderReturn `json:"returns,omitempty"` - // ShippingDetails: Details of the requested shipping for the line item. - ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` - // Tax: Total tax amount for the line item. For example, if two items are - // purchased, and each have a cost tax of $2, the total tax amount will be $4. - Tax *Price `json:"tax,omitempty"` - // ForceSendFields is a list of field names (e.g. "Adjustments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +type PosCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Adjustments") to include in API + // NullFields is a list of field names (e.g. "Entries") 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 OrderLineItem) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItem +func (s PosCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod PosCustomBatchResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemAdjustment struct { - // PriceAdjustment: Adjustment for total price of the line item. - PriceAdjustment *Price `json:"priceAdjustment,omitempty"` - // TaxAdjustment: Adjustment for total tax of the line item. - TaxAdjustment *Price `json:"taxAdjustment,omitempty"` - // Type: Type of this adjustment. Acceptable values are: - "promotion" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAdjustment") 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. "PriceAdjustment") 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 OrderLineItemAdjustment) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemAdjustment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderLineItemProduct struct { - // Brand: Brand of the item. - Brand string `json:"brand,omitempty"` - // Condition: Condition or state of the item. Acceptable values are: - "new" - // - "refurbished" - "used" - Condition string `json:"condition,omitempty"` - // ContentLanguage: The two-letter ISO 639-1 language code for the item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Fees: Associated fees at order creation time. - Fees []*OrderLineItemProductFee `json:"fees,omitempty"` - // Gtin: Global Trade Item Number (GTIN) of the item. - Gtin string `json:"gtin,omitempty"` - // Id: The REST ID of the product. - Id string `json:"id,omitempty"` - // ImageLink: URL of an image of the item. - ImageLink string `json:"imageLink,omitempty"` - // ItemGroupId: Shared identifier for all variants of the same product. - ItemGroupId string `json:"itemGroupId,omitempty"` - // Mpn: Manufacturer Part Number (MPN) of the item. - Mpn string `json:"mpn,omitempty"` - // OfferId: An identifier of the item. - OfferId string `json:"offerId,omitempty"` - // Price: Price of the item. - Price *Price `json:"price,omitempty"` - // ShownImage: URL to the cached image shown to the user when order was placed. - ShownImage string `json:"shownImage,omitempty"` - // TargetCountry: The CLDR territory code of the target country of the product. - TargetCountry string `json:"targetCountry,omitempty"` - // Title: The title of the product. - Title string `json:"title,omitempty"` - // VariantAttributes: Variant attributes for the item. These are dimensions of - // the product, such as color, gender, material, pattern, and size. You can - // find a comprehensive list of variant attributes here. - VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") to unconditionally +type PosCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors defined if, and only if, the request failed. + Errors *Errors `json:"errors,omitempty"` + // Inventory: The updated inventory information. + Inventory *PosInventory `json:"inventory,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // Sale: The updated sale information. + Sale *PosSale `json:"sale,omitempty"` + // Store: The retrieved or updated store information. + Store *PosStore `json:"store,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "Brand") to include in API + // NullFields is a list of field names (e.g. "BatchId") 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 OrderLineItemProduct) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemProduct +func (s PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod PosCustomBatchResponseEntry return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemProductFee struct { - // Amount: Amount of the fee. - Amount *Price `json:"amount,omitempty"` - // Name: Name of the fee. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally +type PosDataProviders struct { + // Country: Country code. + Country string `json:"country,omitempty"` + // PosDataProviders: A list of POS data providers. + PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") 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. "Amount") to include in API + // NullFields is a list of field names (e.g. "Country") 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 OrderLineItemProductFee) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemProductFee +func (s PosDataProviders) MarshalJSON() ([]byte, error) { + type NoMethod PosDataProviders return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemProductVariantAttribute struct { - // Dimension: The dimension of the variant. - Dimension string `json:"dimension,omitempty"` - // Value: The value for the dimension. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Dimension") to +type PosDataProvidersPosDataProvider struct { + // DisplayName: The display name of Pos data Provider. + DisplayName string `json:"displayName,omitempty"` + // FullName: The full name of this POS data Provider. + FullName string `json:"fullName,omitempty"` + // ProviderId: The ID of the account. + ProviderId uint64 `json:"providerId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "Dimension") to include in API + // NullFields is a list of field names (e.g. "DisplayName") 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 OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemProductVariantAttribute +func (s PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) { + type NoMethod PosDataProvidersPosDataProvider return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemReturnInfo struct { - // DaysToReturn: Required. How many days later the item can be returned. - DaysToReturn int64 `json:"daysToReturn,omitempty"` - // IsReturnable: Required. Whether the item is returnable. - IsReturnable bool `json:"isReturnable,omitempty"` - // PolicyUrl: Required. URL of the item return policy. - PolicyUrl string `json:"policyUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "DaysToReturn") to +// PosInventory: The absolute quantity of an item available at the given store. +type PosInventory struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posInventory" + Kind string `json:"kind,omitempty"` + // PickupMethod: Optional. Supported pickup method for this offer. Unless the + // value is "not supported", this field must be submitted together with + // `pickupSla`. For accepted attribute values, see the local product inventory + // feed specification (https://support.google.com/merchants/answer/3061342). + PickupMethod string `json:"pickupMethod,omitempty"` + // PickupSla: Optional. Expected date that an order will be ready for pickup + // relative to the order date. Must be submitted together with `pickupMethod`. + // For accepted attribute values, see the local product inventory feed + // specification (https://support.google.com/merchants/answer/3061342). + PickupSla string `json:"pickupSla,omitempty"` + // Price: Required. The current price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The available quantity of the item. + Quantity int64 `json:"quantity,omitempty,string"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "DaysToReturn") 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. "ContentLanguage") 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 OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemReturnInfo +func (s PosInventory) MarshalJSON() ([]byte, error) { + type NoMethod PosInventory return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemShippingDetails struct { - // DeliverByDate: Required. The delivery by date, in ISO 8601 format. - DeliverByDate string `json:"deliverByDate,omitempty"` - // Method: Required. Details of the shipping method. - Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"` - // PickupPromiseInMinutes: The promised time in minutes in which the order will - // be ready for pickup. This only applies to buy-online-pickup-in-store - // same-day order. - PickupPromiseInMinutes int64 `json:"pickupPromiseInMinutes,omitempty"` - // ShipByDate: Required. The ship by date, in ISO 8601 format. - ShipByDate string `json:"shipByDate,omitempty"` - // Type: Type of shipment. Indicates whether `deliveryDetails` or - // `pickupDetails` is applicable for this shipment. Acceptable values are: - - // "delivery" - "pickup" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeliverByDate") to +type PosInventoryRequest struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // PickupMethod: Optional. Supported pickup method for this offer. Unless the + // value is "not supported", this field must be submitted together with + // `pickupSla`. For accepted attribute values, see the local product inventory + // feed specification (https://support.google.com/merchants/answer/3061342). + PickupMethod string `json:"pickupMethod,omitempty"` + // PickupSla: Optional. Expected date that an order will be ready for pickup + // relative to the order date. Must be submitted together with `pickupMethod`. + // For accepted attribute values, see the local product inventory feed + // specification (https://support.google.com/merchants/answer/3061342). + PickupSla string `json:"pickupSla,omitempty"` + // Price: Required. The current price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The available quantity of the item. + Quantity int64 `json:"quantity,omitempty,string"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "DeliverByDate") 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. "ContentLanguage") 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 OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemShippingDetails +func (s PosInventoryRequest) MarshalJSON() ([]byte, error) { + type NoMethod PosInventoryRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderLineItemShippingDetailsMethod struct { - // Carrier: The carrier for the shipping. Optional. See `shipments[].carrier` - // for a list of acceptable values. - Carrier string `json:"carrier,omitempty"` - // MaxDaysInTransit: Required. Maximum transit time. - MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"` - // MethodName: Required. The name of the shipping method. - MethodName string `json:"methodName,omitempty"` - // MinDaysInTransit: Required. Minimum transit time. - MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +type PosInventoryResponse struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posInventoryResponse". + Kind string `json:"kind,omitempty"` + // PickupMethod: Optional. Supported pickup method for this offer. Unless the + // value is "not supported", this field must be submitted together with + // `pickupSla`. For accepted attribute values, see the local product inventory + // feed specification (https://support.google.com/merchants/answer/3061342). + PickupMethod string `json:"pickupMethod,omitempty"` + // PickupSla: Optional. Expected date that an order will be ready for pickup + // relative to the order date. Must be submitted together with `pickupMethod`. + // For accepted attribute values, see the local product inventory feed + // specification (https://support.google.com/merchants/answer/3061342). + PickupSla string `json:"pickupSla,omitempty"` + // Price: Required. The current price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The available quantity of the item. + Quantity int64 `json:"quantity,omitempty,string"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "Carrier") 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. "ContentLanguage") 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 OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) { - type NoMethod OrderLineItemShippingDetailsMethod +func (s PosInventoryResponse) MarshalJSON() ([]byte, error) { + type NoMethod PosInventoryResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderMerchantProvidedAnnotation struct { - // Key: Key for additional merchant provided (as key-value pairs) annotation - // about the line item. - Key string `json:"key,omitempty"` - // Value: Value for additional merchant provided (as key-value pairs) - // annotation about the line item. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Key") to unconditionally +type PosListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posListResponse". + Kind string `json:"kind,omitempty"` + Resources []*PosStore `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod OrderMerchantProvidedAnnotation +func (s PosListResponse) MarshalJSON() ([]byte, error) { + type NoMethod PosListResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderOrderAnnotation struct { - // Key: Key for additional google provided (as key-value pairs) annotation. - Key string `json:"key,omitempty"` - // Value: Value for additional google provided (as key-value pairs) annotation. - 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 +// PosSale: The change of the available quantity of an item at the given store. +type PosSale struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posSale" + Kind string `json:"kind,omitempty"` + // Price: Required. The price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The relative change of the available quantity. Negative + // for items returned. + Quantity int64 `json:"quantity,omitempty,string"` + // SaleId: A unique ID to group items from the same sale event. + SaleId string `json:"saleId,omitempty"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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 OrderOrderAnnotation) MarshalJSON() ([]byte, error) { - type NoMethod OrderOrderAnnotation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderPickupDetails struct { - // Address: Address of the pickup location where the shipment should be sent. - // Note that `recipientName` in the address is the name of the business at the - // pickup location. - Address *OrderAddress `json:"address,omitempty"` - // Collectors: Collectors authorized to pick up shipment from the pickup - // location. - Collectors []*OrderPickupDetailsCollector `json:"collectors,omitempty"` - // LocationId: ID of the pickup location. - LocationId string `json:"locationId,omitempty"` - // PickupType: The pickup type of this order. Acceptable values are: - - // "merchantStore" - "merchantStoreCurbside" - "merchantStoreLocker" - - // "thirdPartyPickupPoint" - "thirdPartyLocker" - PickupType string `json:"pickupType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") 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. "Address") 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. "ContentLanguage") 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 OrderPickupDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderPickupDetails +func (s PosSale) MarshalJSON() ([]byte, error) { + type NoMethod PosSale return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderPickupDetailsCollector struct { - // Name: Name of the person picking up the shipment. - Name string `json:"name,omitempty"` - // PhoneNumber: Phone number of the person picking up the shipment. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +type PosSaleRequest struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Price: Required. The price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The relative change of the available quantity. Negative + // for items returned. + Quantity int64 `json:"quantity,omitempty,string"` + // SaleId: A unique ID to group items from the same sale event. + SaleId string `json:"saleId,omitempty"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "Name") 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. "ContentLanguage") 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 OrderPickupDetailsCollector) MarshalJSON() ([]byte, error) { - type NoMethod OrderPickupDetailsCollector +func (s PosSaleRequest) MarshalJSON() ([]byte, error) { + type NoMethod PosSaleRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderPromotion struct { - // ApplicableItems: Items that this promotion may be applied to. If empty, - // there are no restrictions on applicable items and quantity. This field will - // also be empty for shipping promotions because shipping is not tied to any - // specific item. - ApplicableItems []*OrderPromotionItem `json:"applicableItems,omitempty"` - // AppliedItems: Items that this promotion have been applied to. Do not provide - // for `orders.createtestorder`. This field will be empty for shipping - // promotions because shipping is not tied to any specific item. - AppliedItems []*OrderPromotionItem `json:"appliedItems,omitempty"` - // EndTime: Promotion end time in ISO 8601 format. Date, time, and offset - // required, for example, "2020-01-02T09:00:00+01:00" or - // "2020-01-02T09:00:00Z". - EndTime string `json:"endTime,omitempty"` - // Funder: Required. The party funding the promotion. Only `merchant` is - // supported for `orders.createtestorder`. Acceptable values are: - "google" - // - "merchant" - Funder string `json:"funder,omitempty"` - // MerchantPromotionId: Required. This field is used to identify promotions - // within merchants' own systems. - MerchantPromotionId string `json:"merchantPromotionId,omitempty"` - // PriceValue: Estimated discount applied to price. Amount is pre-tax or - // post-tax depending on location of order. - PriceValue *Price `json:"priceValue,omitempty"` - // ShortTitle: A short title of the promotion to be shown on the checkout page. - // Do not provide for `orders.createtestorder`. - ShortTitle string `json:"shortTitle,omitempty"` - // StartTime: Promotion start time in ISO 8601 format. Date, time, and offset - // required, for example, "2020-01-02T09:00:00+01:00" or - // "2020-01-02T09:00:00Z". - StartTime string `json:"startTime,omitempty"` - // Subtype: Required. The category of the promotion. Only `moneyOff` is - // supported for `orders.createtestorder`. Acceptable values are: - - // "buyMGetMoneyOff" - "buyMGetNMoneyOff" - "buyMGetNPercentOff" - - // "buyMGetPercentOff" - "freeGift" - "freeGiftWithItemId" - - // "freeGiftWithValue" - "freeShippingOvernight" - "freeShippingStandard" - // - "freeShippingTwoDay" - "moneyOff" - "percentOff" - "rewardPoints" - // - "salePrice" - Subtype string `json:"subtype,omitempty"` - // TaxValue: Estimated discount applied to tax (if allowed by law). Do not - // provide for `orders.createtestorder`. - TaxValue *Price `json:"taxValue,omitempty"` - // Title: Required. The title of the promotion. - Title string `json:"title,omitempty"` - // Type: Required. The scope of the promotion. Only `product` is supported for - // `orders.createtestorder`. Acceptable values are: - "product" - - // "shipping" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicableItems") to +type PosSaleResponse struct { + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // Gtin: Global Trade Item Number. + Gtin string `json:"gtin,omitempty"` + // ItemId: Required. A unique identifier for the item. + ItemId string `json:"itemId,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posSaleResponse". + Kind string `json:"kind,omitempty"` + // Price: Required. The price of the item. + Price *Price `json:"price,omitempty"` + // Quantity: Required. The relative change of the available quantity. Negative + // for items returned. + Quantity int64 `json:"quantity,omitempty,string"` + // SaleId: A unique ID to group items from the same sale event. + SaleId string `json:"saleId,omitempty"` + // StoreCode: Required. The identifier of the merchant's store. Either a + // `storeCode` inserted through the API or the code of the store in a Business + // Profile. + StoreCode string `json:"storeCode,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item. + TargetCountry string `json:"targetCountry,omitempty"` + // Timestamp: Required. The inventory timestamp, in ISO 8601 format. + Timestamp string `json:"timestamp,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "ApplicableItems") to include in + // NullFields is a list of field names (e.g. "ContentLanguage") 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 OrderPromotion) MarshalJSON() ([]byte, error) { - type NoMethod OrderPromotion +func (s PosSaleResponse) MarshalJSON() ([]byte, error) { + type NoMethod PosSaleResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderPromotionItem struct { - // LineItemId: The line item ID of a product. Do not provide for - // `orders.createtestorder`. - LineItemId string `json:"lineItemId,omitempty"` - // OfferId: Required. Offer ID of a product. Only for `orders.createtestorder`. - OfferId string `json:"offerId,omitempty"` - // ProductId: `orders.createtestorder`. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity of the associated product. Do not provide for - // `orders.createtestorder`. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") to +// PosStore: Store resource. +type PosStore struct { + // GcidCategory: The business type of the store. + GcidCategory []string `json:"gcidCategory,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#posStore" + Kind string `json:"kind,omitempty"` + // MatchingStatus: Output only. The matching status of POS store and Google + // Business Profile store. Possible values are: - "matched": The POS store is + // successfully matched with the Google Business Profile store. - "failed": + // The POS store is not matched with the Google Business Profile store. See + // matching_status_hint for further details. Note that there is up to 48 hours + // propagation delay for changes in Merchant Center (e.g. creation of new + // account, accounts linking) and Google Business Profile (e.g. store address + // update) which may affect the matching status. In such cases, after a delay + // call pos.list + // (https://developers.google.com/shopping-content/reference/rest/v2.1/pos/list) + // to retrieve the updated matching status. + MatchingStatus string `json:"matchingStatus,omitempty"` + // MatchingStatusHint: Output only. The hint of why the matching has failed. + // This is only set when matching_status=failed. Possible values are: - + // "linked-store-not-found": There aren't any Google Business Profile stores + // available for matching. Connect your Merchant Center account with the Google + // Business Profile account. Or add a new Google Business Profile store + // corresponding to the POS store. - "store-match-not-found": The provided + // POS store couldn't be matched to any of the connected Google Business + // Profile stores. Merchant Center account is connected correctly and stores + // are available on Google Business Profile, but POS store location address + // does not match with Google Business Profile stores' addresses. Update POS + // store address or Google Business Profile store address to match correctly. - + // "store-match-unverified": The provided POS store couldn't be matched to + // any of the connected Google Business Profile stores, as the matched Google + // Business Profile store is unverified. Go through the Google Business Profile + // verification process to match correctly. + MatchingStatusHint string `json:"matchingStatusHint,omitempty"` + // PhoneNumber: The store phone number. + PhoneNumber string `json:"phoneNumber,omitempty"` + // PlaceId: The Google Place Id of the store location. + PlaceId string `json:"placeId,omitempty"` + // StoreAddress: Required. The street address of the store. + StoreAddress string `json:"storeAddress,omitempty"` + // StoreCode: Required. A store identifier that is unique for the given + // merchant. + StoreCode string `json:"storeCode,omitempty"` + // StoreName: The merchant or store name. + StoreName string `json:"storeName,omitempty"` + // WebsiteUrl: The website url for the store or merchant. + WebsiteUrl string `json:"websiteUrl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GcidCategory") 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. "LineItemId") to include in API + // NullFields is a list of field names (e.g. "GcidCategory") 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 OrderPromotionItem) MarshalJSON() ([]byte, error) { - type NoMethod OrderPromotionItem +func (s PosStore) MarshalJSON() ([]byte, error) { + type NoMethod PosStore return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderRefund struct { - // Actor: The actor that created the refund. Acceptable values are: - - // "customer" - "googleBot" - "googleCustomerService" - - // "googlePayments" - "googleSabre" - "merchant" - Actor string `json:"actor,omitempty"` - // Amount: The amount that is refunded. - Amount *Price `json:"amount,omitempty"` - // CreationDate: Date on which the item has been created, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // Reason: The reason for the refund. Acceptable values are: - "adjustment" - - // "autoPostInternal" - "autoPostInvalidBillingAddress" - - // "autoPostNoInventory" - "autoPostPriceError" - - // "autoPostUndeliverableShippingAddress" - "couponAbuse" - - // "courtesyAdjustment" - "customerCanceled" - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "customerSupportRequested" - "deliveredLateByCarrier" - - // "deliveredTooLate" - "expiredItem" - "failToPushOrderGoogleError" - - // "failToPushOrderMerchantError" - - // "failToPushOrderMerchantFulfillmentError" - "failToPushOrderToMerchant" - // - "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - - // "invalidCoupon" - "lateShipmentCredit" - "malformedShippingAddress" - - // "merchantDidNotShipOnTime" - "noInventory" - "orderTimeout" - - // "other" - "paymentAbuse" - "paymentDeclined" - "priceAdjustment" - - // "priceError" - "productArrivedDamaged" - "productNotAsDescribed" - - // "promoReallocation" - "qualityNotAsExpected" - "returnRefundAbuse" - - // "shippingCostAdjustment" - "shippingPriceError" - "taxAdjustment" - - // "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actor") to unconditionally +type PostalCodeGroup struct { + // Country: The CLDR territory code of the country the postal code group + // applies to. Required. + Country string `json:"country,omitempty"` + // Name: The name of the postal code group, referred to in headers. Required. + Name string `json:"name,omitempty"` + // PostalCodeRanges: A range of postal codes. Required. + PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") 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. "Actor") to include in API + // NullFields is a list of field names (e.g. "Country") 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 OrderRefund) MarshalJSON() ([]byte, error) { - type NoMethod OrderRefund +func (s PostalCodeGroup) MarshalJSON() ([]byte, error) { + type NoMethod PostalCodeGroup return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// OrderReportDisbursement: Order disbursement. All methods require the payment -// analyst role. -type OrderReportDisbursement struct { - // DisbursementAmount: The disbursement amount. - DisbursementAmount *Price `json:"disbursementAmount,omitempty"` - // DisbursementCreationDate: The disbursement date, in ISO 8601 format. - DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` - // DisbursementDate: The date the disbursement was initiated, in ISO 8601 - // format. - DisbursementDate string `json:"disbursementDate,omitempty"` - // DisbursementId: The ID of the disbursement. - DisbursementId string `json:"disbursementId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DisbursementAmount") to +type PostalCodeRange struct { + // PostalCodeRangeBegin: A postal code or a pattern of the form `prefix*` + // denoting the inclusive lower bound of the range defining the area. Examples + // values: "94108", "9410*", "9*". Required. + PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"` + // PostalCodeRangeEnd: A postal code or a pattern of the form `prefix*` + // denoting the inclusive upper bound of the range defining the area. It must + // have the same length as `postalCodeRangeBegin`: if `postalCodeRangeBegin` is + // a postal code then `postalCodeRangeEnd` must be a postal code too; if + // `postalCodeRangeBegin` is a pattern then `postalCodeRangeEnd` must be a + // pattern with the same prefix length. Optional: if not set, then the area is + // defined as being all the postal codes matching `postalCodeRangeBegin`. + PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostalCodeRangeBegin") 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. "DisbursementAmount") to include + // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") 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 OrderReportDisbursement) MarshalJSON() ([]byte, error) { - type NoMethod OrderReportDisbursement +func (s PostalCodeRange) MarshalJSON() ([]byte, error) { + type NoMethod PostalCodeRange return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderReportTransaction struct { - // DisbursementAmount: The disbursement amount. - DisbursementAmount *Price `json:"disbursementAmount,omitempty"` - // DisbursementCreationDate: The date the disbursement was created, in ISO 8601 - // format. - DisbursementCreationDate string `json:"disbursementCreationDate,omitempty"` - // DisbursementDate: The date the disbursement was initiated, in ISO 8601 - // format. - DisbursementDate string `json:"disbursementDate,omitempty"` - // DisbursementId: The ID of the disbursement. - DisbursementId string `json:"disbursementId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // MerchantOrderId: Merchant-provided ID of the order. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // OrderId: The ID of the order. - OrderId string `json:"orderId,omitempty"` - // ProductAmount: Total amount for the items. - ProductAmount *ProductAmount `json:"productAmount,omitempty"` - // TransactionDate: The date of the transaction, in ISO 8601 format. - TransactionDate string `json:"transactionDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisbursementAmount") to +type Price struct { + // Currency: The currency of the price. + Currency string `json:"currency,omitempty"` + // Value: The price represented as a number. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Currency") 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. "DisbursementAmount") 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. "Currency") 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 OrderReportTransaction) MarshalJSON() ([]byte, error) { - type NoMethod OrderReportTransaction +func (s Price) MarshalJSON() ([]byte, error) { + type NoMethod Price return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderReturn struct { - // Actor: The actor that created the refund. Acceptable values are: - - // "customer" - "googleBot" - "googleCustomerService" - - // "googlePayments" - "googleSabre" - "merchant" - Actor string `json:"actor,omitempty"` - // CreationDate: Date on which the item has been created, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // Quantity: Quantity that is returned. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the return. Acceptable values are: - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "deliveredTooLate" - "expiredItem" - "invalidCoupon" - - // "malformedShippingAddress" - "other" - "productArrivedDamaged" - - // "productNotAsDescribed" - "qualityNotAsExpected" - - // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - - // "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Actor") 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. "Actor") 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 OrderReturn) MarshalJSON() ([]byte, error) { - type NoMethod OrderReturn - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderShipment struct { - // Carrier: The carrier handling the shipment. For supported carriers, Google - // includes the carrier name and tracking URL in emails to customers. For - // select supported carriers, Google also automatically updates the shipment - // status based on the provided shipment ID. *Note:* You can also use - // unsupported carriers, but emails to customers won't include the carrier name - // or tracking URL, and there will be no automatic order status updates. - // Supported carriers for "US" are: - "ups" (United Parcel Service) - // *automatic status updates* - "usps" (United States Postal Service) - // *automatic status updates* - "fedex" (FedEx) *automatic status updates * - - // "dhl" (DHL eCommerce) *automatic status updates* (US only) - "ontrac" - // (OnTrac) *automatic status updates * - "dhl express" (DHL Express) - - // "deliv" (Deliv) - "dynamex" (TForce) - "lasership" (LaserShip) - - // "mpx" (Military Parcel Xpress) - "uds" (United Delivery Service) - - // "efw" (Estes Forwarding Worldwide) - "jd logistics" (JD Logistics) - - // "yunexpress" (YunExpress) - "china post" (China Post) - "china ems" - // (China Post Express Mail Service) - "singapore post" (Singapore Post) - - // "pos malaysia" (Pos Malaysia) - "postnl" (PostNL) - "ptt" (PTT Turkish - // Post) - "eub" (ePacket) - "chukou1" (Chukou1 Logistics) - "bestex" - // (Best Express) - "canada post" (Canada Post) - "purolator" (Purolator) - - // "canpar" (Canpar) - "india post" (India Post) - "blue dart" (Blue - // Dart) - "delhivery" (Delhivery) - "dtdc" (DTDC) - "tpc india" (TPC - // India) - "lso" (Lone Star Overnight) - "tww" (Team Worldwide) - - // "deliver-it" (Deliver-IT) - "cdl last mile" (CDL Last Mile) Supported - // carriers for FR are: - "la poste" (La Poste) *automatic status updates * - - // "colissimo" (Colissimo by La Poste) *automatic status updates* - "ups" - // (United Parcel Service) *automatic status updates * - "chronopost" - // (Chronopost by La Poste) - "gls" (General Logistics Systems France) - - // "dpd" (DPD Group by GeoPost) - "bpost" (Belgian Post Group) - "colis - // prive" (Colis Privé) - "boxtal" (Boxtal) - "geodis" (GEODIS) - "tnt" - // (TNT) - "db schenker" (DB Schenker) - "aramex" (Aramex) - Carrier string `json:"carrier,omitempty"` - // CreationDate: Date on which the shipment has been created, in ISO 8601 - // format. - CreationDate string `json:"creationDate,omitempty"` - // DeliveryDate: Date on which the shipment has been delivered, in ISO 8601 - // format. Present only if `status` is `delivered` - DeliveryDate string `json:"deliveryDate,omitempty"` - // Id: The ID of the shipment. - Id string `json:"id,omitempty"` - // LineItems: The line items that are shipped. - LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` - // ScheduledDeliveryDetails: Delivery details of the shipment if scheduling is - // needed. - ScheduledDeliveryDetails *OrderShipmentScheduledDeliveryDetails `json:"scheduledDeliveryDetails,omitempty"` - // ShipmentGroupId: The shipment group ID of the shipment. This is set in - // shiplineitems request. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // Status: The status of the shipment. Acceptable values are: - "delivered" - - // "readyForPickup" - "shipped" - "undeliverable" - Status string `json:"status,omitempty"` - // TrackingId: The tracking ID for the shipment. - TrackingId string `json:"trackingId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// PriceAmount: The price represented as a number and currency. +type PriceAmount struct { + // Currency: The currency of the price. + Currency string `json:"currency,omitempty"` + // Value: The price represented as a number. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Currency") 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. "Carrier") to include in API + // NullFields is a list of field names (e.g. "Currency") 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 OrderShipment) MarshalJSON() ([]byte, error) { - type NoMethod OrderShipment +func (s PriceAmount) MarshalJSON() ([]byte, error) { + type NoMethod PriceAmount return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type OrderShipmentLineItemShipment struct { - // LineItemId: The ID of the line item that is shipped. This value is assigned - // by Google when an order is created. Either lineItemId or productId is - // required. - LineItemId string `json:"lineItemId,omitempty"` - // ProductId: The ID of the product to ship. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity that is shipped. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) { - type NoMethod OrderShipmentLineItemShipment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderShipmentScheduledDeliveryDetails struct { - // CarrierPhoneNumber: The phone number of the carrier fulfilling the delivery. - // The phone number is formatted as the international notation in ITU-T - // Recommendation E.123 (for example, "+41 44 668 1800"). - CarrierPhoneNumber string `json:"carrierPhoneNumber,omitempty"` - // ScheduledDate: The date a shipment is scheduled for delivery, in ISO 8601 - // format. - ScheduledDate string `json:"scheduledDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierPhoneNumber") to - // unconditionally include in API requests. By default, fields with empty or +// PriceCompetitiveness: Price competitiveness fields requested by the merchant +// in the query. Field values are only set if the merchant queries +// `PriceCompetitivenessProductView`. +// https://support.google.com/merchants/answer/9626903 +type PriceCompetitiveness struct { + // BenchmarkPriceCurrencyCode: The price benchmark currency (ISO 4217 code). + BenchmarkPriceCurrencyCode string `json:"benchmarkPriceCurrencyCode,omitempty"` + // BenchmarkPriceMicros: The latest available price benchmark in micros (1 + // millionth of a standard unit, 1 USD = 1000000 micros) for the product's + // catalog in the benchmark country. + BenchmarkPriceMicros int64 `json:"benchmarkPriceMicros,omitempty,string"` + // CountryCode: The country of the price benchmark (ISO 3166 code). + CountryCode string `json:"countryCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "BenchmarkPriceCurrencyCode") + // 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. "CarrierPhoneNumber") 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. "BenchmarkPriceCurrencyCode") 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 OrderShipmentScheduledDeliveryDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderShipmentScheduledDeliveryDetails +func (s PriceCompetitiveness) MarshalJSON() ([]byte, error) { + type NoMethod PriceCompetitiveness return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// OrderTrackingSignal: Represents a merchant trade from which signals are -// extracted, e.g. shipping. -type OrderTrackingSignal struct { - // CustomerShippingFee: The shipping fee of the order; this value should be set - // to zero in the case of free shipping. - CustomerShippingFee *PriceAmount `json:"customerShippingFee,omitempty"` - // DeliveryPostalCode: Required. The delivery postal code, as a continuous - // string without spaces or dashes, e.g. "95016". This field will be anonymized - // in returned OrderTrackingSignal creation response. - DeliveryPostalCode string `json:"deliveryPostalCode,omitempty"` - // DeliveryRegionCode: Required. The [CLDR territory code] - // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the - // shipping destination. - DeliveryRegionCode string `json:"deliveryRegionCode,omitempty"` - // LineItems: Information about line items in the order. - LineItems []*OrderTrackingSignalLineItemDetails `json:"lineItems,omitempty"` - // MerchantId: The Google merchant ID of this order tracking signal. This value - // is optional. If left unset, the caller's merchant ID is used. You must - // request access in order to provide data on behalf of another merchant. For - // more information, see Submitting Order Tracking Signals - // (/shopping-content/guides/order-tracking-signals). - MerchantId int64 `json:"merchantId,omitempty,string"` - // OrderCreatedTime: Required. The time when the order was created on the - // merchant side. Include the year and timezone string, if available. - OrderCreatedTime *DateTime `json:"orderCreatedTime,omitempty"` - // OrderId: Required. The ID of the order on the merchant side. This field will - // be hashed in returned OrderTrackingSignal creation response. - OrderId string `json:"orderId,omitempty"` - // OrderTrackingSignalId: Output only. The ID that uniquely identifies this - // order tracking signal. - OrderTrackingSignalId int64 `json:"orderTrackingSignalId,omitempty,string"` - // ShipmentLineItemMapping: The mapping of the line items to the shipment - // information. - ShipmentLineItemMapping []*OrderTrackingSignalShipmentLineItemMapping `json:"shipmentLineItemMapping,omitempty"` - // ShippingInfo: The shipping information for the order. - ShippingInfo []*OrderTrackingSignalShippingInfo `json:"shippingInfo,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CustomerShippingFee") to +// PriceInsights: Price insights fields requested by the merchant in the query. +// Field values are only set if the merchant queries +// `PriceInsightsProductView`. +// https://support.google.com/merchants/answer/11916926 +type PriceInsights struct { + // Effectiveness: The predicted effectiveness of applying the price suggestion, + // bucketed. + // + // Possible values: + // "EFFECTIVENESS_UNSPECIFIED" - Effectiveness is unknown. + // "LOW" - Effectiveness is low. + // "MEDIUM" - Effectiveness is medium. + // "HIGH" - Effectiveness is high. + Effectiveness string `json:"effectiveness,omitempty"` + // PredictedClicksChangeFraction: The predicted change in clicks as a fraction + // after introducing the suggested price compared to current active price. For + // example, 0.05 is a 5% predicted increase in clicks. + PredictedClicksChangeFraction float64 `json:"predictedClicksChangeFraction,omitempty"` + // PredictedConversionsChangeFraction: The predicted change in conversions as a + // fraction after introducing the suggested price compared to current active + // price. For example, 0.05 is a 5% predicted increase in conversions). + PredictedConversionsChangeFraction float64 `json:"predictedConversionsChangeFraction,omitempty"` + // PredictedGrossProfitChangeFraction: *Deprecated*: This field is no longer + // supported and will start returning 0. The predicted change in gross profit + // as a fraction after introducing the suggested price compared to current + // active price. For example, 0.05 is a 5% predicted increase in gross profit. + PredictedGrossProfitChangeFraction float64 `json:"predictedGrossProfitChangeFraction,omitempty"` + // PredictedImpressionsChangeFraction: The predicted change in impressions as a + // fraction after introducing the suggested price compared to current active + // price. For example, 0.05 is a 5% predicted increase in impressions. + PredictedImpressionsChangeFraction float64 `json:"predictedImpressionsChangeFraction,omitempty"` + // PredictedMonthlyGrossProfitChangeCurrencyCode: *Deprecated*: This field is + // no longer supported and will start returning USD for all requests. The + // predicted monthly gross profit change currency (ISO 4217 code). + PredictedMonthlyGrossProfitChangeCurrencyCode string `json:"predictedMonthlyGrossProfitChangeCurrencyCode,omitempty"` + // PredictedMonthlyGrossProfitChangeMicros: *Deprecated*: This field is no + // longer supported and will start returning 0. The predicted change in gross + // profit in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) + // after introducing the suggested price for a month compared to current active + // price. + PredictedMonthlyGrossProfitChangeMicros int64 `json:"predictedMonthlyGrossProfitChangeMicros,omitempty,string"` + // SuggestedPriceCurrencyCode: The suggested price currency (ISO 4217 code). + SuggestedPriceCurrencyCode string `json:"suggestedPriceCurrencyCode,omitempty"` + // SuggestedPriceMicros: The latest suggested price in micros (1 millionth of a + // standard unit, 1 USD = 1000000 micros) for the product. + SuggestedPriceMicros int64 `json:"suggestedPriceMicros,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Effectiveness") 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. "CustomerShippingFee") 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 OrderTrackingSignal) MarshalJSON() ([]byte, error) { - type NoMethod OrderTrackingSignal - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OrderTrackingSignalLineItemDetails: The line items of the order. -type OrderTrackingSignalLineItemDetails struct { - // Brand: Brand of the product. - Brand string `json:"brand,omitempty"` - // Gtin: The Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // LineItemId: Required. The ID for this line item. - LineItemId string `json:"lineItemId,omitempty"` - // Mpn: The manufacturer part number. - Mpn string `json:"mpn,omitempty"` - // ProductDescription: Plain text description of this product (deprecated: - // Please use product_title instead). - ProductDescription string `json:"productDescription,omitempty"` - // ProductId: Required. The Content API REST ID of the product, in the form - // channel:contentLanguage:targetCountry:offerId. - ProductId string `json:"productId,omitempty"` - // ProductTitle: Plain text title of this product. - ProductTitle string `json:"productTitle,omitempty"` - // Quantity: The quantity of the line item in the order. - Quantity int64 `json:"quantity,omitempty,string"` - // Sku: Merchant SKU for this item (deprecated). - Sku string `json:"sku,omitempty"` - // Upc: Universal product code for this item (deprecated: Please use GTIN - // instead). - Upc string `json:"upc,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") to include in API + // NullFields is a list of field names (e.g. "Effectiveness") 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 OrderTrackingSignalLineItemDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrderTrackingSignalLineItemDetails +func (s PriceInsights) MarshalJSON() ([]byte, error) { + type NoMethod PriceInsights return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// OrderTrackingSignalShipmentLineItemMapping: Represents how many items are in -// the shipment for the given shipment_id and line_item_id. -type OrderTrackingSignalShipmentLineItemMapping struct { - // LineItemId: Required. The line item ID. - LineItemId string `json:"lineItemId,omitempty"` - // Quantity: The line item quantity in the shipment. - Quantity int64 `json:"quantity,omitempty,string"` - // ShipmentId: Required. The shipment ID. This field will be hashed in returned - // OrderTrackingSignal creation response. - ShipmentId string `json:"shipmentId,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 OrderTrackingSignalShipmentLineItemMapping) MarshalJSON() ([]byte, error) { - type NoMethod OrderTrackingSignalShipmentLineItemMapping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +func (s *PriceInsights) UnmarshalJSON(data []byte) error { + type NoMethod PriceInsights + var s1 struct { + PredictedClicksChangeFraction gensupport.JSONFloat64 `json:"predictedClicksChangeFraction"` + PredictedConversionsChangeFraction gensupport.JSONFloat64 `json:"predictedConversionsChangeFraction"` + PredictedGrossProfitChangeFraction gensupport.JSONFloat64 `json:"predictedGrossProfitChangeFraction"` + PredictedImpressionsChangeFraction gensupport.JSONFloat64 `json:"predictedImpressionsChangeFraction"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PredictedClicksChangeFraction = float64(s1.PredictedClicksChangeFraction) + s.PredictedConversionsChangeFraction = float64(s1.PredictedConversionsChangeFraction) + s.PredictedGrossProfitChangeFraction = float64(s1.PredictedGrossProfitChangeFraction) + s.PredictedImpressionsChangeFraction = float64(s1.PredictedImpressionsChangeFraction) + return nil } -// OrderTrackingSignalShippingInfo: The shipping information for the order. -type OrderTrackingSignalShippingInfo struct { - // ActualDeliveryTime: The time when the shipment was actually delivered. - // Include the year and timezone string, if available. This field is required, - // if one of the following fields is absent: tracking_id or carrier_name. - ActualDeliveryTime *DateTime `json:"actualDeliveryTime,omitempty"` - // CarrierName: The name of the shipping carrier for the delivery. This field - // is required if one of the following fields is absent: - // earliest_delivery_promise_time, latest_delivery_promise_time, and - // actual_delivery_time. - CarrierName string `json:"carrierName,omitempty"` - // CarrierServiceName: The service type for fulfillment, e.g., GROUND, - // FIRST_CLASS, etc. - CarrierServiceName string `json:"carrierServiceName,omitempty"` - // EarliestDeliveryPromiseTime: The earliest delivery promised time. Include - // the year and timezone string, if available. This field is required, if one - // of the following fields is absent: tracking_id or carrier_name. - EarliestDeliveryPromiseTime *DateTime `json:"earliestDeliveryPromiseTime,omitempty"` - // LatestDeliveryPromiseTime: The latest delivery promised time. Include the - // year and timezone string, if available. This field is required, if one of - // the following fields is absent: tracking_id or carrier_name. - LatestDeliveryPromiseTime *DateTime `json:"latestDeliveryPromiseTime,omitempty"` - // OriginPostalCode: The origin postal code, as a continuous string without - // spaces or dashes, e.g. "95016". This field will be anonymized in returned - // OrderTrackingSignal creation response. - OriginPostalCode string `json:"originPostalCode,omitempty"` - // OriginRegionCode: The [CLDR territory code] - // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the - // shipping origin. - OriginRegionCode string `json:"originRegionCode,omitempty"` - // ShipmentId: Required. The shipment ID. This field will be hashed in returned - // OrderTrackingSignal creation response. - ShipmentId string `json:"shipmentId,omitempty"` - // ShippedTime: The time when the shipment was shipped. Include the year and - // timezone string, if available. - ShippedTime *DateTime `json:"shippedTime,omitempty"` - // ShippingStatus: The status of the shipment. - // - // Possible values: - // "SHIPPING_STATE_UNSPECIFIED" - The shipping status is not known to - // merchant. - // "SHIPPED" - All items are shipped. - // "DELIVERED" - The shipment is already delivered. - ShippingStatus string `json:"shippingStatus,omitempty"` - // TrackingId: The tracking ID of the shipment. This field is required if one - // of the following fields is absent: earliest_delivery_promise_time, - // latest_delivery_promise_time, and actual_delivery_time. - TrackingId string `json:"trackingId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActualDeliveryTime") 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. "ActualDeliveryTime") 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 OrderTrackingSignalShippingInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrderTrackingSignalShippingInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCreateChargeInvoiceRequest struct { - // InvoiceId: [required] The ID of the invoice. - InvoiceId string `json:"invoiceId,omitempty"` - // InvoiceSummary: [required] Invoice summary. - InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` - // LineItemInvoices: [required] Invoice details per line item. - LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` - // OperationId: [required] The ID of the operation, unique across all - // operations for a given order. - OperationId string `json:"operationId,omitempty"` - // ShipmentGroupId: [required] ID of the shipment group. It is assigned by the - // merchant in the `shipLineItems` method and is used to group multiple line - // items that have the same kind of shipping charges. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // ForceSendFields is a list of field names (e.g. "InvoiceId") 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. "InvoiceId") 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 OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCreateChargeInvoiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCreateChargeInvoiceResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderinvoicesCreateChargeInvoiceResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCreateChargeInvoiceResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCreateRefundInvoiceRequest struct { - // InvoiceId: [required] The ID of the invoice. - InvoiceId string `json:"invoiceId,omitempty"` - // OperationId: [required] The ID of the operation, unique across all - // operations for a given order. - OperationId string `json:"operationId,omitempty"` - // RefundOnlyOption: Option to create a refund-only invoice. Exactly one of - // `refundOnlyOption` or `returnOption` must be provided. - RefundOnlyOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption `json:"refundOnlyOption,omitempty"` - // ReturnOption: Option to create an invoice for a refund and mark all items - // within the invoice as returned. Exactly one of `refundOnlyOption` or - // `returnOption` must be provided. - ReturnOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption `json:"returnOption,omitempty"` - // ShipmentInvoices: Invoice details for different shipment groups. - ShipmentInvoices []*ShipmentInvoice `json:"shipmentInvoices,omitempty"` - // ForceSendFields is a list of field names (e.g. "InvoiceId") 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. "InvoiceId") 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 OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCreateRefundInvoiceRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCreateRefundInvoiceResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` +// Product: Required product attributes are primarily defined by the product +// data specification. See the Product Data Specification Help Center article +// for information. Product data. After inserting, updating, or deleting a +// product, it may take several minutes before changes take effect. +type Product struct { + // AdditionalImageLinks: Additional URLs of images of the item. + AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` + // AdditionalSizeType: Additional cut of the item. Used together with size_type + // to represent combined size types for apparel items. + AdditionalSizeType string `json:"additionalSizeType,omitempty"` + // AdsGrouping: Used to group items in an arbitrary way. Only for CPA%, + // discouraged otherwise. + AdsGrouping string `json:"adsGrouping,omitempty"` + // AdsLabels: Similar to ads_grouping, but only works on CPC. + AdsLabels []string `json:"adsLabels,omitempty"` + // AdsRedirect: Allows advertisers to override the item URL when the product is + // shown within the context of Product Ads. + AdsRedirect string `json:"adsRedirect,omitempty"` + // Adult: Should be set to true if the item is targeted towards adults. + Adult bool `json:"adult,omitempty"` + // AgeGroup: Target age group of the item. + AgeGroup string `json:"ageGroup,omitempty"` + // AutoPricingMinPrice: A safeguard in the Automated Discounts + // (//support.google.com/merchants/answer/10295759) and Dynamic Promotions + // (//support.google.com/merchants/answer/13949249) projects, ensuring that + // discounts on merchants' offers do not fall below this value, thereby + // preserving the offer's value and profitability. + AutoPricingMinPrice *Price `json:"autoPricingMinPrice,omitempty"` + // Availability: Availability status of the item. + Availability string `json:"availability,omitempty"` + // AvailabilityDate: The day a pre-ordered product becomes available for + // delivery, in ISO 8601 format. + AvailabilityDate string `json:"availabilityDate,omitempty"` + // Brand: Brand of the item. + Brand string `json:"brand,omitempty"` + // CanonicalLink: URL for the canonical version of your item's landing page. + CanonicalLink string `json:"canonicalLink,omitempty"` + // Certifications: Product certification + // (https://support.google.com/merchants/answer/13528839), introduced for EU + // energy efficiency labeling compliance using the EU EPREL + // (https://eprel.ec.europa.eu/screen/home) database. + Certifications []*ProductCertification `json:"certifications,omitempty"` + // Channel: Required. The item's channel (online or local). Acceptable values + // are: - "local" - "online" + Channel string `json:"channel,omitempty"` + // CloudExportAdditionalProperties: Extra fields to export to the Cloud Retail + // program. + CloudExportAdditionalProperties []*CloudExportAdditionalProperties `json:"cloudExportAdditionalProperties,omitempty"` + // Color: Color of the item. + Color string `json:"color,omitempty"` + // Condition: Condition or state of the item. + Condition string `json:"condition,omitempty"` + // ContentLanguage: Required. The two-letter ISO 639-1 language code for the + // item. + ContentLanguage string `json:"contentLanguage,omitempty"` + // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting. + CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"` + // CustomAttributes: A list of custom (merchant-provided) attributes. It can + // also be used for submitting any attribute of the feed specification in its + // generic form (for example, `{ "name": "size type", "value": "regular" }`). + // This is useful for submitting attributes not explicitly exposed by the API, + // such as additional attributes used for Buy on Google (formerly known as + // Shopping Actions). + CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` + // CustomLabel0: Custom label 0 for custom grouping of items in a Shopping + // campaign. + CustomLabel0 string `json:"customLabel0,omitempty"` + // CustomLabel1: Custom label 1 for custom grouping of items in a Shopping + // campaign. + CustomLabel1 string `json:"customLabel1,omitempty"` + // CustomLabel2: Custom label 2 for custom grouping of items in a Shopping + // campaign. + CustomLabel2 string `json:"customLabel2,omitempty"` + // CustomLabel3: Custom label 3 for custom grouping of items in a Shopping + // campaign. + CustomLabel3 string `json:"customLabel3,omitempty"` + // CustomLabel4: Custom label 4 for custom grouping of items in a Shopping + // campaign. + CustomLabel4 string `json:"customLabel4,omitempty"` + // Description: Description of the item. + Description string `json:"description,omitempty"` + // DisclosureDate: The date time when an offer becomes visible in search + // results across Google’s YouTube surfaces, in ISO 8601 + // (http://en.wikipedia.org/wiki/ISO_8601) format. See Disclosure date + // (https://support.google.com/merchants/answer/13034208) for more information. + DisclosureDate string `json:"disclosureDate,omitempty"` + // DisplayAdsId: An identifier for an item for dynamic remarketing campaigns. + DisplayAdsId string `json:"displayAdsId,omitempty"` + // DisplayAdsLink: URL directly to your item's landing page for dynamic + // remarketing campaigns. + DisplayAdsLink string `json:"displayAdsLink,omitempty"` + // DisplayAdsSimilarIds: Advertiser-specified recommendations. + DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` + // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. + DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` + // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. + DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` + // EnergyEfficiencyClass: The energy efficiency class as defined in EU + // directive 2010/30/EU. + EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` + // ExcludedDestinations: The list of destinations to exclude + // (//support.google.com/merchants/answer/6324486) for this target (corresponds + // to cleared check boxes in Merchant Center). Products that are excluded from + // all destinations for more than 7 days are automatically deleted. + ExcludedDestinations []string `json:"excludedDestinations,omitempty"` + // ExpirationDate: Date on which the item should expire, as specified upon + // insertion, in ISO 8601 format. The actual expiration date in Google Shopping + // is exposed in `productstatuses` as `googleExpirationDate` and might be + // earlier if `expirationDate` is too far in the future. + ExpirationDate string `json:"expirationDate,omitempty"` + // ExternalSellerId: Required for multi-seller accounts. Use this attribute if + // you're a marketplace uploading products for various sellers to your + // multi-seller account. + ExternalSellerId string `json:"externalSellerId,omitempty"` + // FeedLabel: Feed label for the item. Either `targetCountry` or `feedLabel` is + // required. Must be less than or equal to 20 uppercase letters (A-Z), numbers + // (0-9), and dashes (-). + FeedLabel string `json:"feedLabel,omitempty"` + // FreeShippingThreshold: Optional. Conditions to be met for a product to have + // free shipping. + FreeShippingThreshold []*FreeShippingThreshold `json:"freeShippingThreshold,omitempty"` + // Gender: Target gender of the item. + Gender string `json:"gender,omitempty"` + // GoogleProductCategory: Google's category of the item (see Google product + // taxonomy (https://support.google.com/merchants/answer/1705911)). When + // querying products, this field will contain the user provided value. There is + // currently no way to get back the auto assigned google product categories + // through the API. + GoogleProductCategory string `json:"googleProductCategory,omitempty"` + // Gtin: Global Trade Item Number (GTIN) of the item. + Gtin string `json:"gtin,omitempty"` + // Id: The REST ID of the product. Content API methods that operate on products + // take this as their `productId` parameter. The REST ID for a product has one + // of the 2 forms channel:contentLanguage: targetCountry: offerId or + // channel:contentLanguage:feedLabel: offerId. + Id string `json:"id,omitempty"` + // IdentifierExists: False when the item does not have unique product + // identifiers appropriate to its category, such as GTIN, MPN, and brand. + // Required according to the Unique Product Identifier Rules for all target + // countries except for Canada. + IdentifierExists bool `json:"identifierExists,omitempty"` + // ImageLink: URL of an image of the item. + ImageLink string `json:"imageLink,omitempty"` + // IncludedDestinations: The list of destinations to include + // (//support.google.com/merchants/answer/7501026) for this target (corresponds + // to checked check boxes in Merchant Center). Default destinations are always + // included unless provided in `excludedDestinations`. + IncludedDestinations []string `json:"includedDestinations,omitempty"` + // Installment: Number and amount of installments to pay for an item. + Installment *Installment `json:"installment,omitempty"` + // IsBundle: Whether the item is a merchant-defined bundle. A bundle is a + // custom grouping of different products sold by a merchant for a single price. + IsBundle bool `json:"isBundle,omitempty"` + // ItemGroupId: Shared identifier for all variants of the same product. + ItemGroupId string `json:"itemGroupId,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderinvoicesCreateRefundInvoiceResponse". + // "content#product" Kind string `json:"kind,omitempty"` + // LifestyleImageLinks: Additional URLs of lifestyle images of the item. Used + // to explicitly identify images that showcase your item in a real-world + // context. See the Help Center article for more information. + LifestyleImageLinks []string `json:"lifestyleImageLinks,omitempty"` + // Link: URL directly linking to your item's page on your website. + Link string `json:"link,omitempty"` + // LinkTemplate: URL template for merchant hosted local storefront. + LinkTemplate string `json:"linkTemplate,omitempty"` + // LoyaltyProgram: Loyalty program information that is used to surface loyalty + // benefits ( for example, better pricing, points, etc) to the user of this + // item. This signular field points to the latest uploaded loyalty program + // info. This field will be deprecated in the coming weeks and should not be + // used in favor of the plural 'LoyaltyProgram' field below. + LoyaltyProgram *LoyaltyProgram `json:"loyaltyProgram,omitempty"` + // LoyaltyPrograms: Optional. A list of loyalty program information that is + // used to surface loyalty benefits (for example, better pricing, points, etc) + // to the user of this item. + LoyaltyPrograms []*LoyaltyProgram `json:"loyaltyPrograms,omitempty"` + // Material: The material of which the item is made. + Material string `json:"material,omitempty"` + // MaxEnergyEfficiencyClass: The energy efficiency class as defined in EU + // directive 2010/30/EU. + MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"` + // MaxHandlingTime: Maximal product handling time (in business days). + MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` + // MinEnergyEfficiencyClass: The energy efficiency class as defined in EU + // directive 2010/30/EU. + MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"` + // MinHandlingTime: Minimal product handling time (in business days). + MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` + // MobileLink: URL for the mobile-optimized version of your item's landing + // page. + MobileLink string `json:"mobileLink,omitempty"` + // MobileLinkTemplate: URL template for merchant hosted local storefront + // optimized for mobile devices. + MobileLinkTemplate string `json:"mobileLinkTemplate,omitempty"` + // Mpn: Manufacturer Part Number (MPN) of the item. + Mpn string `json:"mpn,omitempty"` + // Multipack: The number of identical products in a merchant-defined multipack. + Multipack int64 `json:"multipack,omitempty,string"` + // OfferId: Required. A unique identifier for the item. Leading and trailing + // whitespaces are stripped and multiple whitespaces are replaced by a single + // whitespace upon submission. Only valid unicode characters are accepted. See + // the products feed specification for details. *Note:* Content API methods + // that operate on products take the REST ID of the product, *not* this + // identifier. + OfferId string `json:"offerId,omitempty"` + // Pattern: The item's pattern (for example, polka dots). + Pattern string `json:"pattern,omitempty"` + // Pause: Publication of this item should be temporarily paused. Acceptable + // values are: - "ads" + Pause string `json:"pause,omitempty"` + // PickupMethod: The pick up option for the item. Acceptable values are: - + // "buy" - "reserve" - "ship to store" - "not supported" + PickupMethod string `json:"pickupMethod,omitempty"` + // PickupSla: Item store pickup timeline. Acceptable values are: - "same day" + // - "next day" - "2-day" - "3-day" - "4-day" - "5-day" - "6-day" - + // "7-day" - "multi-week" + PickupSla string `json:"pickupSla,omitempty"` + // Price: Price of the item. + Price *Price `json:"price,omitempty"` + // ProductDetails: Technical specification or additional product details. + ProductDetails []*ProductProductDetail `json:"productDetails,omitempty"` + // ProductHeight: The height of the product in the units provided. The value + // must be between 0 (exclusive) and 3000 (inclusive). + ProductHeight *ProductDimension `json:"productHeight,omitempty"` + // ProductHighlights: Bullet points describing the most relevant highlights of + // a product. + ProductHighlights []string `json:"productHighlights,omitempty"` + // ProductLength: The length of the product in the units provided. The value + // must be between 0 (exclusive) and 3000 (inclusive). + ProductLength *ProductDimension `json:"productLength,omitempty"` + // ProductTypes: Categories of the item (formatted as in product data + // specification). + ProductTypes []string `json:"productTypes,omitempty"` + // ProductWeight: The weight of the product in the units provided. The value + // must be between 0 (exclusive) and 2000 (inclusive). + ProductWeight *ProductWeight `json:"productWeight,omitempty"` + // ProductWidth: The width of the product in the units provided. The value must + // be between 0 (exclusive) and 3000 (inclusive). + ProductWidth *ProductDimension `json:"productWidth,omitempty"` + // PromotionIds: The unique ID of a promotion. + PromotionIds []string `json:"promotionIds,omitempty"` + // SalePrice: Advertised sale price of the item. + SalePrice *Price `json:"salePrice,omitempty"` + // SalePriceEffectiveDate: Date range during which the item is on sale (see + // product data specification ). + SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` + // SellOnGoogleQuantity: The quantity of the product that is available for + // selling on Google. Supported only for online products. + SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` + // Shipping: Shipping rules. + Shipping []*ProductShipping `json:"shipping,omitempty"` + // ShippingHeight: Height of the item for shipping. + ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"` + // ShippingLabel: The shipping label of the product, used to group product in + // account-level shipping rules. + ShippingLabel string `json:"shippingLabel,omitempty"` + // ShippingLength: Length of the item for shipping. + ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"` + // ShippingWeight: Weight of the item for shipping. + ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"` + // ShippingWidth: Width of the item for shipping. + ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"` + // ShoppingAdsExcludedCountries: List of country codes (ISO 3166-1 alpha-2) to + // exclude the offer from Shopping Ads destination. Countries from this list + // are removed from countries configured in MC feed settings. + ShoppingAdsExcludedCountries []string `json:"shoppingAdsExcludedCountries,omitempty"` + // SizeSystem: System in which the size is specified. Recommended for apparel + // items. + SizeSystem string `json:"sizeSystem,omitempty"` + // SizeType: The cut of the item. Recommended for apparel items. + SizeType string `json:"sizeType,omitempty"` + // Sizes: Size of the item. Only one value is allowed. For variants with + // different sizes, insert a separate product for each size with the same + // `itemGroupId` value (see size definition). + Sizes []string `json:"sizes,omitempty"` + // Source: Output only. The source of the offer, that is, how the offer was + // created. Acceptable values are: - "api" - "crawl" - "feed" + Source string `json:"source,omitempty"` + // StructuredDescription: Structured description, for algorithmically + // (AI)-generated descriptions. + StructuredDescription *ProductStructuredDescription `json:"structuredDescription,omitempty"` + // StructuredTitle: Structured title, for algorithmically (AI)-generated + // titles. + StructuredTitle *ProductStructuredTitle `json:"structuredTitle,omitempty"` + // SubscriptionCost: Number of periods (months or years) and amount of payment + // per period for an item with an associated subscription contract. + SubscriptionCost *ProductSubscriptionCost `json:"subscriptionCost,omitempty"` + // TargetCountry: Required. The CLDR territory code for the item's country of + // sale. + TargetCountry string `json:"targetCountry,omitempty"` + // TaxCategory: The tax category of the product, used to configure detailed tax + // nexus in account-level tax settings. + TaxCategory string `json:"taxCategory,omitempty"` + // Taxes: Tax information. + Taxes []*ProductTax `json:"taxes,omitempty"` + // Title: Title of the item. + Title string `json:"title,omitempty"` + // TransitTimeLabel: The transit time label of the product, used to group + // product in account-level transit time tables. + TransitTimeLabel string `json:"transitTimeLabel,omitempty"` + // UnitPricingBaseMeasure: The preference of the denominator of the unit price. + UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` + // UnitPricingMeasure: The measure and dimension of an item. + UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"` + // VirtualModelLink: URL of the 3D model of the item to provide more visuals. + VirtualModelLink string `json:"virtualModelLink,omitempty"` - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCreateRefundInvoiceResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption struct { - // Description: Optional description of the refund reason. - Description string `json:"description,omitempty"` - // Reason: [required] Reason for the refund. Acceptable values are: - - // "adjustment" - "autoPostInternal" - "autoPostInvalidBillingAddress" - - // "autoPostNoInventory" - "autoPostPriceError" - - // "autoPostUndeliverableShippingAddress" - "couponAbuse" - - // "courtesyAdjustment" - "customerCanceled" - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "customerSupportRequested" - "deliveredLateByCarrier" - - // "deliveredTooLate" - "expiredItem" - "failToPushOrderGoogleError" - - // "failToPushOrderMerchantError" - - // "failToPushOrderMerchantFulfillmentError" - "failToPushOrderToMerchant" - // - "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - - // "invalidCoupon" - "lateShipmentCredit" - "malformedShippingAddress" - - // "merchantDidNotShipOnTime" - "noInventory" - "orderTimeout" - - // "other" - "paymentAbuse" - "paymentDeclined" - "priceAdjustment" - - // "priceError" - "productArrivedDamaged" - "productNotAsDescribed" - - // "promoReallocation" - "qualityNotAsExpected" - "returnRefundAbuse" - - // "shippingCostAdjustment" - "shippingPriceError" - "taxAdjustment" - - // "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "wrongProductShipped" - Reason string `json:"reason,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 OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption struct { - // Description: Optional description of the return reason. - Description string `json:"description,omitempty"` - // Reason: [required] Reason for the return. Acceptable values are: - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "deliveredTooLate" - "expiredItem" - "invalidCoupon" - - // "malformedShippingAddress" - "other" - "productArrivedDamaged" - - // "productNotAsDescribed" - "qualityNotAsExpected" - - // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - - // "wrongProductShipped" - Reason string `json:"reason,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 OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) { - type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreportsListDisbursementsResponse struct { - // Disbursements: The list of disbursements. - Disbursements []*OrderReportDisbursement `json:"disbursements,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreportsListDisbursementsResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of - // disbursements. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Disbursements") 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. "Disbursements") 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 OrderreportsListDisbursementsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreportsListDisbursementsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreportsListTransactionsResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreportsListTransactionsResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of transactions. - NextPageToken string `json:"nextPageToken,omitempty"` - // Transactions: The list of transactions. - Transactions []*OrderReportTransaction `json:"transactions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrderreportsListTransactionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreportsListTransactionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsAcknowledgeRequest struct { - // OperationId: [required] The ID of the operation, unique across all - // operations for a given order return. - OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") 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. "OperationId") 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 OrderreturnsAcknowledgeRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsAcknowledgeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsAcknowledgeResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreturnsAcknowledgeResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrderreturnsAcknowledgeResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsAcknowledgeResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsCreateOrderReturnRequest struct { - // LineItems: The list of line items to return. - LineItems []*OrderreturnsLineItem `json:"lineItems,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // OrderId: The ID of the order. - OrderId string `json:"orderId,omitempty"` - // ReturnMethodType: The way of the package being returned. - ReturnMethodType string `json:"returnMethodType,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItems") 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. "LineItems") 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 OrderreturnsCreateOrderReturnRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsCreateOrderReturnRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsCreateOrderReturnResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreturnsCreateOrderReturnResponse". - Kind string `json:"kind,omitempty"` - // OrderReturn: Created order return. - OrderReturn *MerchantOrderReturn `json:"orderReturn,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrderreturnsCreateOrderReturnResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsCreateOrderReturnResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsLineItem struct { - // LineItemId: The ID of the line item. This value is assigned by Google when - // an order is created. Either lineItemId or productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // ProductId: The ID of the product to cancel. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity of this line item. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 OrderreturnsLineItem) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsLineItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreturnsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of returns. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*MerchantOrderReturn `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrderreturnsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsPartialRefund struct { - // PriceAmount: The pre-tax or post-tax amount to be refunded, depending on the - // location of the order. - PriceAmount *Price `json:"priceAmount,omitempty"` - // TaxAmount: Tax amount to be refunded. Note: This has different meaning - // depending on the location of the order. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAmount") 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. "PriceAmount") 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 OrderreturnsPartialRefund) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsPartialRefund - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsProcessRequest struct { - // FullChargeReturnShippingCost: Option to charge the customer return shipping - // cost. - FullChargeReturnShippingCost bool `json:"fullChargeReturnShippingCost,omitempty"` - // OperationId: [required] The ID of the operation, unique across all - // operations for a given order return. - OperationId string `json:"operationId,omitempty"` - // RefundShippingFee: Refunds for original shipping fee. - RefundShippingFee *OrderreturnsRefundOperation `json:"refundShippingFee,omitempty"` - // ReturnItems: The list of items to return. - ReturnItems []*OrderreturnsReturnItem `json:"returnItems,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "FullChargeReturnShippingCost") 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. "FullChargeReturnShippingCost") 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 OrderreturnsProcessRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsProcessRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsProcessResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#orderreturnsProcessResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrderreturnsProcessResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsProcessResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsRefundOperation struct { - // FullRefund: If true, the item will be fully refunded. Allowed only when - // payment_type is FOP. Merchant can choose this refund option to indicate the - // full remaining amount of corresponding object to be refunded to the customer - // through FOP. - FullRefund bool `json:"fullRefund,omitempty"` - // PartialRefund: If this is set, the item will be partially refunded. Merchant - // can choose this refund option to specify the customized amount that to be - // refunded to the customer. - PartialRefund *OrderreturnsPartialRefund `json:"partialRefund,omitempty"` - // PaymentType: The payment way of issuing refund. Default value is - // ORIGINAL_FOP if not set. - PaymentType string `json:"paymentType,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ReturnRefundReason: Code of the refund reason. - ReturnRefundReason string `json:"returnRefundReason,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullRefund") 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. "FullRefund") 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 OrderreturnsRefundOperation) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsRefundOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsRejectOperation struct { - // Reason: The reason for the return. - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reason") 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. "Reason") 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 OrderreturnsRejectOperation) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsRejectOperation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrderreturnsReturnItem struct { - // Refund: Refunds the item. - Refund *OrderreturnsRefundOperation `json:"refund,omitempty"` - // Reject: Rejects the item. - Reject *OrderreturnsRejectOperation `json:"reject,omitempty"` - // ReturnItemId: Unit level ID for the return item. Different units of the same - // product will have different IDs. - ReturnItemId string `json:"returnItemId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Refund") 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. "Refund") 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 OrderreturnsReturnItem) MarshalJSON() ([]byte, error) { - type NoMethod OrderreturnsReturnItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersAcknowledgeRequest struct { - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") 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. "OperationId") 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 OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersAcknowledgeRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersAcknowledgeResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersAcknowledgeResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersAcknowledgeResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersAdvanceTestOrderResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersAdvanceTestOrderResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersAdvanceTestOrderResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelLineItemRequest struct { - // LineItemId: The ID of the line item to cancel. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ProductId: The ID of the product to cancel. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity to cancel. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the cancellation. Acceptable values are: - - // "customerInitiatedCancel" - "invalidCoupon" - - // "malformedShippingAddress" - "noInventory" - "other" - "priceError" - // - "shippingPriceError" - "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "failedToCaptureFunds" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelLineItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelLineItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCancelLineItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelLineItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelRequest struct { - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // Reason: The reason for the cancellation. Acceptable values are: - - // "customerInitiatedCancel" - "invalidCoupon" - - // "malformedShippingAddress" - "noInventory" - "other" - "priceError" - // - "shippingPriceError" - "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "failedToCaptureFunds" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "OperationId") 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. "OperationId") 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 OrdersCancelRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCancelResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersCancelResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelTestOrderByCustomerRequest struct { - // Reason: The reason for the cancellation. Acceptable values are: - - // "changedMind" - "orderedWrongItem" - "other" - Reason string `json:"reason,omitempty"` - // ForceSendFields is a list of field names (e.g. "Reason") 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. "Reason") 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 OrdersCancelTestOrderByCustomerRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelTestOrderByCustomerRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCancelTestOrderByCustomerResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCancelTestOrderByCustomerResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrdersCancelTestOrderByCustomerResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCancelTestOrderByCustomerResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCreateTestOrderRequest struct { - // Country: The CLDR territory code of the country of the test order to create. - // Affects the currency and addresses of orders created through - // `template_name`, or the addresses of orders created through `test_order`. - // Acceptable values are: - "US" - "FR" Defaults to "US". - Country string `json:"country,omitempty"` - // TemplateName: The test order template to use. Specify as an alternative to - // `testOrder` as a shortcut for retrieving a template and then creating an - // order using that template. Acceptable values are: - "template1" - - // "template1a" - "template1b" - "template2" - "template3" - TemplateName string `json:"templateName,omitempty"` - // TestOrder: The test order to create. - TestOrder *TestOrder `json:"testOrder,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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 OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCreateTestOrderRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCreateTestOrderResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCreateTestOrderResponse". - Kind string `json:"kind,omitempty"` - // OrderId: The ID of the newly created test order. - OrderId string `json:"orderId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCreateTestOrderResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCreateTestReturnRequest struct { - // Items: Returned items. - Items []*OrdersCustomBatchRequestEntryCreateTestReturnReturnItem `json:"items,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 OrdersCreateTestReturnRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCreateTestReturnRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCreateTestReturnResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersCreateTestReturnResponse". - Kind string `json:"kind,omitempty"` - // ReturnId: The ID of the newly created test order return. - ReturnId string `json:"returnId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrdersCreateTestReturnResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCreateTestReturnResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCustomBatchRequestEntryCreateTestReturnReturnItem struct { - // LineItemId: The ID of the line item to return. - LineItemId string `json:"lineItemId,omitempty"` - // Quantity: Quantity that is returned. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 OrdersCustomBatchRequestEntryCreateTestReturnReturnItem) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryCreateTestReturnReturnItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCustomBatchRequestEntryRefundItemItem struct { - // Amount: The total amount that is refunded. (for example, refunding $5 each - // for 2 products should be done by setting quantity to 2 and amount to 10$) In - // case of multiple refunds, this should be the amount you currently want to - // refund to the customer. - Amount *MonetaryAmount `json:"amount,omitempty"` - // FullRefund: If true, the full item will be refunded. If this is true, amount - // shouldn't be provided and will be ignored. - FullRefund bool `json:"fullRefund,omitempty"` - // LineItemId: The ID of the line item. Either lineItemId or productId is - // required. - LineItemId string `json:"lineItemId,omitempty"` - // ProductId: The ID of the product. This is the REST ID used in the products - // service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The number of products that are refunded. - Quantity int64 `json:"quantity,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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 OrdersCustomBatchRequestEntryRefundItemItem) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryRefundItemItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCustomBatchRequestEntryRefundItemShipping struct { - // Amount: The amount that is refunded. If this is not the first refund for the - // shipment, this should be the newly refunded amount. - Amount *Price `json:"amount,omitempty"` - // FullRefund: If set to true, all shipping costs for the order will be - // refunded. If this is true, amount shouldn't be provided and will be ignored. - // If set to false, submit the amount of the partial shipping refund, excluding - // the shipping tax. The shipping tax is calculated and handled on Google's - // side. - FullRefund bool `json:"fullRefund,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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 OrdersCustomBatchRequestEntryRefundItemShipping) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryRefundItemShipping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { - // Carrier: The carrier handling the shipment. See `shipments[].carrier` in the - // Orders resource representation for a list of acceptable values. - Carrier string `json:"carrier,omitempty"` - // ShipmentId: Required. The ID of the shipment. This is assigned by the - // merchant and is unique to each shipment. - ShipmentId string `json:"shipmentId,omitempty"` - // TrackingId: The tracking ID for the shipment. - TrackingId string `json:"trackingId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") 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. "Carrier") 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 OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails: -// ScheduledDeliveryDetails used to update the scheduled delivery order. -type OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails struct { - // CarrierPhoneNumber: The phone number of the carrier fulfilling the delivery. - // The phone number should be formatted as the international notation in - CarrierPhoneNumber string `json:"carrierPhoneNumber,omitempty"` - // ScheduledDate: The date a shipment is scheduled for delivery, in ISO 8601 - // format. - ScheduledDate string `json:"scheduledDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierPhoneNumber") 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. "CarrierPhoneNumber") 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 OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails) MarshalJSON() ([]byte, error) { - type NoMethod OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersGetByMerchantOrderIdResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersGetByMerchantOrderIdResponse". - Kind string `json:"kind,omitempty"` - // Order: The requested order. - Order *Order `json:"order,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersGetByMerchantOrderIdResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersGetTestOrderTemplateResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersGetTestOrderTemplateResponse". - Kind string `json:"kind,omitempty"` - // Template: The requested test order template. - Template *TestOrder `json:"template,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersGetTestOrderTemplateResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersInStoreRefundLineItemRequest struct { - // LineItemId: The ID of the line item to return. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // PriceAmount: The amount to be refunded. This may be pre-tax or post-tax - // depending on the location of the order. Required. - PriceAmount *Price `json:"priceAmount,omitempty"` - // ProductId: The ID of the product to return. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity to return and refund. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the return. Acceptable values are: - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "deliveredTooLate" - "expiredItem" - "invalidCoupon" - - // "malformedShippingAddress" - "other" - "productArrivedDamaged" - - // "productNotAsDescribed" - "qualityNotAsExpected" - - // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - - // "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // TaxAmount: The amount of tax to be refunded. Required. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersInStoreRefundLineItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersInStoreRefundLineItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersInStoreRefundLineItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersInStoreRefundLineItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of orders. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*Order `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 OrdersListResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRefundItemRequest struct { - // Items: The items that are refunded. Either Item or Shipping must be provided - // in the request. - Items []*OrdersCustomBatchRequestEntryRefundItemItem `json:"items,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // Reason: The reason for the refund. Acceptable values are: - - // "shippingCostAdjustment" - "priceAdjustment" - "taxAdjustment" - - // "feeAdjustment" - "courtesyAdjustment" - "adjustment" - - // "customerCancelled" - "noInventory" - "productNotAsDescribed" - - // "undeliverableShippingAddress" - "wrongProductShipped" - - // "lateShipmentCredit" - "deliveredLateByCarrier" - - // "productArrivedDamaged" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // Shipping: The refund on shipping. Optional, but either Item or Shipping must - // be provided in the request. - Shipping *OrdersCustomBatchRequestEntryRefundItemShipping `json:"shipping,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 OrdersRefundItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRefundItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRefundItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersRefundItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersRefundItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRefundItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRefundOrderRequest struct { - // Amount: The amount that is refunded. If this is not the first refund for the - // order, this should be the newly refunded amount. - Amount *MonetaryAmount `json:"amount,omitempty"` - // FullRefund: If true, the full order will be refunded, including shipping. If - // this is true, amount shouldn't be provided and will be ignored. - FullRefund bool `json:"fullRefund,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // Reason: The reason for the refund. Acceptable values are: - - // "courtesyAdjustment" - "other" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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 OrdersRefundOrderRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRefundOrderRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRefundOrderResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersRefundOrderResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersRefundOrderResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRefundOrderResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRejectReturnLineItemRequest struct { - // LineItemId: The ID of the line item to return. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ProductId: The ID of the product to return. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity to return and refund. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the return. Acceptable values are: - - // "damagedOrUsed" - "missingComponent" - "notEligible" - "other" - - // "outOfReturnWindow" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRejectReturnLineItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersRejectReturnLineItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersRejectReturnLineItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersRejectReturnLineItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersReturnRefundLineItemRequest struct { - // LineItemId: The ID of the line item to return. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // PriceAmount: The amount to be refunded. This may be pre-tax or post-tax - // depending on the location of the order. If omitted, refundless return is - // assumed. - PriceAmount *Price `json:"priceAmount,omitempty"` - // ProductId: The ID of the product to return. This is the REST ID used in the - // products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // Quantity: The quantity to return and refund. Quantity is required. - Quantity int64 `json:"quantity,omitempty"` - // Reason: The reason for the return. Acceptable values are: - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "deliveredTooLate" - "expiredItem" - "invalidCoupon" - - // "malformedShippingAddress" - "other" - "productArrivedDamaged" - - // "productNotAsDescribed" - "qualityNotAsExpected" - - // "undeliverableShippingAddress" - "unsupportedPoBoxAddress" - - // "wrongProductShipped" - Reason string `json:"reason,omitempty"` - // ReasonText: The explanation of the reason. - ReasonText string `json:"reasonText,omitempty"` - // TaxAmount: The amount of tax to be refunded. Optional, but if filled, then - // priceAmount must be set. Calculated automatically if not provided. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersReturnRefundLineItemRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersReturnRefundLineItemResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersReturnRefundLineItemResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersReturnRefundLineItemResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersSetLineItemMetadataRequest struct { - Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"` - // LineItemId: The ID of the line item to set metadata. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ProductId: The ID of the product to set metadata. This is the REST ID used - // in the products service. Either lineItemId or productId is required. - ProductId string `json:"productId,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 - // 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. "Annotations") 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 OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersSetLineItemMetadataRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersSetLineItemMetadataResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersSetLineItemMetadataResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersSetLineItemMetadataResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersShipLineItemsRequest struct { - // LineItems: Line items to ship. - LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ShipmentGroupId: ID of the shipment group. Required for orders that use the - // orderinvoices service. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // ShipmentInfos: Shipment information. This field is repeated because a single - // line item can be shipped in several packages (and have several tracking - // IDs). - ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItems") 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. "LineItems") 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 OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersShipLineItemsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersShipLineItemsResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersShipLineItemsResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersShipLineItemsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateLineItemShippingDetailsRequest struct { - // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not - // specified only ship by date is updated. Provided date should be within 1 - // year timeframe and can't be a date in the past. - DeliverByDate string `json:"deliverByDate,omitempty"` - // LineItemId: The ID of the line item to set metadata. Either lineItemId or - // productId is required. - LineItemId string `json:"lineItemId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ProductId: The ID of the product to set metadata. This is the REST ID used - // in the products service. Either lineItemId or productId is required. - ProductId string `json:"productId,omitempty"` - // ShipByDate: Updated ship by date, in ISO 8601 format. If not specified only - // deliver by date is updated. Provided date should be within 1 year timeframe - // and can't be a date in the past. - ShipByDate string `json:"shipByDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeliverByDate") 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. "DeliverByDate") 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 OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateLineItemShippingDetailsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateLineItemShippingDetailsResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersUpdateLineItemShippingDetailsResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateLineItemShippingDetailsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateMerchantOrderIdRequest struct { - // MerchantOrderId: The merchant order id to be assigned to the order. Must be - // unique per merchant. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "MerchantOrderId") 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. "MerchantOrderId") 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 OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateMerchantOrderIdRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateMerchantOrderIdResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersUpdateMerchantOrderIdResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateMerchantOrderIdResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateShipmentRequest struct { - // Carrier: The carrier handling the shipment. Not updated if missing. See - // `shipments[].carrier` in the Orders resource representation for a list of - // acceptable values. - Carrier string `json:"carrier,omitempty"` - // DeliveryDate: Date on which the shipment has been delivered, in ISO 8601 - // format. Optional and can be provided only if `status` is `delivered`. - DeliveryDate string `json:"deliveryDate,omitempty"` - // LastPickupDate: Date after which the pickup will expire, in ISO 8601 format. - // Required only when order is buy-online-pickup-in-store(BOPIS) and `status` - // is `ready for pickup`. - LastPickupDate string `json:"lastPickupDate,omitempty"` - // OperationId: The ID of the operation. Unique across all operations for a - // given order. - OperationId string `json:"operationId,omitempty"` - // ReadyPickupDate: Date on which the shipment has been ready for pickup, in - // ISO 8601 format. Optional and can be provided only if `status` is `ready for - // pickup`. - ReadyPickupDate string `json:"readyPickupDate,omitempty"` - // ScheduledDeliveryDetails: Delivery details of the shipment if scheduling is - // needed. - ScheduledDeliveryDetails *OrdersCustomBatchRequestEntryUpdateShipmentScheduledDeliveryDetails `json:"scheduledDeliveryDetails,omitempty"` - // ShipmentId: The ID of the shipment. - ShipmentId string `json:"shipmentId,omitempty"` - // Status: New status for the shipment. Not updated if missing. Acceptable - // values are: - "delivered" - "undeliverable" - "readyForPickup" - Status string `json:"status,omitempty"` - // TrackingId: The tracking ID for the shipment. Not updated if missing. - TrackingId string `json:"trackingId,omitempty"` - // UndeliveredDate: Date on which the shipment has been undeliverable, in ISO - // 8601 format. Optional and can be provided only if `status` is - // `undeliverable`. - UndeliveredDate string `json:"undeliveredDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") 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. "Carrier") 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 OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateShipmentRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OrdersUpdateShipmentResponse struct { - // ExecutionStatus: The status of the execution. Acceptable values are: - - // "duplicate" - "executed" - ExecutionStatus string `json:"executionStatus,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#ordersUpdateShipmentResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ExecutionStatus") 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. "ExecutionStatus") 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 OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) { - type NoMethod OrdersUpdateShipmentResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PauseBuyOnGoogleProgramRequest: Request message for the PauseProgram method. -type PauseBuyOnGoogleProgramRequest struct { -} - -// PaymentServiceProviderLinkInfo: Additional information required for -// PAYMENT_SERVICE_PROVIDER link type. -type PaymentServiceProviderLinkInfo struct { - // ExternalAccountBusinessCountry: The business country of the merchant account - // as identified by the third party service provider. - ExternalAccountBusinessCountry string `json:"externalAccountBusinessCountry,omitempty"` - // ExternalAccountId: The id used by the third party service provider to - // identify the merchant. - ExternalAccountId string `json:"externalAccountId,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ExternalAccountBusinessCountry") 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. "ExternalAccountBusinessCountry") - // 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 PaymentServiceProviderLinkInfo) MarshalJSON() ([]byte, error) { - type NoMethod PaymentServiceProviderLinkInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PickupCarrierService struct { - // CarrierName: The name of the pickup carrier (for example, "UPS"). - // Required. - CarrierName string `json:"carrierName,omitempty"` - // ServiceName: The name of the pickup service (for example, "Access point"). - // Required. - ServiceName string `json:"serviceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierName") 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. "CarrierName") 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 PickupCarrierService) MarshalJSON() ([]byte, error) { - type NoMethod PickupCarrierService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PickupServicesPickupService struct { - // CarrierName: The name of the carrier (for example, "UPS"). Always present. - CarrierName string `json:"carrierName,omitempty"` - // Country: The CLDR country code of the carrier (for example, "US"). Always - // present. - Country string `json:"country,omitempty"` - // ServiceName: The name of the pickup service (for example, "Access point"). - // Always present. - ServiceName string `json:"serviceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierName") 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. "CarrierName") 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 PickupServicesPickupService) MarshalJSON() ([]byte, error) { - type NoMethod PickupServicesPickupService - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 PosCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod PosCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // Inventory: The inventory to submit. This should be set only if the method is - // `inventory`. - Inventory *PosInventory `json:"inventory,omitempty"` - // MerchantId: The ID of the POS data provider. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "delete" - - // "get" - "insert" - "inventory" - "sale" - Method string `json:"method,omitempty"` - // Sale: The sale information to submit. This should be set only if the method - // is `sale`. - Sale *PosSale `json:"sale,omitempty"` - // Store: The store information to submit. This should be set only if the - // method is `insert`. - Store *PosStore `json:"store,omitempty"` - // StoreCode: The store code. This should be set only if the method is `delete` - // or `get`. - StoreCode string `json:"storeCode,omitempty"` - // TargetMerchantId: The ID of the account for which to get/submit data. - TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod PosCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 PosCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod PosCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. - Errors *Errors `json:"errors,omitempty"` - // Inventory: The updated inventory information. - Inventory *PosInventory `json:"inventory,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // Sale: The updated sale information. - Sale *PosSale `json:"sale,omitempty"` - // Store: The retrieved or updated store information. - Store *PosStore `json:"store,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod PosCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosDataProviders struct { - // Country: Country code. - Country string `json:"country,omitempty"` - // PosDataProviders: A list of POS data providers. - PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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 PosDataProviders) MarshalJSON() ([]byte, error) { - type NoMethod PosDataProviders - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosDataProvidersPosDataProvider struct { - // DisplayName: The display name of Pos data Provider. - DisplayName string `json:"displayName,omitempty"` - // FullName: The full name of this POS data Provider. - FullName string `json:"fullName,omitempty"` - // ProviderId: The ID of the account. - ProviderId uint64 `json:"providerId,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) { - type NoMethod PosDataProvidersPosDataProvider - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PosInventory: The absolute quantity of an item available at the given store. -type PosInventory struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posInventory" - Kind string `json:"kind,omitempty"` - // PickupMethod: Optional. Supported pickup method for this offer. Unless the - // value is "not supported", this field must be submitted together with - // `pickupSla`. For accepted attribute values, see the local product inventory - // feed specification (https://support.google.com/merchants/answer/3061342). - PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Optional. Expected date that an order will be ready for pickup - // relative to the order date. Must be submitted together with `pickupMethod`. - // For accepted attribute values, see the local product inventory feed - // specification (https://support.google.com/merchants/answer/3061342). - PickupSla string `json:"pickupSla,omitempty"` - // Price: Required. The current price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The available quantity of the item. - Quantity int64 `json:"quantity,omitempty,string"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "ContentLanguage") 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 PosInventory) MarshalJSON() ([]byte, error) { - type NoMethod PosInventory - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosInventoryRequest struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // PickupMethod: Optional. Supported pickup method for this offer. Unless the - // value is "not supported", this field must be submitted together with - // `pickupSla`. For accepted attribute values, see the local product inventory - // feed specification (https://support.google.com/merchants/answer/3061342). - PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Optional. Expected date that an order will be ready for pickup - // relative to the order date. Must be submitted together with `pickupMethod`. - // For accepted attribute values, see the local product inventory feed - // specification (https://support.google.com/merchants/answer/3061342). - PickupSla string `json:"pickupSla,omitempty"` - // Price: Required. The current price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The available quantity of the item. - Quantity int64 `json:"quantity,omitempty,string"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "ContentLanguage") 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 PosInventoryRequest) MarshalJSON() ([]byte, error) { - type NoMethod PosInventoryRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosInventoryResponse struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posInventoryResponse". - Kind string `json:"kind,omitempty"` - // PickupMethod: Optional. Supported pickup method for this offer. Unless the - // value is "not supported", this field must be submitted together with - // `pickupSla`. For accepted attribute values, see the local product inventory - // feed specification (https://support.google.com/merchants/answer/3061342). - PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Optional. Expected date that an order will be ready for pickup - // relative to the order date. Must be submitted together with `pickupMethod`. - // For accepted attribute values, see the local product inventory feed - // specification (https://support.google.com/merchants/answer/3061342). - PickupSla string `json:"pickupSla,omitempty"` - // Price: Required. The current price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The available quantity of the item. - Quantity int64 `json:"quantity,omitempty,string"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "ContentLanguage") 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 PosInventoryResponse) MarshalJSON() ([]byte, error) { - type NoMethod PosInventoryResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posListResponse". - Kind string `json:"kind,omitempty"` - Resources []*PosStore `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 PosListResponse) MarshalJSON() ([]byte, error) { - type NoMethod PosListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PosSale: The change of the available quantity of an item at the given store. -type PosSale struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posSale" - Kind string `json:"kind,omitempty"` - // Price: Required. The price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The relative change of the available quantity. Negative - // for items returned. - Quantity int64 `json:"quantity,omitempty,string"` - // SaleId: A unique ID to group items from the same sale event. - SaleId string `json:"saleId,omitempty"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "ContentLanguage") 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 PosSale) MarshalJSON() ([]byte, error) { - type NoMethod PosSale - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosSaleRequest struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Price: Required. The price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The relative change of the available quantity. Negative - // for items returned. - Quantity int64 `json:"quantity,omitempty,string"` - // SaleId: A unique ID to group items from the same sale event. - SaleId string `json:"saleId,omitempty"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "ContentLanguage") 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 PosSaleRequest) MarshalJSON() ([]byte, error) { - type NoMethod PosSaleRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PosSaleResponse struct { - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // Gtin: Global Trade Item Number. - Gtin string `json:"gtin,omitempty"` - // ItemId: Required. A unique identifier for the item. - ItemId string `json:"itemId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posSaleResponse". - Kind string `json:"kind,omitempty"` - // Price: Required. The price of the item. - Price *Price `json:"price,omitempty"` - // Quantity: Required. The relative change of the available quantity. Negative - // for items returned. - Quantity int64 `json:"quantity,omitempty,string"` - // SaleId: A unique ID to group items from the same sale event. - SaleId string `json:"saleId,omitempty"` - // StoreCode: Required. The identifier of the merchant's store. Either a - // `storeCode` inserted through the API or the code of the store in a Business - // Profile. - StoreCode string `json:"storeCode,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item. - TargetCountry string `json:"targetCountry,omitempty"` - // Timestamp: Required. The inventory timestamp, in ISO 8601 format. - Timestamp string `json:"timestamp,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ContentLanguage") 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. "ContentLanguage") 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 PosSaleResponse) MarshalJSON() ([]byte, error) { - type NoMethod PosSaleResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PosStore: Store resource. -type PosStore struct { - // GcidCategory: The business type of the store. - GcidCategory []string `json:"gcidCategory,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#posStore" - Kind string `json:"kind,omitempty"` - // MatchingStatus: Output only. The matching status of POS store and Google - // Business Profile store. Possible values are: - "matched": The POS store is - // successfully matched with the Google Business Profile store. - "failed": - // The POS store is not matched with the Google Business Profile store. See - // matching_status_hint for further details. Note that there is up to 48 hours - // propagation delay for changes in Merchant Center (e.g. creation of new - // account, accounts linking) and Google Business Profile (e.g. store address - // update) which may affect the matching status. In such cases, after a delay - // call pos.list - // (https://developers.google.com/shopping-content/reference/rest/v2.1/pos/list) - // to retrieve the updated matching status. - MatchingStatus string `json:"matchingStatus,omitempty"` - // MatchingStatusHint: Output only. The hint of why the matching has failed. - // This is only set when matching_status=failed. Possible values are: - - // "linked-store-not-found": There aren't any Google Business Profile stores - // available for matching. Connect your Merchant Center account with the Google - // Business Profile account. Or add a new Google Business Profile store - // corresponding to the POS store. - "store-match-not-found": The provided - // POS store couldn't be matched to any of the connected Google Business - // Profile stores. Merchant Center account is connected correctly and stores - // are available on Google Business Profile, but POS store location address - // does not match with Google Business Profile stores' addresses. Update POS - // store address or Google Business Profile store address to match correctly. - - // "store-match-unverified": The provided POS store couldn't be matched to - // any of the connected Google Business Profile stores, as the matched Google - // Business Profile store is unverified. Go through the Google Business Profile - // verification process to match correctly. - MatchingStatusHint string `json:"matchingStatusHint,omitempty"` - // PhoneNumber: The store phone number. - PhoneNumber string `json:"phoneNumber,omitempty"` - // PlaceId: The Google Place Id of the store location. - PlaceId string `json:"placeId,omitempty"` - // StoreAddress: Required. The street address of the store. - StoreAddress string `json:"storeAddress,omitempty"` - // StoreCode: Required. A store identifier that is unique for the given - // merchant. - StoreCode string `json:"storeCode,omitempty"` - // StoreName: The merchant or store name. - StoreName string `json:"storeName,omitempty"` - // WebsiteUrl: The website url for the store or merchant. - WebsiteUrl string `json:"websiteUrl,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "GcidCategory") 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. "GcidCategory") 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 PosStore) MarshalJSON() ([]byte, error) { - type NoMethod PosStore - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PostalCodeGroup struct { - // Country: The CLDR territory code of the country the postal code group - // applies to. Required. - Country string `json:"country,omitempty"` - // Name: The name of the postal code group, referred to in headers. Required. - Name string `json:"name,omitempty"` - // PostalCodeRanges: A range of postal codes. Required. - PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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 PostalCodeGroup) MarshalJSON() ([]byte, error) { - type NoMethod PostalCodeGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PostalCodeRange struct { - // PostalCodeRangeBegin: A postal code or a pattern of the form `prefix*` - // denoting the inclusive lower bound of the range defining the area. Examples - // values: "94108", "9410*", "9*". Required. - PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"` - // PostalCodeRangeEnd: A postal code or a pattern of the form `prefix*` - // denoting the inclusive upper bound of the range defining the area. It must - // have the same length as `postalCodeRangeBegin`: if `postalCodeRangeBegin` is - // a postal code then `postalCodeRangeEnd` must be a postal code too; if - // `postalCodeRangeBegin` is a pattern then `postalCodeRangeEnd` must be a - // pattern with the same prefix length. Optional: if not set, then the area is - // defined as being all the postal codes matching `postalCodeRangeBegin`. - PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostalCodeRangeBegin") 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. "PostalCodeRangeBegin") 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 PostalCodeRange) MarshalJSON() ([]byte, error) { - type NoMethod PostalCodeRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Price struct { - // Currency: The currency of the price. - Currency string `json:"currency,omitempty"` - // Value: The price represented as a number. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Currency") 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. "Currency") 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 Price) MarshalJSON() ([]byte, error) { - type NoMethod Price - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PriceAmount: The price represented as a number and currency. -type PriceAmount struct { - // Currency: The currency of the price. - Currency string `json:"currency,omitempty"` - // Value: The price represented as a number. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Currency") 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. "Currency") 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 PriceAmount) MarshalJSON() ([]byte, error) { - type NoMethod PriceAmount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PriceCompetitiveness: Price competitiveness fields requested by the merchant -// in the query. Field values are only set if the merchant queries -// `PriceCompetitivenessProductView`. -// https://support.google.com/merchants/answer/9626903 -type PriceCompetitiveness struct { - // BenchmarkPriceCurrencyCode: The price benchmark currency (ISO 4217 code). - BenchmarkPriceCurrencyCode string `json:"benchmarkPriceCurrencyCode,omitempty"` - // BenchmarkPriceMicros: The latest available price benchmark in micros (1 - // millionth of a standard unit, 1 USD = 1000000 micros) for the product's - // catalog in the benchmark country. - BenchmarkPriceMicros int64 `json:"benchmarkPriceMicros,omitempty,string"` - // CountryCode: The country of the price benchmark (ISO 3166 code). - CountryCode string `json:"countryCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "BenchmarkPriceCurrencyCode") - // 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. "BenchmarkPriceCurrencyCode") 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 PriceCompetitiveness) MarshalJSON() ([]byte, error) { - type NoMethod PriceCompetitiveness - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PriceInsights: Price insights fields requested by the merchant in the query. -// Field values are only set if the merchant queries -// `PriceInsightsProductView`. -// https://support.google.com/merchants/answer/11916926 -type PriceInsights struct { - // Effectiveness: The predicted effectiveness of applying the price suggestion, - // bucketed. - // - // Possible values: - // "EFFECTIVENESS_UNSPECIFIED" - Effectiveness is unknown. - // "LOW" - Effectiveness is low. - // "MEDIUM" - Effectiveness is medium. - // "HIGH" - Effectiveness is high. - Effectiveness string `json:"effectiveness,omitempty"` - // PredictedClicksChangeFraction: The predicted change in clicks as a fraction - // after introducing the suggested price compared to current active price. For - // example, 0.05 is a 5% predicted increase in clicks. - PredictedClicksChangeFraction float64 `json:"predictedClicksChangeFraction,omitempty"` - // PredictedConversionsChangeFraction: The predicted change in conversions as a - // fraction after introducing the suggested price compared to current active - // price. For example, 0.05 is a 5% predicted increase in conversions). - PredictedConversionsChangeFraction float64 `json:"predictedConversionsChangeFraction,omitempty"` - // PredictedGrossProfitChangeFraction: *Deprecated*: This field is no longer - // supported and will start returning 0. The predicted change in gross profit - // as a fraction after introducing the suggested price compared to current - // active price. For example, 0.05 is a 5% predicted increase in gross profit. - PredictedGrossProfitChangeFraction float64 `json:"predictedGrossProfitChangeFraction,omitempty"` - // PredictedImpressionsChangeFraction: The predicted change in impressions as a - // fraction after introducing the suggested price compared to current active - // price. For example, 0.05 is a 5% predicted increase in impressions. - PredictedImpressionsChangeFraction float64 `json:"predictedImpressionsChangeFraction,omitempty"` - // PredictedMonthlyGrossProfitChangeCurrencyCode: *Deprecated*: This field is - // no longer supported and will start returning USD for all requests. The - // predicted monthly gross profit change currency (ISO 4217 code). - PredictedMonthlyGrossProfitChangeCurrencyCode string `json:"predictedMonthlyGrossProfitChangeCurrencyCode,omitempty"` - // PredictedMonthlyGrossProfitChangeMicros: *Deprecated*: This field is no - // longer supported and will start returning 0. The predicted change in gross - // profit in micros (1 millionth of a standard unit, 1 USD = 1000000 micros) - // after introducing the suggested price for a month compared to current active - // price. - PredictedMonthlyGrossProfitChangeMicros int64 `json:"predictedMonthlyGrossProfitChangeMicros,omitempty,string"` - // SuggestedPriceCurrencyCode: The suggested price currency (ISO 4217 code). - SuggestedPriceCurrencyCode string `json:"suggestedPriceCurrencyCode,omitempty"` - // SuggestedPriceMicros: The latest suggested price in micros (1 millionth of a - // standard unit, 1 USD = 1000000 micros) for the product. - SuggestedPriceMicros int64 `json:"suggestedPriceMicros,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Effectiveness") 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. "Effectiveness") 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 PriceInsights) MarshalJSON() ([]byte, error) { - type NoMethod PriceInsights - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *PriceInsights) UnmarshalJSON(data []byte) error { - type NoMethod PriceInsights - var s1 struct { - PredictedClicksChangeFraction gensupport.JSONFloat64 `json:"predictedClicksChangeFraction"` - PredictedConversionsChangeFraction gensupport.JSONFloat64 `json:"predictedConversionsChangeFraction"` - PredictedGrossProfitChangeFraction gensupport.JSONFloat64 `json:"predictedGrossProfitChangeFraction"` - PredictedImpressionsChangeFraction gensupport.JSONFloat64 `json:"predictedImpressionsChangeFraction"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.PredictedClicksChangeFraction = float64(s1.PredictedClicksChangeFraction) - s.PredictedConversionsChangeFraction = float64(s1.PredictedConversionsChangeFraction) - s.PredictedGrossProfitChangeFraction = float64(s1.PredictedGrossProfitChangeFraction) - s.PredictedImpressionsChangeFraction = float64(s1.PredictedImpressionsChangeFraction) - return nil -} - -// Product: Required product attributes are primarily defined by the product -// data specification. See the Product Data Specification Help Center article -// for information. Product data. After inserting, updating, or deleting a -// product, it may take several minutes before changes take effect. -type Product struct { - // AdditionalImageLinks: Additional URLs of images of the item. - AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"` - // AdditionalSizeType: Additional cut of the item. Used together with size_type - // to represent combined size types for apparel items. - AdditionalSizeType string `json:"additionalSizeType,omitempty"` - // AdsGrouping: Used to group items in an arbitrary way. Only for CPA%, - // discouraged otherwise. - AdsGrouping string `json:"adsGrouping,omitempty"` - // AdsLabels: Similar to ads_grouping, but only works on CPC. - AdsLabels []string `json:"adsLabels,omitempty"` - // AdsRedirect: Allows advertisers to override the item URL when the product is - // shown within the context of Product Ads. - AdsRedirect string `json:"adsRedirect,omitempty"` - // Adult: Should be set to true if the item is targeted towards adults. - Adult bool `json:"adult,omitempty"` - // AgeGroup: Target age group of the item. - AgeGroup string `json:"ageGroup,omitempty"` - // AutoPricingMinPrice: A safeguard in the Automated Discounts - // (//support.google.com/merchants/answer/10295759) and Dynamic Promotions - // (//support.google.com/merchants/answer/13949249) projects, ensuring that - // discounts on merchants' offers do not fall below this value, thereby - // preserving the offer's value and profitability. - AutoPricingMinPrice *Price `json:"autoPricingMinPrice,omitempty"` - // Availability: Availability status of the item. - Availability string `json:"availability,omitempty"` - // AvailabilityDate: The day a pre-ordered product becomes available for - // delivery, in ISO 8601 format. - AvailabilityDate string `json:"availabilityDate,omitempty"` - // Brand: Brand of the item. - Brand string `json:"brand,omitempty"` - // CanonicalLink: URL for the canonical version of your item's landing page. - CanonicalLink string `json:"canonicalLink,omitempty"` - // Certifications: Product certification - // (https://support.google.com/merchants/answer/13528839), introduced for EU - // energy efficiency labeling compliance using the EU EPREL - // (https://eprel.ec.europa.eu/screen/home) database. - Certifications []*ProductCertification `json:"certifications,omitempty"` - // Channel: Required. The item's channel (online or local). Acceptable values - // are: - "local" - "online" - Channel string `json:"channel,omitempty"` - // CloudExportAdditionalProperties: Extra fields to export to the Cloud Retail - // program. - CloudExportAdditionalProperties []*CloudExportAdditionalProperties `json:"cloudExportAdditionalProperties,omitempty"` - // Color: Color of the item. - Color string `json:"color,omitempty"` - // Condition: Condition or state of the item. - Condition string `json:"condition,omitempty"` - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. - ContentLanguage string `json:"contentLanguage,omitempty"` - // CostOfGoodsSold: Cost of goods sold. Used for gross profit reporting. - CostOfGoodsSold *Price `json:"costOfGoodsSold,omitempty"` - // CustomAttributes: A list of custom (merchant-provided) attributes. It can - // also be used for submitting any attribute of the feed specification in its - // generic form (for example, `{ "name": "size type", "value": "regular" }`). - // This is useful for submitting attributes not explicitly exposed by the API, - // such as additional attributes used for Buy on Google (formerly known as - // Shopping Actions). - CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` - // CustomLabel0: Custom label 0 for custom grouping of items in a Shopping - // campaign. - CustomLabel0 string `json:"customLabel0,omitempty"` - // CustomLabel1: Custom label 1 for custom grouping of items in a Shopping - // campaign. - CustomLabel1 string `json:"customLabel1,omitempty"` - // CustomLabel2: Custom label 2 for custom grouping of items in a Shopping - // campaign. - CustomLabel2 string `json:"customLabel2,omitempty"` - // CustomLabel3: Custom label 3 for custom grouping of items in a Shopping - // campaign. - CustomLabel3 string `json:"customLabel3,omitempty"` - // CustomLabel4: Custom label 4 for custom grouping of items in a Shopping - // campaign. - CustomLabel4 string `json:"customLabel4,omitempty"` - // Description: Description of the item. - Description string `json:"description,omitempty"` - // DisclosureDate: The date time when an offer becomes visible in search - // results across Google’s YouTube surfaces, in ISO 8601 - // (http://en.wikipedia.org/wiki/ISO_8601) format. See Disclosure date - // (https://support.google.com/merchants/answer/13034208) for more information. - DisclosureDate string `json:"disclosureDate,omitempty"` - // DisplayAdsId: An identifier for an item for dynamic remarketing campaigns. - DisplayAdsId string `json:"displayAdsId,omitempty"` - // DisplayAdsLink: URL directly to your item's landing page for dynamic - // remarketing campaigns. - DisplayAdsLink string `json:"displayAdsLink,omitempty"` - // DisplayAdsSimilarIds: Advertiser-specified recommendations. - DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"` - // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns. - DisplayAdsTitle string `json:"displayAdsTitle,omitempty"` - // DisplayAdsValue: Offer margin for dynamic remarketing campaigns. - DisplayAdsValue float64 `json:"displayAdsValue,omitempty"` - // EnergyEfficiencyClass: The energy efficiency class as defined in EU - // directive 2010/30/EU. - EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"` - // ExcludedDestinations: The list of destinations to exclude - // (//support.google.com/merchants/answer/6324486) for this target (corresponds - // to cleared check boxes in Merchant Center). Products that are excluded from - // all destinations for more than 7 days are automatically deleted. - ExcludedDestinations []string `json:"excludedDestinations,omitempty"` - // ExpirationDate: Date on which the item should expire, as specified upon - // insertion, in ISO 8601 format. The actual expiration date in Google Shopping - // is exposed in `productstatuses` as `googleExpirationDate` and might be - // earlier if `expirationDate` is too far in the future. - ExpirationDate string `json:"expirationDate,omitempty"` - // ExternalSellerId: Required for multi-seller accounts. Use this attribute if - // you're a marketplace uploading products for various sellers to your - // multi-seller account. - ExternalSellerId string `json:"externalSellerId,omitempty"` - // FeedLabel: Feed label for the item. Either `targetCountry` or `feedLabel` is - // required. Must be less than or equal to 20 uppercase letters (A-Z), numbers - // (0-9), and dashes (-). - FeedLabel string `json:"feedLabel,omitempty"` - // FreeShippingThreshold: Optional. Conditions to be met for a product to have - // free shipping. - FreeShippingThreshold []*FreeShippingThreshold `json:"freeShippingThreshold,omitempty"` - // Gender: Target gender of the item. - Gender string `json:"gender,omitempty"` - // GoogleProductCategory: Google's category of the item (see Google product - // taxonomy (https://support.google.com/merchants/answer/1705911)). When - // querying products, this field will contain the user provided value. There is - // currently no way to get back the auto assigned google product categories - // through the API. - GoogleProductCategory string `json:"googleProductCategory,omitempty"` - // Gtin: Global Trade Item Number (GTIN) of the item. - Gtin string `json:"gtin,omitempty"` - // Id: The REST ID of the product. Content API methods that operate on products - // take this as their `productId` parameter. The REST ID for a product has one - // of the 2 forms channel:contentLanguage: targetCountry: offerId or - // channel:contentLanguage:feedLabel: offerId. - Id string `json:"id,omitempty"` - // IdentifierExists: False when the item does not have unique product - // identifiers appropriate to its category, such as GTIN, MPN, and brand. - // Required according to the Unique Product Identifier Rules for all target - // countries except for Canada. - IdentifierExists bool `json:"identifierExists,omitempty"` - // ImageLink: URL of an image of the item. - ImageLink string `json:"imageLink,omitempty"` - // IncludedDestinations: The list of destinations to include - // (//support.google.com/merchants/answer/7501026) for this target (corresponds - // to checked check boxes in Merchant Center). Default destinations are always - // included unless provided in `excludedDestinations`. - IncludedDestinations []string `json:"includedDestinations,omitempty"` - // Installment: Number and amount of installments to pay for an item. - Installment *Installment `json:"installment,omitempty"` - // IsBundle: Whether the item is a merchant-defined bundle. A bundle is a - // custom grouping of different products sold by a merchant for a single price. - IsBundle bool `json:"isBundle,omitempty"` - // ItemGroupId: Shared identifier for all variants of the same product. - ItemGroupId string `json:"itemGroupId,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#product" - Kind string `json:"kind,omitempty"` - // LifestyleImageLinks: Additional URLs of lifestyle images of the item. Used - // to explicitly identify images that showcase your item in a real-world - // context. See the Help Center article for more information. - LifestyleImageLinks []string `json:"lifestyleImageLinks,omitempty"` - // Link: URL directly linking to your item's page on your website. - Link string `json:"link,omitempty"` - // LinkTemplate: URL template for merchant hosted local storefront. - LinkTemplate string `json:"linkTemplate,omitempty"` - // LoyaltyProgram: Loyalty program information that is used to surface loyalty - // benefits ( for example, better pricing, points, etc) to the user of this - // item. This signular field points to the latest uploaded loyalty program - // info. This field will be deprecated in the coming weeks and should not be - // used in favor of the plural 'LoyaltyProgram' field below. - LoyaltyProgram *LoyaltyProgram `json:"loyaltyProgram,omitempty"` - // LoyaltyPrograms: Optional. A list of loyalty program information that is - // used to surface loyalty benefits (for example, better pricing, points, etc) - // to the user of this item. - LoyaltyPrograms []*LoyaltyProgram `json:"loyaltyPrograms,omitempty"` - // Material: The material of which the item is made. - Material string `json:"material,omitempty"` - // MaxEnergyEfficiencyClass: The energy efficiency class as defined in EU - // directive 2010/30/EU. - MaxEnergyEfficiencyClass string `json:"maxEnergyEfficiencyClass,omitempty"` - // MaxHandlingTime: Maximal product handling time (in business days). - MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` - // MinEnergyEfficiencyClass: The energy efficiency class as defined in EU - // directive 2010/30/EU. - MinEnergyEfficiencyClass string `json:"minEnergyEfficiencyClass,omitempty"` - // MinHandlingTime: Minimal product handling time (in business days). - MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` - // MobileLink: URL for the mobile-optimized version of your item's landing - // page. - MobileLink string `json:"mobileLink,omitempty"` - // MobileLinkTemplate: URL template for merchant hosted local storefront - // optimized for mobile devices. - MobileLinkTemplate string `json:"mobileLinkTemplate,omitempty"` - // Mpn: Manufacturer Part Number (MPN) of the item. - Mpn string `json:"mpn,omitempty"` - // Multipack: The number of identical products in a merchant-defined multipack. - Multipack int64 `json:"multipack,omitempty,string"` - // OfferId: Required. A unique identifier for the item. Leading and trailing - // whitespaces are stripped and multiple whitespaces are replaced by a single - // whitespace upon submission. Only valid unicode characters are accepted. See - // the products feed specification for details. *Note:* Content API methods - // that operate on products take the REST ID of the product, *not* this - // identifier. - OfferId string `json:"offerId,omitempty"` - // Pattern: The item's pattern (for example, polka dots). - Pattern string `json:"pattern,omitempty"` - // Pause: Publication of this item should be temporarily paused. Acceptable - // values are: - "ads" - Pause string `json:"pause,omitempty"` - // PickupMethod: The pick up option for the item. Acceptable values are: - - // "buy" - "reserve" - "ship to store" - "not supported" - PickupMethod string `json:"pickupMethod,omitempty"` - // PickupSla: Item store pickup timeline. Acceptable values are: - "same day" - // - "next day" - "2-day" - "3-day" - "4-day" - "5-day" - "6-day" - - // "7-day" - "multi-week" - PickupSla string `json:"pickupSla,omitempty"` - // Price: Price of the item. - Price *Price `json:"price,omitempty"` - // ProductDetails: Technical specification or additional product details. - ProductDetails []*ProductProductDetail `json:"productDetails,omitempty"` - // ProductHeight: The height of the product in the units provided. The value - // must be between 0 (exclusive) and 3000 (inclusive). - ProductHeight *ProductDimension `json:"productHeight,omitempty"` - // ProductHighlights: Bullet points describing the most relevant highlights of - // a product. - ProductHighlights []string `json:"productHighlights,omitempty"` - // ProductLength: The length of the product in the units provided. The value - // must be between 0 (exclusive) and 3000 (inclusive). - ProductLength *ProductDimension `json:"productLength,omitempty"` - // ProductTypes: Categories of the item (formatted as in product data - // specification). - ProductTypes []string `json:"productTypes,omitempty"` - // ProductWeight: The weight of the product in the units provided. The value - // must be between 0 (exclusive) and 2000 (inclusive). - ProductWeight *ProductWeight `json:"productWeight,omitempty"` - // ProductWidth: The width of the product in the units provided. The value must - // be between 0 (exclusive) and 3000 (inclusive). - ProductWidth *ProductDimension `json:"productWidth,omitempty"` - // PromotionIds: The unique ID of a promotion. - PromotionIds []string `json:"promotionIds,omitempty"` - // SalePrice: Advertised sale price of the item. - SalePrice *Price `json:"salePrice,omitempty"` - // SalePriceEffectiveDate: Date range during which the item is on sale (see - // product data specification ). - SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` - // SellOnGoogleQuantity: The quantity of the product that is available for - // selling on Google. Supported only for online products. - SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"` - // Shipping: Shipping rules. - Shipping []*ProductShipping `json:"shipping,omitempty"` - // ShippingHeight: Height of the item for shipping. - ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"` - // ShippingLabel: The shipping label of the product, used to group product in - // account-level shipping rules. - ShippingLabel string `json:"shippingLabel,omitempty"` - // ShippingLength: Length of the item for shipping. - ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"` - // ShippingWeight: Weight of the item for shipping. - ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"` - // ShippingWidth: Width of the item for shipping. - ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"` - // ShoppingAdsExcludedCountries: List of country codes (ISO 3166-1 alpha-2) to - // exclude the offer from Shopping Ads destination. Countries from this list - // are removed from countries configured in MC feed settings. - ShoppingAdsExcludedCountries []string `json:"shoppingAdsExcludedCountries,omitempty"` - // SizeSystem: System in which the size is specified. Recommended for apparel - // items. - SizeSystem string `json:"sizeSystem,omitempty"` - // SizeType: The cut of the item. Recommended for apparel items. - SizeType string `json:"sizeType,omitempty"` - // Sizes: Size of the item. Only one value is allowed. For variants with - // different sizes, insert a separate product for each size with the same - // `itemGroupId` value (see size definition). - Sizes []string `json:"sizes,omitempty"` - // Source: Output only. The source of the offer, that is, how the offer was - // created. Acceptable values are: - "api" - "crawl" - "feed" - Source string `json:"source,omitempty"` - // StructuredDescription: Structured description, for algorithmically - // (AI)-generated descriptions. - StructuredDescription *ProductStructuredDescription `json:"structuredDescription,omitempty"` - // StructuredTitle: Structured title, for algorithmically (AI)-generated - // titles. - StructuredTitle *ProductStructuredTitle `json:"structuredTitle,omitempty"` - // SubscriptionCost: Number of periods (months or years) and amount of payment - // per period for an item with an associated subscription contract. - SubscriptionCost *ProductSubscriptionCost `json:"subscriptionCost,omitempty"` - // TargetCountry: Required. The CLDR territory code for the item's country of - // sale. - TargetCountry string `json:"targetCountry,omitempty"` - // TaxCategory: The tax category of the product, used to configure detailed tax - // nexus in account-level tax settings. - TaxCategory string `json:"taxCategory,omitempty"` - // Taxes: Tax information. - Taxes []*ProductTax `json:"taxes,omitempty"` - // Title: Title of the item. - Title string `json:"title,omitempty"` - // TransitTimeLabel: The transit time label of the product, used to group - // product in account-level transit time tables. - TransitTimeLabel string `json:"transitTimeLabel,omitempty"` - // UnitPricingBaseMeasure: The preference of the denominator of the unit price. - UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"` - // UnitPricingMeasure: The measure and dimension of an item. - UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"` - // VirtualModelLink: URL of the 3D model of the item to provide more visuals. - VirtualModelLink string `json:"virtualModelLink,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AdditionalImageLinks") 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. "AdditionalImageLinks") 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 Product) MarshalJSON() ([]byte, error) { - type NoMethod Product - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *Product) UnmarshalJSON(data []byte) error { - type NoMethod Product - var s1 struct { - DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DisplayAdsValue = float64(s1.DisplayAdsValue) - return nil -} - -type ProductAmount struct { - // PriceAmount: The pre-tax or post-tax price depending on the location of the - // order. - PriceAmount *Price `json:"priceAmount,omitempty"` - // RemittedTaxAmount: Remitted tax value. - RemittedTaxAmount *Price `json:"remittedTaxAmount,omitempty"` - // TaxAmount: Tax value. - TaxAmount *Price `json:"taxAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "PriceAmount") 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. "PriceAmount") 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 ProductAmount) MarshalJSON() ([]byte, error) { - type NoMethod ProductAmount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductCertification: Product certification -// (https://support.google.com/merchants/answer/13528839), introduced for EU -// energy efficiency labeling compliance using the EU EPREL -// (https://eprel.ec.europa.eu/screen/home) database. -type ProductCertification struct { - // CertificationAuthority: The certification authority, for example - // "European_Commission". Maximum length is 2000 characters. - CertificationAuthority string `json:"certificationAuthority,omitempty"` - // CertificationCode: The certification code, for eaxample "123456". Maximum - // length is 2000 characters. - CertificationCode string `json:"certificationCode,omitempty"` - // CertificationName: The name of the certification, for example "EPREL". - // Maximum length is 2000 characters. - CertificationName string `json:"certificationName,omitempty"` - // CertificationValue: The certification value (also known as class, level or - // grade), for example "A+", "C", "gold". Maximum length is 2000 characters. - CertificationValue string `json:"certificationValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "CertificationAuthority") 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. "CertificationAuthority") 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 ProductCertification) MarshalJSON() ([]byte, error) { - type NoMethod ProductCertification - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductCluster: Product cluster fields. A product cluster is a grouping for -// different offers that represent the same product. Values are only set for -// fields requested explicitly in the request's search query. -type ProductCluster struct { - // Brand: Brand of the product cluster. - Brand string `json:"brand,omitempty"` - // BrandInventoryStatus: Tells if there is at least one product of the brand - // currently `IN_STOCK` in your product feed across multiple countries, all - // products are `OUT_OF_STOCK` in your product feed, or `NOT_IN_INVENTORY`. The - // field doesn't take the Best Sellers report country filter into account. - // - // Possible values: - // "INVENTORY_STATUS_UNSPECIFIED" - Inventory status is unknown. - // "IN_STOCK" - Merchant has a product for this product cluster or brand in - // stock. - // "OUT_OF_STOCK" - Merchant has a product for this product cluster or brand - // in inventory but it is currently out of stock. - // "NOT_IN_INVENTORY" - Merchant does not have a product for this product - // cluster or brand in inventory. - BrandInventoryStatus string `json:"brandInventoryStatus,omitempty"` - // CategoryL1: Product category (1st level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL1 string `json:"categoryL1,omitempty"` - // CategoryL2: Product category (2nd level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL2 string `json:"categoryL2,omitempty"` - // CategoryL3: Product category (3rd level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL3 string `json:"categoryL3,omitempty"` - // CategoryL4: Product category (4th level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL4 string `json:"categoryL4,omitempty"` - // CategoryL5: Product category (5th level) of the product cluster, represented - // in Google's product taxonomy. - CategoryL5 string `json:"categoryL5,omitempty"` - // InventoryStatus: Tells whether the product cluster is `IN_STOCK` in your - // product feed across multiple countries, `OUT_OF_STOCK` in your product feed, - // or `NOT_IN_INVENTORY` at all. The field doesn't take the Best Sellers report - // country filter into account. - // - // Possible values: - // "INVENTORY_STATUS_UNSPECIFIED" - Inventory status is unknown. - // "IN_STOCK" - Merchant has a product for this product cluster or brand in - // stock. - // "OUT_OF_STOCK" - Merchant has a product for this product cluster or brand - // in inventory but it is currently out of stock. - // "NOT_IN_INVENTORY" - Merchant does not have a product for this product - // cluster or brand in inventory. - InventoryStatus string `json:"inventoryStatus,omitempty"` - // Title: Title of the product cluster. - Title string `json:"title,omitempty"` - // VariantGtins: GTINs of example variants of the product cluster. - VariantGtins []string `json:"variantGtins,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") 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 ProductCluster) MarshalJSON() ([]byte, error) { - type NoMethod ProductCluster - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductDeliveryTime: The estimated days to deliver a product after an order -// is placed. Only authorized shipping signals partners working with a merchant -// can use this resource. Merchants should use the `products` -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#productshipping) -// resource instead. -type ProductDeliveryTime struct { - // AreaDeliveryTimes: Required. A set of associations between `DeliveryArea` - // and `DeliveryTime` entries. The total number of `areaDeliveryTimes` can be - // at most 100. - AreaDeliveryTimes []*ProductDeliveryTimeAreaDeliveryTime `json:"areaDeliveryTimes,omitempty"` - // ProductId: Required. The `id` of the product. - ProductId *ProductId `json:"productId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AreaDeliveryTimes") 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. "AreaDeliveryTimes") 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 ProductDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod ProductDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductDeliveryTimeAreaDeliveryTime: A pairing of `DeliveryArea` associated -// with a `DeliveryTime` for this product. -type ProductDeliveryTimeAreaDeliveryTime struct { - // DeliveryArea: Required. The delivery area associated with `deliveryTime` for - // this product. - DeliveryArea *DeliveryArea `json:"deliveryArea,omitempty"` - // DeliveryTime: Required. The delivery time associated with `deliveryArea` for - // this product. - DeliveryTime *ProductDeliveryTimeAreaDeliveryTimeDeliveryTime `json:"deliveryTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeliveryArea") 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. "DeliveryArea") 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 ProductDeliveryTimeAreaDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod ProductDeliveryTimeAreaDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductDeliveryTimeAreaDeliveryTimeDeliveryTime: A delivery time for this -// product. -type ProductDeliveryTimeAreaDeliveryTimeDeliveryTime struct { - // MaxHandlingTimeDays: Required. The maximum number of business days - // (inclusive) between when an order is placed and when the product ships. If a - // product ships in the same day, set this value to 0. - MaxHandlingTimeDays int64 `json:"maxHandlingTimeDays,omitempty"` - // MaxTransitTimeDays: Required. The maximum number of business days - // (inclusive) between when the product ships and when the product is - // delivered. - MaxTransitTimeDays int64 `json:"maxTransitTimeDays,omitempty"` - // MinHandlingTimeDays: Required. The minimum number of business days - // (inclusive) between when an order is placed and when the product ships. If a - // product ships in the same day, set this value to 0. - MinHandlingTimeDays int64 `json:"minHandlingTimeDays,omitempty"` - // MinTransitTimeDays: Required. The minimum number of business days - // (inclusive) between when the product ships and when the product is - // delivered. - MinTransitTimeDays int64 `json:"minTransitTimeDays,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxHandlingTimeDays") 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. "MaxHandlingTimeDays") 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 ProductDeliveryTimeAreaDeliveryTimeDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod ProductDeliveryTimeAreaDeliveryTimeDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductDimension struct { - // Unit: Required. The length units. Acceptable values are: - "in" - "cm" - Unit string `json:"unit,omitempty"` - // Value: Required. The length value represented as a number. The value can - // have a maximum precision of four decimal places. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 ProductDimension) MarshalJSON() ([]byte, error) { - type NoMethod ProductDimension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductDimension) UnmarshalJSON(data []byte) error { - type NoMethod ProductDimension - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// ProductId: The Content API ID of the product. -type ProductId struct { - // ProductId: The Content API ID of the product, in the form - // `channel:contentLanguage:targetCountry:offerId`. - ProductId string `json:"productId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProductId") 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. "ProductId") 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 ProductId) MarshalJSON() ([]byte, error) { - type NoMethod ProductId - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductIssue: An issue affecting specific product. -type ProductIssue struct { - // Actions: A list of actionable steps that can be executed to solve the issue. - // An example is requesting a re-review or providing arguments when merchant - // disagrees with the issue. Actions that are supported in (your) third-party - // application can be rendered as buttons and should be available to merchant - // when they expand the issue. - Actions []*Action `json:"actions,omitempty"` - // Impact: Clarifies the severity of the issue. The summarizing message, if - // present, should be shown right under the title for each issue. It helps - // merchants to quickly understand the impact of the issue. The detailed - // breakdown helps the merchant to fully understand the impact of the issue. It - // can be rendered as dialog that opens when the merchant mouse over the - // summarized impact statement. Issues with different severity can be styled - // differently. They may use a different color or icon to signal the difference - // between `ERROR`, `WARNING` and `INFO`. - Impact *ProductIssueImpact `json:"impact,omitempty"` - // PrerenderedContent: Details of the issue as a pre-rendered HTML. HTML - // elements contain CSS classes that can be used to customize the style of the - // content. Always sanitize the HTML before embedding it directly to your - // application. The sanitizer needs to allow basic HTML tags, such as: `div`, - // `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use - // DOMPurify (https://www.npmjs.com/package/dompurify). CSS classes: * - // `issue-detail` - top level container for the detail of the issue * - // `callout-banners` - section of the `issue-detail` with callout banners * - // `callout-banner` - single callout banner, inside `callout-banners` * - // `callout-banner-info` - callout with important information (default) * - // `callout-banner-warning` - callout with a warning * `callout-banner-error` - - // callout informing about an error (most severe) * `issue-content` - section - // of the `issue-detail`, contains multiple `content-element` * - // `content-element` - content element such as a list, link or paragraph, - // inside `issue-content` * `root-causes` - unordered list with items - // describing root causes of the issue, inside `issue-content` * - // `root-causes-intro` - intro text before the `root-causes` list, inside - // `issue-content` * `segment` - section of the text, `span` inside paragraph * - // `segment-attribute` - section of the text that represents a product - // attribute, for example 'image\_link' * `segment-literal` - section of the - // text that contains a special value, for example '0-1000 kg' * `segment-bold` - // - section of the text that should be rendered as bold * `segment-italic` - - // section of the text that should be rendered as italic * `tooltip` - used on - // paragraphs that should be rendered with a tooltip. A section of the text in - // such a paragraph will have a class `tooltip-text` and is intended to be - // shown in a mouse over dialog. If the style is not used, the `tooltip-text` - // section would be shown on a new line, after the main part of the text. * - // `tooltip-text` - marks a section of the text within a `tooltip`, that is - // intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a - // section of the text within a `tooltip`, that can be replaced with a tooltip - // icon, for example '?' or 'i'. By default, this section contains a `br` tag, - // that is separating the main text and the tooltip text when the style is not - // used. * `tooltip-style-question` - the tooltip shows helpful information, - // can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds - // additional information fitting to the context, can use the 'i' as an icon. * - // `content-moderation` - marks the paragraph that explains how the issue was - // identified. * `list-intro` - marks the paragraph that contains an intro for - // a list. This paragraph will be always followed by a list. * `new-element` - - // Present for new elements added to the pre-rendered content in the future. To - // make sure that a new content element does not break your style, you can hide - // everything with this class. - PrerenderedContent string `json:"prerenderedContent,omitempty"` - // Title: Title of the issue. - Title string `json:"title,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 ProductIssue) MarshalJSON() ([]byte, error) { - type NoMethod ProductIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductIssueImpact: Overall impact of product issue. -type ProductIssueImpact struct { - // Breakdowns: Detailed impact breakdown. Explains the types of restriction the - // issue has in different shopping destinations and territory. If present, it - // should be rendered to the merchant. Can be shown as a mouse over dropdown or - // a dialog. Each breakdown item represents a group of regions with the same - // impact details. - Breakdowns []*Breakdown `json:"breakdowns,omitempty"` - // Message: Optional. Message summarizing the overall impact of the issue. If - // present, it should be rendered to the merchant. For example: "Limits - // visibility in France" - Message string `json:"message,omitempty"` - // Severity: The severity of the issue. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Default value. Will never be provided by the API. - // "ERROR" - Causes either an account suspension or an item disapproval. - // Errors should be resolved as soon as possible to ensure items are eligible - // to appear in results again. - // "WARNING" - Warnings can negatively impact the performance of ads and can - // lead to item or account suspensions in the future unless the issue is - // resolved. - // "INFO" - Infos are suggested optimizations to increase data quality. - // Resolving these issues is recommended, but not required. - Severity string `json:"severity,omitempty"` - // ForceSendFields is a list of field names (e.g. "Breakdowns") 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. "Breakdowns") 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 ProductIssueImpact) MarshalJSON() ([]byte, error) { - type NoMethod ProductIssueImpact - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductProductDetail struct { - // AttributeName: The name of the product detail. - AttributeName string `json:"attributeName,omitempty"` - // AttributeValue: The value of the product detail. - AttributeValue string `json:"attributeValue,omitempty"` - // SectionName: The section header used to group a set of product details. - SectionName string `json:"sectionName,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttributeName") 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. "AttributeName") 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 ProductProductDetail) MarshalJSON() ([]byte, error) { - type NoMethod ProductProductDetail - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductShipping struct { - // Country: The CLDR territory code of the country to which an item will ship. - Country string `json:"country,omitempty"` - // LocationGroupName: The location where the shipping is applicable, - // represented by a location group name. - LocationGroupName string `json:"locationGroupName,omitempty"` - // LocationId: The numeric ID of a location that the shipping rate applies to - // as defined in the Google Ads API. - LocationId int64 `json:"locationId,omitempty,string"` - // MaxHandlingTime: Maximum handling time (inclusive) between when the order is - // received and shipped in business days. 0 means that the order is shipped on - // the same day as it's received if it happens before the cut-off time. Both - // maxHandlingTime and maxTransitTime are required if providing shipping - // speeds. - MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` - // MaxTransitTime: Maximum transit time (inclusive) between when the order has - // shipped and when it's delivered in business days. 0 means that the order is - // delivered on the same day as it ships. Both maxHandlingTime and - // maxTransitTime are required if providing shipping speeds. - MaxTransitTime int64 `json:"maxTransitTime,omitempty,string"` - // MinHandlingTime: Minimum handling time (inclusive) between when the order is - // received and shipped in business days. 0 means that the order is shipped on - // the same day as it's received if it happens before the cut-off time. - // minHandlingTime can only be present together with maxHandlingTime; but it's - // not required if maxHandlingTime is present. - MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` - // MinTransitTime: Minimum transit time (inclusive) between when the order has - // shipped and when it's delivered in business days. 0 means that the order is - // delivered on the same day as it ships. minTransitTime can only be present - // together with maxTransitTime; but it's not required if maxTransitTime is - // present. - MinTransitTime int64 `json:"minTransitTime,omitempty,string"` - // PostalCode: The postal code range that the shipping rate applies to, - // represented by a postal code, a postal code prefix followed by a * wildcard, - // a range between two postal codes or two postal code prefixes of equal - // length. - PostalCode string `json:"postalCode,omitempty"` - // Price: Fixed shipping price, represented as a number. - Price *Price `json:"price,omitempty"` - // Region: The geographic region to which a shipping rate applies. - Region string `json:"region,omitempty"` - // Service: A free-form description of the service class or delivery speed. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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 ProductShipping) MarshalJSON() ([]byte, error) { - type NoMethod ProductShipping - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductShippingDimension struct { - // Unit: The unit of value. - Unit string `json:"unit,omitempty"` - // Value: The dimension of the product used to calculate the shipping cost of - // the item. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 ProductShippingDimension) MarshalJSON() ([]byte, error) { - type NoMethod ProductShippingDimension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error { - type NoMethod ProductShippingDimension - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -type ProductShippingWeight struct { - // Unit: The unit of value. - Unit string `json:"unit,omitempty"` - // Value: The weight of the product used to calculate the shipping cost of the - // item. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 ProductShippingWeight) MarshalJSON() ([]byte, error) { - type NoMethod ProductShippingWeight - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error { - type NoMethod ProductShippingWeight - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// ProductStatus: The status of a product, that is, information about a product -// computed asynchronously. -type ProductStatus struct { - // CreationDate: Date on which the item has been created, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // DestinationStatuses: The intended destinations for the product. - DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"` - // GoogleExpirationDate: Date on which the item expires in Google Shopping, in - // ISO 8601 format. - GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` - // ItemLevelIssues: A list of all issues associated with the product. - ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productStatus" - Kind string `json:"kind,omitempty"` - // LastUpdateDate: Date on which the item has been last updated, in ISO 8601 - // format. - LastUpdateDate string `json:"lastUpdateDate,omitempty"` - // Link: The link to the product. - Link string `json:"link,omitempty"` - // ProductId: The ID of the product for which status is reported. - ProductId string `json:"productId,omitempty"` - // Title: The title of the product. - Title string `json:"title,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationDate") 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. "CreationDate") 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 ProductStatus) MarshalJSON() ([]byte, error) { - type NoMethod ProductStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductStatusDestinationStatus struct { - // ApprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the - // offer is approved. - ApprovedCountries []string `json:"approvedCountries,omitempty"` - // Destination: The name of the destination - Destination string `json:"destination,omitempty"` - // DisapprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the - // offer is disapproved. - DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` - // PendingCountries: List of country codes (ISO 3166-1 alpha-2) where the offer - // is pending approval. - PendingCountries []string `json:"pendingCountries,omitempty"` - // Status: Deprecated. Destination approval status in `targetCountry` of the - // offer. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApprovedCountries") 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. "ApprovedCountries") 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 ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) { - type NoMethod ProductStatusDestinationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductStatusItemLevelIssue struct { - // ApplicableCountries: List of country codes (ISO 3166-1 alpha-2) where issue - // applies to the offer. - ApplicableCountries []string `json:"applicableCountries,omitempty"` - // AttributeName: The attribute's name, if the issue is caused by a single - // attribute. - AttributeName string `json:"attributeName,omitempty"` - // Code: The error code of the issue. - Code string `json:"code,omitempty"` - // Description: A short issue description in English. - Description string `json:"description,omitempty"` - // Destination: The destination the issue applies to. - Destination string `json:"destination,omitempty"` - // Detail: A detailed issue description in English. - Detail string `json:"detail,omitempty"` - // Documentation: The URL of a web page to help with resolving this issue. - Documentation string `json:"documentation,omitempty"` - // Resolution: Whether the issue can be resolved by the merchant. - Resolution string `json:"resolution,omitempty"` - // Servability: How this issue affects serving of the offer. - Servability string `json:"servability,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicableCountries") 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. "ApplicableCountries") 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 ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { - type NoMethod ProductStatusItemLevelIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductStructuredDescription: Structured description, for algorithmically -// (AI)-generated descriptions. See description -// (https://support.google.com/merchants/answer/6324468#When_to_use) for more -// information. -type ProductStructuredDescription struct { - // Content: Required. The description text. Maximum length is 5000 characters. - Content string `json:"content,omitempty"` - // DigitalSourceType: Optional. The digital source type. Acceptable values are: - // - "trained_algorithmic_media" - "default" - DigitalSourceType string `json:"digitalSourceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 ProductStructuredDescription) MarshalJSON() ([]byte, error) { - type NoMethod ProductStructuredDescription - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductStructuredTitle: Structured title, for algorithmically (AI)-generated -// titles. See title -// (https://support.google.com/merchants/answer/6324415#Whentouse) for more -// information. -type ProductStructuredTitle struct { - // Content: Required. The title text. Maximum length is 150 characters. - Content string `json:"content,omitempty"` - // DigitalSourceType: Optional. The digital source type. Acceptable values are: - // - "trained_algorithmic_media" - "default" - DigitalSourceType string `json:"digitalSourceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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 ProductStructuredTitle) MarshalJSON() ([]byte, error) { - type NoMethod ProductStructuredTitle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductSubscriptionCost struct { - // Amount: The amount the buyer has to pay per subscription period. - Amount *Price `json:"amount,omitempty"` - // Period: The type of subscription period. - "month" - "year" - Period string `json:"period,omitempty"` - // PeriodLength: The number of subscription periods the buyer has to pay. - PeriodLength int64 `json:"periodLength,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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 ProductSubscriptionCost) MarshalJSON() ([]byte, error) { - type NoMethod ProductSubscriptionCost - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductTax struct { - // Country: The country within which the item is taxed, specified as a CLDR - // territory code. - Country string `json:"country,omitempty"` - // LocationId: The numeric ID of a location that the tax rate applies to as - // defined in the Google Ads API. - LocationId int64 `json:"locationId,omitempty,string"` - // PostalCode: The postal code range that the tax rate applies to, represented - // by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP - // codes or two ZIP code prefixes of equal length. Examples: 94114, 94*, - // 94002-95460, 94*-95*. - PostalCode string `json:"postalCode,omitempty"` - // Rate: The percentage of tax rate that applies to the item price. - Rate float64 `json:"rate,omitempty"` - // Region: The geographic region to which the tax rate applies. - Region string `json:"region,omitempty"` - // TaxShip: Should be set to true if tax is charged on shipping. - TaxShip bool `json:"taxShip,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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 ProductTax) MarshalJSON() ([]byte, error) { - type NoMethod ProductTax - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductTax) UnmarshalJSON(data []byte) error { - type NoMethod ProductTax - var s1 struct { - Rate gensupport.JSONFloat64 `json:"rate"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Rate = float64(s1.Rate) - return nil -} - -type ProductUnitPricingBaseMeasure struct { - // Unit: The unit of the denominator. - Unit string `json:"unit,omitempty"` - // Value: The denominator of the unit price. - Value int64 `json:"value,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) { - type NoMethod ProductUnitPricingBaseMeasure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductUnitPricingMeasure struct { - // Unit: The unit of the measure. - Unit string `json:"unit,omitempty"` - // Value: The measure of an item. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) { - type NoMethod ProductUnitPricingMeasure - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { - type NoMethod ProductUnitPricingMeasure - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -// ProductView: Product fields. Values are only set for fields requested -// explicitly in the request's search query. -type ProductView struct { - // AggregatedDestinationStatus: Aggregated destination status. - // - // Possible values: - // "AGGREGATED_STATUS_UNSPECIFIED" - Undefined aggregated status. - // "NOT_ELIGIBLE_OR_DISAPPROVED" - Offer isn't eligible, or is disapproved - // for all destinations. - // "PENDING" - Offer's status is pending in all destinations. - // "ELIGIBLE_LIMITED" - Offer is eligible for some (but not all) - // destinations. - // "ELIGIBLE" - Offer is eligible for all destinations. - AggregatedDestinationStatus string `json:"aggregatedDestinationStatus,omitempty"` - // Availability: Availability of the product. - Availability string `json:"availability,omitempty"` - // Brand: Brand of the product. - Brand string `json:"brand,omitempty"` - // CategoryL1: First level of the product category in Google's product taxonomy - // (https://support.google.com/merchants/answer/6324436). - CategoryL1 string `json:"categoryL1,omitempty"` - // CategoryL2: Second level of the product category in Google's product - // taxonomy (https://support.google.com/merchants/answer/6324436). - CategoryL2 string `json:"categoryL2,omitempty"` - // CategoryL3: Third level of the product category in Google's product taxonomy - // (https://support.google.com/merchants/answer/6324436). - CategoryL3 string `json:"categoryL3,omitempty"` - // CategoryL4: Fourth level of the product category in Google's product - // taxonomy (https://support.google.com/merchants/answer/6324436). - CategoryL4 string `json:"categoryL4,omitempty"` - // CategoryL5: Fifth level of the product category in Google's product taxonomy - // (https://support.google.com/merchants/answer/6324436). - CategoryL5 string `json:"categoryL5,omitempty"` - // Channel: Channel of the product (online versus local). - // - // Possible values: - // "CHANNEL_UNSPECIFIED" - Indicates that the channel is unspecified. - // "LOCAL" - Indicates that the channel is local. - // "ONLINE" - Indicates that the channel is online. - Channel string `json:"channel,omitempty"` - // ClickPotential: Estimated performance potential compared to highest - // performing products of the merchant. - // - // Possible values: - // "CLICK_POTENTIAL_UNSPECIFIED" - Unknown predicted clicks impact. - // "LOW" - Potential to receive a low number of clicks compared to the - // highest performing products of the merchant. - // "MEDIUM" - Potential to receive a moderate number of clicks compared to - // the highest performing products of the merchant. - // "HIGH" - Potential to receive a similar number of clicks as the highest - // performing products of the merchant. - ClickPotential string `json:"clickPotential,omitempty"` - // ClickPotentialRank: Rank of the product based on its click potential. A - // product with `click_potential_rank` 1 has the highest click potential among - // the merchant's products that fulfill the search query conditions. - ClickPotentialRank int64 `json:"clickPotentialRank,omitempty,string"` - // Condition: Condition of the product. - Condition string `json:"condition,omitempty"` - // CreationTime: The time the merchant created the product in timestamp - // seconds. - CreationTime string `json:"creationTime,omitempty"` - // CurrencyCode: Product price currency code (for example, ISO 4217). Absent if - // product price is not available. - CurrencyCode string `json:"currencyCode,omitempty"` - // ExpirationDate: Expiration date for the product. Specified on insertion. - ExpirationDate *Date `json:"expirationDate,omitempty"` - // Gtin: GTIN of the product. - Gtin []string `json:"gtin,omitempty"` - // Id: The REST ID of the product, in the form of - // channel:contentLanguage:targetCountry:offerId. Content API methods that - // operate on products take this as their productId parameter. Should always be - // included in the SELECT clause. - Id string `json:"id,omitempty"` - // ItemGroupId: Item group ID provided by the merchant for grouping variants - // together. - ItemGroupId string `json:"itemGroupId,omitempty"` - // ItemIssues: List of item issues for the product. - ItemIssues []*ProductViewItemIssue `json:"itemIssues,omitempty"` - // LanguageCode: Language code of the product in BCP 47 format. - LanguageCode string `json:"languageCode,omitempty"` - // OfferId: Merchant-provided id of the product. - OfferId string `json:"offerId,omitempty"` - // PriceMicros: Product price specified as micros (1 millionth of a standard - // unit, 1 USD = 1000000 micros) in the product currency. Absent in case the - // information about the price of the product is not available. - PriceMicros int64 `json:"priceMicros,omitempty,string"` - // ProductTypeL1: First level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL1 string `json:"productTypeL1,omitempty"` - // ProductTypeL2: Second level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL2 string `json:"productTypeL2,omitempty"` - // ProductTypeL3: Third level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL3 string `json:"productTypeL3,omitempty"` - // ProductTypeL4: Fourth level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL4 string `json:"productTypeL4,omitempty"` - // ProductTypeL5: Fifth level of the product type in merchant's own product - // taxonomy (https://support.google.com/merchants/answer/6324436). - ProductTypeL5 string `json:"productTypeL5,omitempty"` - // ShippingLabel: The normalized shipping label specified in the feed - ShippingLabel string `json:"shippingLabel,omitempty"` - // Title: Title of the product. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AggregatedDestinationStatus") 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. "AggregatedDestinationStatus") 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 ProductView) MarshalJSON() ([]byte, error) { - type NoMethod ProductView - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductViewItemIssue: Item issue associated with the product. -type ProductViewItemIssue struct { - // IssueType: Item issue type. - IssueType *ProductViewItemIssueItemIssueType `json:"issueType,omitempty"` - // Resolution: Item issue resolution. - // - // Possible values: - // "UNKNOWN" - Unknown resolution type. - // "MERCHANT_ACTION" - The merchant has to fix the issue. - // "PENDING_PROCESSING" - The issue will be resolved automatically (for - // example, image crawl), or Google review. No merchant action is required now. - // Resolution might lead to another issue (for example, if crawl fails). - Resolution string `json:"resolution,omitempty"` - // Severity: Item issue severity. - Severity *ProductViewItemIssueItemIssueSeverity `json:"severity,omitempty"` - // ForceSendFields is a list of field names (e.g. "IssueType") 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. "IssueType") 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 ProductViewItemIssue) MarshalJSON() ([]byte, error) { - type NoMethod ProductViewItemIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductViewItemIssueIssueSeverityPerDestination: Issue severity for all -// affected regions in a destination. -type ProductViewItemIssueIssueSeverityPerDestination struct { - // DemotedCountries: List of demoted countries in the destination. - DemotedCountries []string `json:"demotedCountries,omitempty"` - // Destination: Issue destination. - Destination string `json:"destination,omitempty"` - // DisapprovedCountries: List of disapproved countries in the destination. - DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` - // ForceSendFields is a list of field names (e.g. "DemotedCountries") 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. "DemotedCountries") 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 ProductViewItemIssueIssueSeverityPerDestination) MarshalJSON() ([]byte, error) { - type NoMethod ProductViewItemIssueIssueSeverityPerDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductViewItemIssueItemIssueSeverity: Severity of an issue per destination -// in a region, and aggregated severity. -type ProductViewItemIssueItemIssueSeverity struct { - // AggregatedSeverity: Severity of an issue aggregated for destination. - // - // Possible values: - // "AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED" - Undefined Issue severity. - // "DISAPPROVED" - Issue disapproves the product in at least one of the - // selected destinations. - // "DEMOTED" - Issue demotes the product in all selected destinations it - // affects. - // "PENDING" - Issue resolution is `PENDING_PROCESSING`. - AggregatedSeverity string `json:"aggregatedSeverity,omitempty"` - // SeverityPerDestination: Item issue severity for every destination. - SeverityPerDestination []*ProductViewItemIssueIssueSeverityPerDestination `json:"severityPerDestination,omitempty"` - // ForceSendFields is a list of field names (e.g. "AggregatedSeverity") 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. "AggregatedSeverity") 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 ProductViewItemIssueItemIssueSeverity) MarshalJSON() ([]byte, error) { - type NoMethod ProductViewItemIssueItemIssueSeverity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductViewItemIssueItemIssueType: Type of the item issue. -type ProductViewItemIssueItemIssueType struct { - // CanonicalAttribute: Canonical attribute name for attribute-specific issues. - CanonicalAttribute string `json:"canonicalAttribute,omitempty"` - // Code: Error code of the issue. - Code string `json:"code,omitempty"` - // ForceSendFields is a list of field names (e.g. "CanonicalAttribute") 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. "CanonicalAttribute") 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 ProductViewItemIssueItemIssueType) MarshalJSON() ([]byte, error) { - type NoMethod ProductViewItemIssueItemIssueType - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductWeight struct { - // Unit: Required. The weight unit. Acceptable values are: - "g" - "kg" - - // "oz" - "lb" - Unit string `json:"unit,omitempty"` - // Value: Required. The weight represented as a number. The weight can have a - // maximum precision of four decimal places. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 ProductWeight) MarshalJSON() ([]byte, error) { - type NoMethod ProductWeight - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *ProductWeight) UnmarshalJSON(data []byte) error { - type NoMethod ProductWeight - var s1 struct { - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Value = float64(s1.Value) - return nil -} - -type ProductsCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProductsCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductsCustomBatchRequestEntry: A batch entry encoding a single non-batch -// products request. -type ProductsCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // FeedId: The Content API Supplemental Feed ID. If present then product - // insertion or deletion applies to a supplemental feed instead of primary - // Content API feed. - FeedId uint64 `json:"feedId,omitempty,string"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "delete" - - // "get" - "insert" - "update" - Method string `json:"method,omitempty"` - // Product: The product to insert or update. Only required if the method is - // `insert` or `update`. If the `update` method is used with `updateMask` only - // to delete a field, then this isn't required. For example, setting - // `salePrice` on the `updateMask` and not providing a `product` will result in - // an existing sale price on the product specified by `productId` being - // deleted. - Product *Product `json:"product,omitempty"` - // ProductId: The ID of the product to get or mutate. Only defined if the - // method is `get`, `delete`, or `update`. - ProductId string `json:"productId,omitempty"` - // UpdateMask: The comma-separated list of product attributes to be updated. - // Example: "title,salePrice". Attributes specified in the update mask - // without a value specified in the body will be deleted from the product. *You - // must specify the update mask to delete attributes.* Only top-level product - // attributes can be updated. If not defined, product attributes with set - // values will be updated and other attributes will stay unchanged. Only - // defined if the method is `update`. - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ProductsCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductsCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productsCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ProductsCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductsCustomBatchResponseEntry: A batch entry encoding a single non-batch -// products response. -type ProductsCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry this entry responds to. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productsCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // Product: The inserted product. Only defined if the method is `insert` and if - // the request was successful. - Product *Product `json:"product,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ProductsCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of products. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*Product `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 ProductsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ProductsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductstatusesCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a single -// non-batch productstatuses request. -type ProductstatusesCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // Destinations: If set, only issues for the specified destinations are - // returned, otherwise only issues for the Shopping destination. - Destinations []string `json:"destinations,omitempty"` - // IncludeAttributes: Deprecated: Setting this field has no effect and - // attributes are never included. - IncludeAttributes bool `json:"includeAttributes,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "get" - Method string `json:"method,omitempty"` - // ProductId: The ID of the product whose status to get. - ProductId string `json:"productId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductstatusesCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productstatusesCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a single -// non-batch productstatuses response. -type ProductstatusesCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry this entry responds to. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productstatusesCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ProductStatus: The requested product status. Only defined if the request was - // successful. - ProductStatus *ProductStatus `json:"productStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ProductstatusesListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#productstatusesListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of products - // statuses. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*ProductStatus `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 ProductstatusesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ProductstatusesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Promotion: Represents a promotion. See the following articles for more -// details. * Promotions feed specification -// (https://support.google.com/merchants/answer/2906014) * Local promotions -// feed specification (https://support.google.com/merchants/answer/10146130) * -// Promotions on Buy on Google product data specification -// (https://support.google.com/merchants/answer/9173673) -type Promotion struct { - // Brand: Product filter by brand for the promotion. - Brand []string `json:"brand,omitempty"` - // BrandExclusion: Product filter by brand exclusion for the promotion. - BrandExclusion []string `json:"brandExclusion,omitempty"` - // ContentLanguage: Required. The content language used as part of the unique - // identifier. `en` content language is available for all target countries. - // `fr` content language is available for `CA` and `FR` target countries. `de` - // content language is available for `DE` target country. `nl` content language - // is available for `NL` target country. `it` content language is available for - // `IT` target country. `pt` content language is available for `BR` target - // country. `ja` content language is available for `JP` target country. `ko` - // content language is available for `KR` target country. - ContentLanguage string `json:"contentLanguage,omitempty"` - // CouponValueType: Required. Coupon value type for the promotion. - // - // Possible values: - // "COUPON_VALUE_TYPE_UNSPECIFIED" - Indicates that the coupon value type is - // unspecified. - // "MONEY_OFF" - Money off coupon value type. - // "PERCENT_OFF" - Percent off coupon value type. - // "BUY_M_GET_N_MONEY_OFF" - Buy M quantity, get N money off coupon value - // type. `buy_this_quantity` and `get_this_quantity` must be present. - // `money_off_amount` must also be present. - // "BUY_M_GET_N_PERCENT_OFF" - Buy M quantity, get N percent off coupon value - // type. `buy_this_quantity` and `get_this_quantity` must be present. - // `percent_off_percentage` must also be present. - // "BUY_M_GET_MONEY_OFF" - Buy M quantity, get money off. `buy_this_quantity` - // and `money_off_amount` must be present. - // "BUY_M_GET_PERCENT_OFF" - Buy M quantity, get money off. - // `buy_this_quantity` and `percent_off_percentage` must be present. - // "FREE_GIFT" - Free gift with description only. - // "FREE_GIFT_WITH_VALUE" - Free gift with value (description is optional). - // "FREE_GIFT_WITH_ITEM_ID" - Free gift with item ID (description is - // optional). - // "FREE_SHIPPING_STANDARD" - Standard free shipping coupon value type. - // "FREE_SHIPPING_OVERNIGHT" - Overnight free shipping coupon value type. - // "FREE_SHIPPING_TWO_DAY" - Two day free shipping coupon value type. - CouponValueType string `json:"couponValueType,omitempty"` - // FreeGiftDescription: Free gift description for the promotion. - FreeGiftDescription string `json:"freeGiftDescription,omitempty"` - // FreeGiftItemId: Free gift item ID for the promotion. - FreeGiftItemId string `json:"freeGiftItemId,omitempty"` - // FreeGiftValue: Free gift value for the promotion. - FreeGiftValue *PriceAmount `json:"freeGiftValue,omitempty"` - // GenericRedemptionCode: Generic redemption code for the promotion. To be used - // with the `offerType` field. - GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` - // GetThisQuantityDiscounted: The number of items discounted in the promotion. - GetThisQuantityDiscounted int64 `json:"getThisQuantityDiscounted,omitempty"` - // Id: Output only. The REST promotion ID to uniquely identify the promotion. - // Content API methods that operate on promotions take this as their - // `promotionId` parameter. The REST ID for a promotion is of the form - // channel:contentLanguage:targetCountry:promotionId The `channel` field has a - // value of "online", "in_store", or "online_in_store". - Id string `json:"id,omitempty"` - // ItemGroupId: Product filter by item group ID for the promotion. - ItemGroupId []string `json:"itemGroupId,omitempty"` - // ItemGroupIdExclusion: Product filter by item group ID exclusion for the - // promotion. - ItemGroupIdExclusion []string `json:"itemGroupIdExclusion,omitempty"` - // ItemId: Product filter by item ID for the promotion. - ItemId []string `json:"itemId,omitempty"` - // ItemIdExclusion: Product filter by item ID exclusion for the promotion. - ItemIdExclusion []string `json:"itemIdExclusion,omitempty"` - // LimitQuantity: Maximum purchase quantity for the promotion. - LimitQuantity int64 `json:"limitQuantity,omitempty"` - // LimitValue: Maximum purchase value for the promotion. - LimitValue *PriceAmount `json:"limitValue,omitempty"` - // LongTitle: Required. Long title for the promotion. - LongTitle string `json:"longTitle,omitempty"` - // MinimumPurchaseAmount: Minimum purchase amount for the promotion. - MinimumPurchaseAmount *PriceAmount `json:"minimumPurchaseAmount,omitempty"` - // MinimumPurchaseQuantity: Minimum purchase quantity for the promotion. - MinimumPurchaseQuantity int64 `json:"minimumPurchaseQuantity,omitempty"` - // MoneyBudget: Cost cap for the promotion. - MoneyBudget *PriceAmount `json:"moneyBudget,omitempty"` - // MoneyOffAmount: The money off amount offered in the promotion. - MoneyOffAmount *PriceAmount `json:"moneyOffAmount,omitempty"` - // OfferType: Required. Type of the promotion. - // - // Possible values: - // "OFFER_TYPE_UNSPECIFIED" - Unknown offer type. - // "NO_CODE" - Offer type without a code. - // "GENERIC_CODE" - Offer type with a code. - OfferType string `json:"offerType,omitempty"` - // OrderLimit: Order limit for the promotion. - OrderLimit int64 `json:"orderLimit,omitempty"` - // PercentOff: The percentage discount offered in the promotion. - PercentOff int64 `json:"percentOff,omitempty"` - // ProductApplicability: Required. Applicability of the promotion to either all - // products or only specific products. - // - // Possible values: - // "PRODUCT_APPLICABILITY_UNSPECIFIED" - Which products the promotion applies - // to is unknown. - // "ALL_PRODUCTS" - Applicable to all products. - // "SPECIFIC_PRODUCTS" - Applicable to only a single product or list of - // products. - ProductApplicability string `json:"productApplicability,omitempty"` - // ProductType: Product filter by product type for the promotion. - ProductType []string `json:"productType,omitempty"` - // ProductTypeExclusion: Product filter by product type exclusion for the - // promotion. - ProductTypeExclusion []string `json:"productTypeExclusion,omitempty"` - // PromotionDestinationIds: Destination ID for the promotion. - PromotionDestinationIds []string `json:"promotionDestinationIds,omitempty"` - // PromotionDisplayDates: String representation of the promotion display dates. - // Deprecated. Use `promotion_display_time_period` instead. - PromotionDisplayDates string `json:"promotionDisplayDates,omitempty"` - // PromotionDisplayTimePeriod: `TimePeriod` representation of the promotion's - // display dates. - PromotionDisplayTimePeriod *TimePeriod `json:"promotionDisplayTimePeriod,omitempty"` - // PromotionEffectiveDates: String representation of the promotion effective - // dates. Deprecated. Use `promotion_effective_time_period` instead. - PromotionEffectiveDates string `json:"promotionEffectiveDates,omitempty"` - // PromotionEffectiveTimePeriod: Required. `TimePeriod` representation of the - // promotion's effective dates. - PromotionEffectiveTimePeriod *TimePeriod `json:"promotionEffectiveTimePeriod,omitempty"` - // PromotionId: Required. The user provided promotion ID to uniquely identify - // the promotion. - PromotionId string `json:"promotionId,omitempty"` - // PromotionStatus: Output only. The current status of the promotion. - PromotionStatus *PromotionPromotionStatus `json:"promotionStatus,omitempty"` - // PromotionUrl: URL to the page on the merchant's site where the promotion - // shows. Local Inventory ads promotions throw an error if no promo url is - // included. URL is used to confirm that the promotion is valid and can be - // redeemed. - PromotionUrl string `json:"promotionUrl,omitempty"` - // RedemptionChannel: Required. Redemption channel for the promotion. At least - // one channel is required. - // - // Possible values: - // "REDEMPTION_CHANNEL_UNSPECIFIED" - Indicates that the channel is - // unspecified. - // "IN_STORE" - Indicates that the channel is in store. - // "ONLINE" - Indicates that the channel is online. - RedemptionChannel []string `json:"redemptionChannel,omitempty"` - // ShippingServiceNames: Shipping service names for the promotion. - ShippingServiceNames []string `json:"shippingServiceNames,omitempty"` - // StoreApplicability: Whether the promotion applies to all stores, or only - // specified stores. Local Inventory ads promotions throw an error if no store - // applicability is included. An INVALID_ARGUMENT error is thrown if - // store_applicability is set to ALL_STORES and store_code or - // score_code_exclusion is set to a value. - // - // Possible values: - // "STORE_APPLICABILITY_UNSPECIFIED" - Which store codes the promotion - // applies to is unknown. - // "ALL_STORES" - Promotion applies to all stores. - // "SPECIFIC_STORES" - Promotion applies to only the specified stores. - StoreApplicability string `json:"storeApplicability,omitempty"` - // StoreCode: Store codes to include for the promotion. - StoreCode []string `json:"storeCode,omitempty"` - // StoreCodeExclusion: Store codes to exclude for the promotion. - StoreCodeExclusion []string `json:"storeCodeExclusion,omitempty"` - // TargetCountry: Required. The target country used as part of the unique - // identifier. Can be `AU`, `CA`, `DE`, `FR`, `GB`, `IN`, `US`, `BR`, `ES`, - // `NL`, `JP`, `IT` or `KR`. - TargetCountry string `json:"targetCountry,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") 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 Promotion) MarshalJSON() ([]byte, error) { - type NoMethod Promotion - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PromotionPromotionStatus: The status of the promotion. -type PromotionPromotionStatus struct { - // CreationDate: Date on which the promotion has been created in ISO 8601 - // (http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for - // example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" - CreationDate string `json:"creationDate,omitempty"` - // DestinationStatuses: The intended destinations for the promotion. - DestinationStatuses []*PromotionPromotionStatusDestinationStatus `json:"destinationStatuses,omitempty"` - // LastUpdateDate: Date on which the promotion status has been last updated in - // ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and - // offset, for example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" - LastUpdateDate string `json:"lastUpdateDate,omitempty"` - // PromotionIssue: A list of issues associated with the promotion. - PromotionIssue []*PromotionPromotionStatusPromotionIssue `json:"promotionIssue,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationDate") 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. "CreationDate") 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 PromotionPromotionStatus) MarshalJSON() ([]byte, error) { - type NoMethod PromotionPromotionStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PromotionPromotionStatusDestinationStatus: The destination status of the -// promotion. -type PromotionPromotionStatusDestinationStatus struct { - // Destination: The name of the destination. - Destination string `json:"destination,omitempty"` - // Status: The status for the specified destination. - // - // Possible values: - // "STATE_UNSPECIFIED" - Unknown promotion state. - // "IN_REVIEW" - The promotion is under review. - // "REJECTED" - The promotion is disapproved - // "LIVE" - The promotion is approved and active. - // "STOPPED" - The promotion is stopped by merchant. - // "EXPIRED" - The promotion is no longer active. - // "PENDING" - The promotion is not stopped, and all reviews are approved, - // but the active date is in the future. - Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destination") 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. "Destination") 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 PromotionPromotionStatusDestinationStatus) MarshalJSON() ([]byte, error) { - type NoMethod PromotionPromotionStatusDestinationStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PromotionPromotionStatusPromotionIssue: The issue associated with the -// promotion. -type PromotionPromotionStatusPromotionIssue struct { - // Code: Code of the issue. - Code string `json:"code,omitempty"` - // Detail: Explanation of the issue. - Detail string `json:"detail,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 PromotionPromotionStatusPromotionIssue) MarshalJSON() ([]byte, error) { - type NoMethod PromotionPromotionStatusPromotionIssue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PubsubNotificationSettings: Settings for Pub/Sub notifications, all methods -// require that the caller is a direct user of the merchant center account. -type PubsubNotificationSettings struct { - // CloudTopicName: Cloud pub/sub topic to which notifications are sent - // (read-only). - CloudTopicName string `json:"cloudTopicName,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#pubsubNotificationSettings" - Kind string `json:"kind,omitempty"` - // RegisteredEvents: List of event types. Acceptable values are: - - // "orderPendingShipment" - RegisteredEvents []string `json:"registeredEvents,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CloudTopicName") 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. "CloudTopicName") 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 PubsubNotificationSettings) MarshalJSON() ([]byte, error) { - type NoMethod PubsubNotificationSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RateGroup struct { - // ApplicableShippingLabels: A list of shipping labels defining the products to - // which this rate group applies to. This is a disjunction: only one of the - // labels has to match for the rate group to apply. May only be empty for the - // last rate group of a service. Required. - ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"` - // CarrierRates: A list of carrier rates that can be referred to by `mainTable` - // or `singleValue`. - CarrierRates []*CarrierRate `json:"carrierRates,omitempty"` - // MainTable: A table defining the rate group, when `singleValue` is not - // expressive enough. Can only be set if `singleValue` is not set. - MainTable *Table `json:"mainTable,omitempty"` - // Name: Name of the rate group. Optional. If set has to be unique within - // shipping service. - Name string `json:"name,omitempty"` - // SingleValue: The value of the rate group (for example, flat rate $10). Can - // only be set if `mainTable` and `subtables` are not set. - SingleValue *Value `json:"singleValue,omitempty"` - // Subtables: A list of subtables referred to by `mainTable`. Can only be set - // if `mainTable` is set. - Subtables []*Table `json:"subtables,omitempty"` - // ForceSendFields is a list of field names (e.g. "ApplicableShippingLabels") - // 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. "ApplicableShippingLabels") 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 RateGroup) MarshalJSON() ([]byte, error) { - type NoMethod RateGroup - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Recommendation: Recommendations are suggested ways to improve your merchant -// account's performance. For example, to engage with a feature, or start using -// a new Google product. -type Recommendation struct { - // AdditionalCallToAction: Output only. CTAs of this recommendation. Repeated. - AdditionalCallToAction []*RecommendationCallToAction `json:"additionalCallToAction,omitempty"` - // AdditionalDescriptions: Output only. List of additional localized - // descriptions for a recommendation. Localication uses the `languageCode` - // field in `GenerateRecommendations` requests. Not all description types are - // guaranteed to be present and we recommend to rely on default description. - AdditionalDescriptions []*RecommendationDescription `json:"additionalDescriptions,omitempty"` - // Creative: Output only. Any creatives attached to the recommendation. - // Repeated. - Creative []*RecommendationCreative `json:"creative,omitempty"` - // DefaultCallToAction: Optional. Default CTA of the recommendation. - DefaultCallToAction *RecommendationCallToAction `json:"defaultCallToAction,omitempty"` - // DefaultDescription: Optional. Localized recommendation description. The - // localization the {@link `GenerateRecommendationsRequest.language_code`} - // field in {@link `GenerateRecommendationsRequest`} requests. - DefaultDescription string `json:"defaultDescription,omitempty"` - // NumericalImpact: Optional. A numerical score of the impact from the - // recommendation's description. For example, a recommendation might suggest an - // upward trend in sales for a certain product. Higher number means larger - // impact. - NumericalImpact int64 `json:"numericalImpact,omitempty"` - // Paid: Optional. Indicates whether a user needs to pay when they complete the - // user journey suggested by the recommendation. - Paid bool `json:"paid,omitempty"` - // RecommendationName: Optional. Localized recommendation name. The - // localization uses the {@link `GenerateRecommendationsRequest.language_code`} - // field in {@link `GenerateRecommendationsRequest`} requests. - RecommendationName string `json:"recommendationName,omitempty"` - // SubType: Optional. Subtype of the recommendations. Only applicable when - // multiple recommendations can be generated per type, and is used as an - // identifier of recommendation under the same recommendation type. - SubType string `json:"subType,omitempty"` - // Title: Optional. Localized Recommendation Title. Localization uses the - // {@link `GenerateRecommendationsRequest.language_code`} field in {@link - // `GenerateRecommendationsRequest`} requests. - Title string `json:"title,omitempty"` - // Type: Output only. Type of the recommendation. List of currently available - // recommendation types: - OPPORTUNITY_CREATE_NEW_COLLECTION - - // OPPORTUNITY_CREATE_EMAIL_CAMPAIGN - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalCallToAction") 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. "AdditionalCallToAction") 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 Recommendation) MarshalJSON() ([]byte, error) { - type NoMethod Recommendation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecommendationCallToAction: Call to action (CTA) that explains how a -// merchant can implement this recommendation -type RecommendationCallToAction struct { - // Intent: Output only. Intent of the action. This value describes the intent - // (for example, `OPEN_CREATE_EMAIL_CAMPAIGN_FLOW`) and can vary from - // recommendation to recommendation. This value can change over time for the - // same recommendation. Currently available intent values: - - // OPEN_CREATE_EMAIL_CAMPAIGN_FLOW: Opens a user journey where they can create - // a marketing email campaign. (No default URL) - OPEN_CREATE_COLLECTION_TAB: - // Opens a user journey where they can create a collection - // (https://support.google.com/merchants/answer/9703228) for their Merchant - // account. (No default URL) - Intent string `json:"intent,omitempty"` - // LocalizedText: Output only. Localized text of the CTA. Optional. - LocalizedText string `json:"localizedText,omitempty"` - // Uri: Optional. URL of the CTA. This field will only be set for some - // recommendations where there is a suggested landing URL. Otherwise it will be - // set to an empty string. We recommend developers to use their own custom - // landing page according to the description of the intent field above when - // this uri field is empty. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Intent") 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. "Intent") 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 RecommendationCallToAction) MarshalJSON() ([]byte, error) { - type NoMethod RecommendationCallToAction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecommendationCreative: Creative is a multimedia attachment to -// recommendation that can be used on the frontend. -type RecommendationCreative struct { - // Type: Type of the creative. - // - // Possible values: - // "CREATIVE_TYPE_UNSPECIFIED" - Default value. If provided, shall be - // considered invalid. - // "VIDEO" - Video creatives. - // "PHOTO" - Photo creatives. - Type string `json:"type,omitempty"` - // Uri: URL of the creative. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") 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. "Type") 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 RecommendationCreative) MarshalJSON() ([]byte, error) { - type NoMethod RecommendationCreative - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RecommendationDescription: Google-provided description for the -// recommendation. -type RecommendationDescription struct { - // Text: Output only. Text of the description. - Text string `json:"text,omitempty"` - // Type: Output only. Type of the description. - // - // Possible values: - // "DESCRIPTION_TYPE_UNSPECIFIED" - Default value. Will never be provided by - // the API. - // "SHORT" - Short description. - // "LONG" - Long description. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Text") 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. "Text") 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 RecommendationDescription) MarshalJSON() ([]byte, error) { - type NoMethod RecommendationDescription - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RefundReason struct { - // Description: Description of the reason. - Description string `json:"description,omitempty"` - // ReasonCode: Code of the refund reason. Acceptable values are: - - // "adjustment" - "autoPostInternal" - "autoPostInvalidBillingAddress" - - // "autoPostNoInventory" - "autoPostPriceError" - - // "autoPostUndeliverableShippingAddress" - "couponAbuse" - - // "courtesyAdjustment" - "customerCanceled" - - // "customerDiscretionaryReturn" - "customerInitiatedMerchantCancel" - - // "customerSupportRequested" - "deliveredLateByCarrier" - - // "deliveredTooLate" - "expiredItem" - "failToPushOrderGoogleError" - - // "failToPushOrderMerchantError" - - // "failToPushOrderMerchantFulfillmentError" - "failToPushOrderToMerchant" - // - "failToPushOrderToMerchantOutOfStock" - "feeAdjustment" - - // "invalidCoupon" - "lateShipmentCredit" - "malformedShippingAddress" - - // "merchantDidNotShipOnTime" - "noInventory" - "orderTimeout" - - // "other" - "paymentAbuse" - "paymentDeclined" - "priceAdjustment" - - // "priceError" - "productArrivedDamaged" - "productNotAsDescribed" - - // "promoReallocation" - "qualityNotAsExpected" - "returnRefundAbuse" - - // "shippingCostAdjustment" - "shippingPriceError" - "taxAdjustment" - - // "taxError" - "undeliverableShippingAddress" - - // "unsupportedPoBoxAddress" - "wrongProductShipped" - ReasonCode string `json:"reasonCode,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 RefundReason) MarshalJSON() ([]byte, error) { - type NoMethod RefundReason - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Region: Represents a geographic region that you can use as a target with -// both the `RegionalInventory` and `ShippingSettings` services. You can define -// regions as collections of either postal codes or, in some countries, using -// predefined geotargets. -type Region struct { - // DisplayName: The display name of the region. - DisplayName string `json:"displayName,omitempty"` - // GeotargetArea: A list of geotargets that defines the region area. - GeotargetArea *RegionGeoTargetArea `json:"geotargetArea,omitempty"` - // MerchantId: Output only. Immutable. Merchant that owns the region. - MerchantId int64 `json:"merchantId,omitempty,string"` - // PostalCodeArea: A list of postal codes that defines the region area. - PostalCodeArea *RegionPostalCodeArea `json:"postalCodeArea,omitempty"` - // RegionId: Output only. Immutable. The ID uniquely identifying each region. - RegionId string `json:"regionId,omitempty"` - // RegionalInventoryEligible: Output only. Indicates if the region is eligible - // to use in the Regional Inventory configuration. - RegionalInventoryEligible bool `json:"regionalInventoryEligible,omitempty"` - // ShippingEligible: Output only. Indicates if the region is eligible to use in - // the Shipping Services configuration. - ShippingEligible bool `json:"shippingEligible,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 Region) MarshalJSON() ([]byte, error) { - type NoMethod Region - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionGeoTargetArea: A list of geotargets that defines the region area. -type RegionGeoTargetArea struct { - // GeotargetCriteriaIds: Required. A non-empty list of location IDs - // (https://developers.google.com/adwords/api/docs/appendix/geotargeting). They - // must all be of the same location type (e.g., state). - GeotargetCriteriaIds googleapi.Int64s `json:"geotargetCriteriaIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "GeotargetCriteriaIds") 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. "GeotargetCriteriaIds") 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 RegionGeoTargetArea) MarshalJSON() ([]byte, error) { - type NoMethod RegionGeoTargetArea - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionPostalCodeArea: A list of postal codes that defines the region area. -// Note: All regions defined using postal codes are accessible via the -// account's `ShippingSettings.postalCodeGroups` resource. -type RegionPostalCodeArea struct { - // PostalCodes: Required. A range of postal codes. - PostalCodes []*RegionPostalCodeAreaPostalCodeRange `json:"postalCodes,omitempty"` - // RegionCode: Required. CLDR territory code or the country the postal code - // group applies to. - RegionCode string `json:"regionCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostalCodes") 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. "PostalCodes") 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 RegionPostalCodeArea) MarshalJSON() ([]byte, error) { - type NoMethod RegionPostalCodeArea - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionPostalCodeAreaPostalCodeRange: A range of postal codes that defines -// the region area. -type RegionPostalCodeAreaPostalCodeRange struct { - // Begin: Required. A postal code or a pattern of the form prefix* denoting the - // inclusive lower bound of the range defining the area. Examples values: - // "94108", "9410*", "9*". - Begin string `json:"begin,omitempty"` - // End: Optional. A postal code or a pattern of the form prefix* denoting the - // inclusive upper bound of the range defining the area. It must have the same - // length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code - // then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin - // is a pattern then postalCodeRangeEnd must be a pattern with the same prefix - // length. Optional: if not set, then the area is defined as being all the - // postal codes matching postalCodeRangeBegin. - End string `json:"end,omitempty"` - // ForceSendFields is a list of field names (e.g. "Begin") 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. "Begin") 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 RegionPostalCodeAreaPostalCodeRange) MarshalJSON() ([]byte, error) { - type NoMethod RegionPostalCodeAreaPostalCodeRange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionalInventory: Regional inventory resource. contains the regional name -// and all attributes which are overridden for the specified region. -type RegionalInventory struct { - // Availability: The availability of the product. - Availability string `json:"availability,omitempty"` - // CustomAttributes: A list of custom (merchant-provided) attributes. It can - // also be used for submitting any attribute of the feed specification in its - // generic form. - CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#regionalInventory". - Kind string `json:"kind,omitempty"` - // Price: The price of the product. - Price *Price `json:"price,omitempty"` - // RegionId: The ID uniquely identifying each region. - RegionId string `json:"regionId,omitempty"` - // SalePrice: The sale price of the product. Mandatory if - // `sale_price_effective_date` is defined. - SalePrice *Price `json:"salePrice,omitempty"` - // SalePriceEffectiveDate: A date range represented by a pair of ISO 8601 dates - // separated by a space, comma, or slash. Both dates might be specified as - // 'null' if undecided. - SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Availability") 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. "Availability") 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 RegionalInventory) MarshalJSON() ([]byte, error) { - type NoMethod RegionalInventory - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionalinventoryCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*RegionalinventoryCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 RegionalinventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod RegionalinventoryCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionalinventoryCustomBatchRequestEntry: A batch entry encoding a single -// non-batch regional inventory request. -type RegionalinventoryCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: Method of the batch request entry. Acceptable values are: - - // "insert" - Method string `json:"method,omitempty"` - // ProductId: The ID of the product for which to update price and availability. - ProductId string `json:"productId,omitempty"` - // RegionalInventory: Price and availability of the product. - RegionalInventory *RegionalInventory `json:"regionalInventory,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 RegionalinventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod RegionalinventoryCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type RegionalinventoryCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*RegionalinventoryCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#regionalinventoryCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 RegionalinventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod RegionalinventoryCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RegionalinventoryCustomBatchResponseEntry: A batch entry encoding a single -// non-batch regional inventory response. -type RegionalinventoryCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry this entry responds to. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#regionalinventoryCustomBatchResponseEntry". - Kind string `json:"kind,omitempty"` - // RegionalInventory: Price and availability of the product. - RegionalInventory *RegionalInventory `json:"regionalInventory,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 RegionalinventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod RegionalinventoryCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RenderAccountIssuesRequestPayload: The payload for configuring how the -// content should be rendered. -type RenderAccountIssuesRequestPayload struct { - // ContentOption: Optional. How the detailed content should be returned. - // Default option is to return the content as a pre-rendered HTML text. - // - // Possible values: - // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be provided by - // the API. - // "PRE_RENDERED_HTML" - Returns the detail of the issue as a pre-rendered - // HTML text. - ContentOption string `json:"contentOption,omitempty"` - // UserInputActionOption: Optional. How actions with user input form should be - // handled. If not provided, actions will be returned as links that points - // merchant to Merchant Center where they can request the action. - // - // Possible values: - // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. Will - // never be provided by the API. - // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are - // represented only as links that points merchant to Merchant Center where they - // can request the action. Provides easier to implement alternative to - // `BUILT_IN_USER_INPUT_ACTIONS`. - // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form definition - // for each complex action. Your application needs to display this content and - // input form to the merchant before they can request processing of the action. - // To start the action, your application needs to call the `triggeraction` - // method. - UserInputActionOption string `json:"userInputActionOption,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentOption") 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. "ContentOption") 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 RenderAccountIssuesRequestPayload) MarshalJSON() ([]byte, error) { - type NoMethod RenderAccountIssuesRequestPayload - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RenderAccountIssuesResponse: Response containing support content and actions -// for listed account issues. -type RenderAccountIssuesResponse struct { - // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) contains - // a link to a page where merchant can bring their appeal to an external body - // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). - // If the ADR is present, it MUST be available to the merchant on the page that - // shows the list with their account issues. - AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` - // Issues: List of account issues for a given account. This list can be shown - // with compressed, expandable items. In the compressed form, the title and - // impact should be shown for each issue. Once the issue is expanded, the - // detailed content and available actions should be rendered. - Issues []*AccountIssue `json:"issues,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AlternateDisputeResolution") - // 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. "AlternateDisputeResolution") 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 RenderAccountIssuesResponse) MarshalJSON() ([]byte, error) { - type NoMethod RenderAccountIssuesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RenderProductIssuesRequestPayload: The payload for configuring how the -// content should be rendered. -type RenderProductIssuesRequestPayload struct { - // ContentOption: Optional. How the detailed content should be returned. - // Default option is to return the content as a pre-rendered HTML text. - // - // Possible values: - // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be provided by - // the API. - // "PRE_RENDERED_HTML" - Returns the detail of the issue as a pre-rendered - // HTML text. - ContentOption string `json:"contentOption,omitempty"` - // UserInputActionOption: Optional. How actions with user input form should be - // handled. If not provided, actions will be returned as links that points - // merchant to Merchant Center where they can request the action. - // - // Possible values: - // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. Will - // never be provided by the API. - // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are - // represented only as links that points merchant to Merchant Center where they - // can request the action. Provides easier to implement alternative to - // `BUILT_IN_USER_INPUT_ACTIONS`. - // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form definition - // for each complex action. Your application needs to display this content and - // input form to the merchant before they can request processing of the action. - // To start the action, your application needs to call the `triggeraction` - // method. - UserInputActionOption string `json:"userInputActionOption,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentOption") 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. "ContentOption") 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 RenderProductIssuesRequestPayload) MarshalJSON() ([]byte, error) { - type NoMethod RenderProductIssuesRequestPayload - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RenderProductIssuesResponse: Response containing support content and actions -// for listed product issues. -type RenderProductIssuesResponse struct { - // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) contains - // a link to a page where merchant can bring their appeal to an external body - // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). - // If present, the link should be shown on the same page as the list of issues. - AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` - // Issues: List of issues for a given product. This list can be shown with - // compressed, expandable items. In the compressed form, the title and impact - // should be shown for each issue. Once the issue is expanded, the detailed - // content and available actions should be rendered. - Issues []*ProductIssue `json:"issues,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AlternateDisputeResolution") - // 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. "AlternateDisputeResolution") 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 RenderProductIssuesResponse) MarshalJSON() ([]byte, error) { - type NoMethod RenderProductIssuesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReportInteractionRequest: Request to report interactions on a -// recommendation. -type ReportInteractionRequest struct { - // InteractionType: Required. Type of the interaction that is reported, for - // example INTERACTION_CLICK. - // - // Possible values: - // "INTERACTION_TYPE_UNSPECIFIED" - Default value. If provided, the service - // will throw ApiError with description "Required parameter: interactionType". - // "INTERACTION_DISMISS" - When a recommendation is dismissed. - // "INTERACTION_CLICK" - When a recommendation is clicked. - InteractionType string `json:"interactionType,omitempty"` - // ResponseToken: Required. Token of the response when recommendation was - // returned. - ResponseToken string `json:"responseToken,omitempty"` - // Subtype: Optional. Subtype of the recommendations this interaction happened - // on. This field must be set only to the value that is returned by {@link - // `RecommendationsService.GenerateRecommendations`} call. - Subtype string `json:"subtype,omitempty"` - // Type: Required. Type of the recommendations on which this interaction - // happened. This field must be set only to the value that is returned by - // {@link `GenerateRecommendationsResponse`} call. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "InteractionType") 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. "InteractionType") 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 ReportInteractionRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReportInteractionRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReportRow: Result row returned from the search query. -type ReportRow struct { - // BestSellers: Best sellers fields requested by the merchant in the query. - // Field values are only set if the merchant queries - // `BestSellersProductClusterView` or `BestSellersBrandView`. - BestSellers *BestSellers `json:"bestSellers,omitempty"` - // Brand: Brand fields requested by the merchant in the query. Field values are - // only set if the merchant queries `BestSellersBrandView`. - Brand *Brand `json:"brand,omitempty"` - // CompetitiveVisibility: Competitive visibility fields requested by the - // merchant in the query. Field values are only set if the merchant queries - // `CompetitiveVisibilityTopMerchantView`, `CompetitiveVisibilityBenchmarkView` - // or `CompetitiveVisibilityCompetitorView`. - CompetitiveVisibility *CompetitiveVisibility `json:"competitiveVisibility,omitempty"` - // Metrics: Metrics requested by the merchant in the query. Metric values are - // only set for metrics requested explicitly in the query. - Metrics *Metrics `json:"metrics,omitempty"` - // PriceCompetitiveness: Price competitiveness fields requested by the merchant - // in the query. Field values are only set if the merchant queries - // `PriceCompetitivenessProductView`. - PriceCompetitiveness *PriceCompetitiveness `json:"priceCompetitiveness,omitempty"` - // PriceInsights: Price insights fields requested by the merchant in the query. - // Field values are only set if the merchant queries - // `PriceInsightsProductView`. - PriceInsights *PriceInsights `json:"priceInsights,omitempty"` - // ProductCluster: Product cluster fields requested by the merchant in the - // query. Field values are only set if the merchant queries - // `BestSellersProductClusterView`. - ProductCluster *ProductCluster `json:"productCluster,omitempty"` - // ProductView: Product fields requested by the merchant in the query. Field - // values are only set if the merchant queries `ProductView`. - ProductView *ProductView `json:"productView,omitempty"` - // Segments: Segmentation dimensions requested by the merchant in the query. - // Dimension values are only set for dimensions requested explicitly in the - // query. - Segments *Segments `json:"segments,omitempty"` - // TopicTrends: Topic trends - // (https://support.google.com/merchants/answer/13542370) fields requested by - // the merchant in the query. Field values are only set if the merchant queries - // `TopicTrendsView`. - TopicTrends *TopicTrends `json:"topicTrends,omitempty"` - // ForceSendFields is a list of field names (e.g. "BestSellers") 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. "BestSellers") 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 ReportRow) MarshalJSON() ([]byte, error) { - type NoMethod ReportRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestPhoneVerificationRequest: Request message for the -// RequestPhoneVerification method. -type RequestPhoneVerificationRequest struct { - // LanguageCode: Language code IETF BCP 47 syntax - // (https://tools.ietf.org/html/bcp47) (for example, en-US). Language code is - // used to provide localized `SMS` and `PHONE_CALL`. Default language used is - // en-US if not provided. - LanguageCode string `json:"languageCode,omitempty"` - // PhoneNumber: Phone number to be verified. - PhoneNumber string `json:"phoneNumber,omitempty"` - // PhoneRegionCode: Required. Two letter country code for the phone number, for - // example `CA` for Canadian numbers. See the ISO 3166-1 alpha-2 - // (https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) - // officially assigned codes. - PhoneRegionCode string `json:"phoneRegionCode,omitempty"` - // PhoneVerificationMethod: Verification method to receive verification code. - // - // Possible values: - // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. - // "SMS" - Receive verification code by SMS. - // "PHONE_CALL" - Receive verification code by phone call. - PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` - // ForceSendFields is a list of field names (e.g. "LanguageCode") 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. "LanguageCode") 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 RequestPhoneVerificationRequest) MarshalJSON() ([]byte, error) { - type NoMethod RequestPhoneVerificationRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestPhoneVerificationResponse: Response message for the -// RequestPhoneVerification method. -type RequestPhoneVerificationResponse struct { - // VerificationId: The verification ID to use in subsequent calls to - // `verifyphonenumber`. - VerificationId string `json:"verificationId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "VerificationId") 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. "VerificationId") 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 RequestPhoneVerificationResponse) MarshalJSON() ([]byte, error) { - type NoMethod RequestPhoneVerificationResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestReviewBuyOnGoogleProgramRequest: Request message for the -// RequestReviewProgram method. -type RequestReviewBuyOnGoogleProgramRequest struct { -} - -// RequestReviewFreeListingsRequest: Request message for the -// RequestReviewFreeListings Program method. -type RequestReviewFreeListingsRequest struct { - // RegionCode: The code ISO 3166-1 alpha-2 - // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country for which - // review is to be requested. - RegionCode string `json:"regionCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "RegionCode") 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. "RegionCode") 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 RequestReviewFreeListingsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RequestReviewFreeListingsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RequestReviewShoppingAdsRequest: Request message for the -// RequestReviewShoppingAds program method. -type RequestReviewShoppingAdsRequest struct { - // RegionCode: The code ISO 3166-1 alpha-2 - // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country for which - // review is to be requested. - RegionCode string `json:"regionCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "RegionCode") 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. "RegionCode") 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 RequestReviewShoppingAdsRequest) MarshalJSON() ([]byte, error) { - type NoMethod RequestReviewShoppingAdsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnAddress: Return address resource. -type ReturnAddress struct { - // Address: Required. The address. - Address *ReturnAddressAddress `json:"address,omitempty"` - // Country: Required. The country of sale where the return address is - // applicable. - Country string `json:"country,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnAddress" - Kind string `json:"kind,omitempty"` - // Label: Required. The user-defined label of the return address. For the - // default address, use the label "default". - Label string `json:"label,omitempty"` - // PhoneNumber: Required. The merchant's contact phone number regarding the - // return. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ReturnAddressId: Return address ID generated by Google. - ReturnAddressId string `json:"returnAddressId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Address") 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. "Address") 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 ReturnAddress) MarshalJSON() ([]byte, error) { - type NoMethod ReturnAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnAddressAddress struct { - // Country: CLDR country code (for example, "US"). - Country string `json:"country,omitempty"` - // Locality: City, town or commune. May also include dependent localities or - // sublocalities (for example, neighborhoods or suburbs). - Locality string `json:"locality,omitempty"` - // PostalCode: Postal code or ZIP (for example, "94043"). - PostalCode string `json:"postalCode,omitempty"` - // RecipientName: Name of the recipient to address returns to. - RecipientName string `json:"recipientName,omitempty"` - // Region: Top-level administrative subdivision of the country. For example, a - // state like California ("CA") or a province like Quebec ("QC"). - Region string `json:"region,omitempty"` - // StreetAddress: Street-level part of the address. May be up to two lines, - // each line specified as an array element. - StreetAddress []string `json:"streetAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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 ReturnAddressAddress) MarshalJSON() ([]byte, error) { - type NoMethod ReturnAddressAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicy: Return policy resource. -type ReturnPolicy struct { - // Country: Required. The country of sale where the return policy is - // applicable. - Country string `json:"country,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnPolicy" - Kind string `json:"kind,omitempty"` - // Label: Required. The user-defined label of the return policy. For the - // default policy, use the label "default". - Label string `json:"label,omitempty"` - // Name: Required. The name of the policy as shown in Merchant Center. - Name string `json:"name,omitempty"` - // NonFreeReturnReasons: Return reasons that will incur return fees. - NonFreeReturnReasons []string `json:"nonFreeReturnReasons,omitempty"` - // Policy: Required. The policy. - Policy *ReturnPolicyPolicy `json:"policy,omitempty"` - // ReturnPolicyId: Return policy ID generated by Google. - ReturnPolicyId string `json:"returnPolicyId,omitempty"` - // ReturnShippingFee: The return shipping fee that will apply to non free - // return reasons. - ReturnShippingFee *Price `json:"returnShippingFee,omitempty"` - // SeasonalOverrides: An optional list of seasonal overrides. - SeasonalOverrides []*ReturnPolicySeasonalOverride `json:"seasonalOverrides,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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 ReturnPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnline: Return policy online object. This is currently used to -// represent return policies for ads and free listings programs. -type ReturnPolicyOnline struct { - // Countries: The countries of sale where the return policy is applicable. The - // values must be a valid 2 letter ISO 3166 code, e.g. "US". - Countries []string `json:"countries,omitempty"` - // ItemConditions: The item conditions that are accepted for returns. This is - // required to not be empty unless the type of return policy is noReturns. - // - // Possible values: - // "ITEM_CONDITION_UNSPECIFIED" - Default value. This value is unused. - // "NEW" - New. - // "USED" - Used. - ItemConditions []string `json:"itemConditions,omitempty"` - // Label: The unique user-defined label of the return policy. The same label - // cannot be used in different return policies for the same country. Policies - // with the label 'default' will apply to all products, unless a product - // specifies a return_policy_label attribute. - Label string `json:"label,omitempty"` - // Name: The name of the policy as shown in Merchant Center. - Name string `json:"name,omitempty"` - // Policy: The return policy. - Policy *ReturnPolicyOnlinePolicy `json:"policy,omitempty"` - // RestockingFee: The restocking fee that applies to all return reason - // categories. This would be treated as a free restocking fee if the value is - // not set. - RestockingFee *ReturnPolicyOnlineRestockingFee `json:"restockingFee,omitempty"` - // ReturnMethods: The return methods of how customers can return an item. This - // value is required to not be empty unless the type of return policy is - // noReturns. - // - // Possible values: - // "RETURN_METHOD_UNSPECIFIED" - Default value. This value is unused. - // "BY_MAIL" - By mail. - // "IN_STORE" - In store. - // "AT_A_KIOSK" - At a kiosk. - ReturnMethods []string `json:"returnMethods,omitempty"` - // ReturnPolicyId: Output only. Return policy ID generated by Google. - ReturnPolicyId string `json:"returnPolicyId,omitempty"` - // ReturnPolicyUri: The return policy uri. This can used by Google to do a - // sanity check for the policy. - ReturnPolicyUri string `json:"returnPolicyUri,omitempty"` - // ReturnReasonCategoryInfo: The return reason category information. This - // required to not be empty unless the type of return policy is noReturns. - ReturnReasonCategoryInfo []*ReturnPolicyOnlineReturnReasonCategoryInfo `json:"returnReasonCategoryInfo,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Countries") 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. "Countries") 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 ReturnPolicyOnline) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnline - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnlinePolicy: The available policies. -type ReturnPolicyOnlinePolicy struct { - // Days: The number of days items can be returned after delivery, where one day - // is defined to be 24 hours after the delivery timestamp. Required for - // `numberOfDaysAfterDelivery` returns. - Days int64 `json:"days,omitempty,string"` - // Type: Policy type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Default value. This value is unused. - // "NUMBER_OF_DAYS_AFTER_DELIVERY" - Number of days after a return is - // delivered. - // "NO_RETURNS" - No returns. - // "LIFETIME_RETURNS" - Life time returns. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Days") 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. "Days") 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 ReturnPolicyOnlinePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnlinePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnlineRestockingFee: The restocking fee. This can either be a -// fixed fee or a micro percent. -type ReturnPolicyOnlineRestockingFee struct { - // FixedFee: Fixed restocking fee. - FixedFee *PriceAmount `json:"fixedFee,omitempty"` - // MicroPercent: Percent of total price in micros. 15,000,000 means 15% of the - // total price would be charged. - MicroPercent int64 `json:"microPercent,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedFee") 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. "FixedFee") 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 ReturnPolicyOnlineRestockingFee) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnlineRestockingFee - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnlineReturnReasonCategoryInfo: The return reason category info -// wrapper. -type ReturnPolicyOnlineReturnReasonCategoryInfo struct { - // ReturnLabelSource: The corresponding return label source. - // - // Possible values: - // "RETURN_LABEL_SOURCE_UNSPECIFIED" - Default value. This value is unused. - // "DOWNLOAD_AND_PRINT" - Download and print the label. - // "IN_THE_BOX" - Label in the box. - // "CUSTOMER_RESPONSIBILITY" - Customers' responsibility to get the label. - ReturnLabelSource string `json:"returnLabelSource,omitempty"` - // ReturnReasonCategory: The return reason category. - // - // Possible values: - // "RETURN_REASON_CATEGORY_UNSPECIFIED" - Default value. This value is - // unused. - // "BUYER_REMORSE" - Buyer remorse. - // "ITEM_DEFECT" - Item defect. - ReturnReasonCategory string `json:"returnReasonCategory,omitempty"` - // ReturnShippingFee: The corresponding return shipping fee. This is only - // applicable when returnLabelSource is not the customer's responsibility. - ReturnShippingFee *ReturnPolicyOnlineReturnShippingFee `json:"returnShippingFee,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReturnLabelSource") 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. "ReturnLabelSource") 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 ReturnPolicyOnlineReturnReasonCategoryInfo) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnlineReturnReasonCategoryInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnPolicyOnlineReturnShippingFee: The return shipping fee. This can -// either be a fixed fee or a boolean to indicate that the customer pays the -// actual shipping cost. -type ReturnPolicyOnlineReturnShippingFee struct { - // FixedFee: Fixed return shipping fee amount. This value is only applicable - // when type is FIXED. We will treat the return shipping fee as free if type is - // FIXED and this value is not set. - FixedFee *PriceAmount `json:"fixedFee,omitempty"` - // Type: Type of return shipping fee. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Default value. This value is unused. - // "FIXED" - The return shipping fee is a fixed value. - // "CUSTOMER_PAYING_ACTUAL_FEE" - Customer will pay the actual return - // shipping fee. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "FixedFee") 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. "FixedFee") 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 ReturnPolicyOnlineReturnShippingFee) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyOnlineReturnShippingFee - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnPolicyPolicy struct { - // LastReturnDate: Required. Last day for returning the items. In ISO 8601 - // format. When specifying the return window like this, set the policy type to - // "lastReturnDate". Use this for seasonal overrides only. - LastReturnDate string `json:"lastReturnDate,omitempty"` - // NumberOfDays: The number of days items can be returned after delivery, where - // one day is defined to be 24 hours after the delivery timestamp. When - // specifying the return window like this, set the policy type to - // "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, - // 270 and 365 for the default policy. Additional policies further allow 14, - // 15, 21 and 28 days, but note that for most items a minimum of 30 days is - // required for returns. Exceptions may be made for electronics. A policy of - // less than 30 days can only be applied to those items. - NumberOfDays int64 `json:"numberOfDays,omitempty,string"` - // Type: Policy type. Use "lastReturnDate" for seasonal overrides only. Note - // that for most items a minimum of 30 days is required for returns. Exceptions - // may be made for electronics or non-returnable items such as food, - // perishables, and living things. A policy of less than 30 days can only be - // applied to those items. Acceptable values are: - "lastReturnDate" - - // "lifetimeReturns" - "noReturns" - "numberOfDaysAfterDelivery" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "LastReturnDate") 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. "LastReturnDate") 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 ReturnPolicyPolicy) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicyPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnPolicySeasonalOverride struct { - // EndDate: Required. Last day on which the override applies. In ISO 8601 - // format. - EndDate string `json:"endDate,omitempty"` - // Name: Required. The name of the seasonal override as shown in Merchant - // Center. - Name string `json:"name,omitempty"` - // Policy: Required. The policy which is in effect during that time. - Policy *ReturnPolicyPolicy `json:"policy,omitempty"` - // StartDate: Required. First day on which the override applies. In ISO 8601 - // format. - StartDate string `json:"startDate,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndDate") 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. "EndDate") 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 ReturnPolicySeasonalOverride) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPolicySeasonalOverride - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnPricingInfo struct { - // ChargeReturnShippingFee: Default option for whether merchant should charge - // the customer for return shipping costs, based on customer selected return - // reason and merchant's return policy for the items being returned. - ChargeReturnShippingFee bool `json:"chargeReturnShippingFee,omitempty"` - // MaxReturnShippingFee: Maximum return shipping costs that may be charged to - // the customer depending on merchant's assessment of the return reason and the - // merchant's return policy for the items being returned. - MaxReturnShippingFee *MonetaryAmount `json:"maxReturnShippingFee,omitempty"` - // RefundableItemsTotalAmount: Total amount that can be refunded for the items - // in this return. It represents the total amount received by the merchant for - // the items, after applying merchant coupons. - RefundableItemsTotalAmount *MonetaryAmount `json:"refundableItemsTotalAmount,omitempty"` - // RefundableShippingAmount: Maximum amount that can be refunded for the - // original shipping fee. - RefundableShippingAmount *MonetaryAmount `json:"refundableShippingAmount,omitempty"` - // TotalRefundedAmount: Total amount already refunded by the merchant. It - // includes all types of refunds (items, shipping, etc.) Not provided if no - // refund has been applied yet. - TotalRefundedAmount *MonetaryAmount `json:"totalRefundedAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChargeReturnShippingFee") 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. "ChargeReturnShippingFee") 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 ReturnPricingInfo) MarshalJSON() ([]byte, error) { - type NoMethod ReturnPricingInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnShipment struct { - // CreationDate: The date of creation of the shipment, in ISO 8601 format. - CreationDate string `json:"creationDate,omitempty"` - // DeliveryDate: The date of delivery of the shipment, in ISO 8601 format. - DeliveryDate string `json:"deliveryDate,omitempty"` - // ReturnMethodType: Type of the return method. Acceptable values are: - - // "byMail" - "contactCustomerSupport" - "returnless" - "inStore" - ReturnMethodType string `json:"returnMethodType,omitempty"` - // ShipmentId: Shipment ID generated by Google. - ShipmentId string `json:"shipmentId,omitempty"` - // ShipmentTrackingInfos: Tracking information of the shipment. One return - // shipment might be handled by several shipping carriers sequentially. - ShipmentTrackingInfos []*ShipmentTrackingInfo `json:"shipmentTrackingInfos,omitempty"` - // ShippingDate: The date of shipping of the shipment, in ISO 8601 format. - ShippingDate string `json:"shippingDate,omitempty"` - // State: State of the shipment. Acceptable values are: - "completed" - - // "new" - "shipped" - "undeliverable" - "pending" - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreationDate") 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. "CreationDate") 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 ReturnShipment) MarshalJSON() ([]byte, error) { - type NoMethod ReturnShipment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ReturnShippingLabel: Return shipping label for a Buy on Google -// merchant-managed return. -type ReturnShippingLabel struct { - // Carrier: Name of the carrier. - Carrier string `json:"carrier,omitempty"` - // LabelUri: The URL for the return shipping label in PDF format - LabelUri string `json:"labelUri,omitempty"` - // TrackingId: The tracking id of this return label. - TrackingId string `json:"trackingId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Carrier") 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. "Carrier") 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 ReturnShippingLabel) MarshalJSON() ([]byte, error) { - type NoMethod ReturnShippingLabel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ReturnaddressCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ReturnaddressCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The Merchant Center account ID. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: Method of the batch request entry. Acceptable values are: - - // "delete" - "get" - "insert" - Method string `json:"method,omitempty"` - // ReturnAddress: The return address to submit. This should be set only if the - // method is `insert`. - ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` - // ReturnAddressId: The return address ID. This should be set only if the - // method is `delete` or `get`. - ReturnAddressId string `json:"returnAddressId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ReturnaddressCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ReturnaddressCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ReturnaddressCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ReturnAddress: The retrieved return address. - ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ReturnaddressCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnaddressListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnaddressListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of addresses. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*ReturnAddress `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 ReturnaddressListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnaddressListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ReturnpolicyCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ReturnpolicyCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyCustomBatchRequestEntry struct { - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The Merchant Center account ID. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: Method of the batch request entry. Acceptable values are: - - // "delete" - "get" - "insert" - Method string `json:"method,omitempty"` - // ReturnPolicy: The return policy to submit. This should be set only if the - // method is `insert`. - ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` - // ReturnPolicyId: The return policy ID. This should be set only if the method - // is `delete` or `get`. - ReturnPolicyId string `json:"returnPolicyId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ReturnpolicyCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ReturnpolicyCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ReturnpolicyCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors defined if, and only if, the request failed. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ReturnPolicy: The retrieved return policy. - ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ReturnpolicyCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ReturnpolicyListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#returnpolicyListResponse". - Kind string `json:"kind,omitempty"` - Resources []*ReturnPolicy `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 ReturnpolicyListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ReturnpolicyListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Row struct { - // Cells: The list of cells that constitute the row. Must have the same length - // as `columnHeaders` for two-dimensional tables, a length of 1 for - // one-dimensional tables. Required. - Cells []*Value `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") 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. "Cells") 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 Row) MarshalJSON() ([]byte, error) { - type NoMethod Row - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SearchRequest: Request message for the ReportService.Search method. -type SearchRequest struct { - // PageSize: Number of ReportRows to retrieve in a single page. Defaults to - // 1000. Values above 5000 are coerced to 5000. - PageSize int64 `json:"pageSize,omitempty"` - // PageToken: Token of the page to retrieve. If not specified, the first page - // of results is returned. In order to request the next page of results, the - // value obtained from `next_page_token` in the previous response should be - // used. - PageToken string `json:"pageToken,omitempty"` - // Query: Required. Query that defines performance metrics to retrieve and - // dimensions according to which the metrics are to be segmented. For details - // on how to construct your query, see the Query Language guide - // (https://developers.google.com/shopping-content/guides/reports/query-language/overview). - Query string `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSize") 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. "PageSize") 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 SearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod SearchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SearchResponse: Response message for the ReportService.Search method. -type SearchResponse struct { - // NextPageToken: Token which can be sent as `page_token` to retrieve the next - // page. If omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // Results: Rows that matched the search query. - Results []*ReportRow `json:"results,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod SearchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Segments: Dimensions according to which metrics are segmented in the -// response. Values of product dimensions, such as `offer_id`, reflect the -// state of a product at the time of the corresponding event, for example, -// impression or order. Segment fields cannot be selected in queries without -// also selecting at least one metric field. Values are only set for dimensions -// requested explicitly in the request's search query. -type Segments struct { - // Brand: Brand of the product. - Brand string `json:"brand,omitempty"` - // CategoryL1: Product category (1st level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL1 string `json:"categoryL1,omitempty"` - // CategoryL2: Product category (2nd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL2 string `json:"categoryL2,omitempty"` - // CategoryL3: Product category (3rd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL3 string `json:"categoryL3,omitempty"` - // CategoryL4: Product category (4th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL4 string `json:"categoryL4,omitempty"` - // CategoryL5: Product category (5th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in Google's product taxonomy. - CategoryL5 string `json:"categoryL5,omitempty"` - // CurrencyCode: Currency in which price metrics are represented, for example, - // if you select `ordered_item_sales_micros`, the returned value will be - // represented by this currency. - CurrencyCode string `json:"currencyCode,omitempty"` - // CustomLabel0: Custom label 0 for custom grouping of products. - CustomLabel0 string `json:"customLabel0,omitempty"` - // CustomLabel1: Custom label 1 for custom grouping of products. - CustomLabel1 string `json:"customLabel1,omitempty"` - // CustomLabel2: Custom label 2 for custom grouping of products. - CustomLabel2 string `json:"customLabel2,omitempty"` - // CustomLabel3: Custom label 3 for custom grouping of products. - CustomLabel3 string `json:"customLabel3,omitempty"` - // CustomLabel4: Custom label 4 for custom grouping of products. - CustomLabel4 string `json:"customLabel4,omitempty"` - // CustomerCountryCode: Code of the country where the customer is located at - // the time of the event. Represented in the ISO 3166 format. If the customer - // country cannot be determined, a special 'ZZ' code is returned. - CustomerCountryCode string `json:"customerCountryCode,omitempty"` - // Date: Date in the merchant timezone to which metrics apply. - Date *Date `json:"date,omitempty"` - // OfferId: Merchant-provided id of the product. - OfferId string `json:"offerId,omitempty"` - // ProductTypeL1: Product type (1st level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL1 string `json:"productTypeL1,omitempty"` - // ProductTypeL2: Product type (2nd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL2 string `json:"productTypeL2,omitempty"` - // ProductTypeL3: Product type (3rd level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL3 string `json:"productTypeL3,omitempty"` - // ProductTypeL4: Product type (4th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL4 string `json:"productTypeL4,omitempty"` - // ProductTypeL5: Product type (5th level) - // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) - // in merchant's own product taxonomy. - ProductTypeL5 string `json:"productTypeL5,omitempty"` - // Program: Program to which metrics apply, for example, Free Product Listing. - // - // Possible values: - // "PROGRAM_UNSPECIFIED" - Not specified. - // "SHOPPING_ADS" - Shopping Ads. - // "FREE_PRODUCT_LISTING" - Free Product Listing. - // "FREE_LOCAL_PRODUCT_LISTING" - Free Local Product Listing. - // "BUY_ON_GOOGLE_LISTING" - *Deprecated*: This value is no longer supported. - // Retrieving all metrics for the `BUY_ON_GOOGLE_LISTING` program returns 0 - // starting from May 2024. Buy on Google Listing. - Program string `json:"program,omitempty"` - // Title: Title of the product. - Title string `json:"title,omitempty"` - // Week: First day of the week (Monday) of the metrics date in the merchant - // timezone. - Week *Date `json:"week,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") 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 Segments) MarshalJSON() ([]byte, error) { - type NoMethod Segments - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Service struct { - // Active: A boolean exposing the active status of the shipping service. - // Required. - Active bool `json:"active,omitempty"` - // Currency: The CLDR code of the currency to which this service applies. Must - // match that of the prices in rate groups. - Currency string `json:"currency,omitempty"` - // DeliveryCountry: The CLDR territory code of the country to which the service - // applies. Required. - DeliveryCountry string `json:"deliveryCountry,omitempty"` - // DeliveryTime: Time spent in various aspects from order to the delivery of - // the product. Required. - DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` - // Eligibility: Eligibility for this service. Acceptable values are: - "All - // scenarios" - "All scenarios except Shopping Actions" - "Shopping - // Actions" - Eligibility string `json:"eligibility,omitempty"` - // MinimumOrderValue: Minimum order value for this service. If set, indicates - // that customers will have to spend at least this amount. All prices within a - // service must have the same currency. Cannot be set together with - // minimum_order_value_table. - MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` - // MinimumOrderValueTable: Table of per store minimum order values for the - // pickup fulfillment type. Cannot be set together with minimum_order_value. - MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` - // Name: Free-form name of the service. Must be unique within target account. - // Required. - Name string `json:"name,omitempty"` - // PickupService: The carrier-service pair delivering items to collection - // points. The list of supported pickup services can be retrieved through the - // `getSupportedPickupServices` method. Required if and only if the service - // delivery type is `pickup`. - PickupService *PickupCarrierService `json:"pickupService,omitempty"` - // RateGroups: Shipping rate group definitions. Only the last one is allowed to - // have an empty `applicableShippingLabels`, which means "everything else". The - // other `applicableShippingLabels` must not overlap. - RateGroups []*RateGroup `json:"rateGroups,omitempty"` - // ShipmentType: Type of locations this service ships orders to. Acceptable - // values are: - "delivery" - "pickup` (deprecated)" - "local_delivery" - - // "collection_point" - ShipmentType string `json:"shipmentType,omitempty"` - // StoreConfig: A list of stores your products are delivered from. This is only - // available for the local delivery shipment type. - StoreConfig *ServiceStoreConfig `json:"storeConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Active") 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. "Active") 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 Service) MarshalJSON() ([]byte, error) { - type NoMethod Service - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceStoreConfig: Stores that provide local delivery. Only valid with -// local delivery fulfillment. -type ServiceStoreConfig struct { - // CutoffConfig: Time local delivery ends for the day. This can be either - // `local_cutoff_time` or `store_close_offset_hours`, if both are provided an - // error is thrown. - CutoffConfig *ServiceStoreConfigCutoffConfig `json:"cutoffConfig,omitempty"` - // ServiceRadius: Maximum delivery radius. Only needed for local delivery - // fulfillment type. - ServiceRadius *Distance `json:"serviceRadius,omitempty"` - // StoreCodes: A list of store codes that provide local delivery. If empty, - // then `store_service_type` must be `all_stores`, or an error is thrown. If - // not empty, then `store_service_type` must be `selected_stores`, or an error - // is thrown. - StoreCodes []string `json:"storeCodes,omitempty"` - // StoreServiceType: Indicates whether all stores listed by this merchant - // provide local delivery or not. Acceptable values are `all stores` and - // `selected stores` - StoreServiceType string `json:"storeServiceType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CutoffConfig") 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. "CutoffConfig") 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 ServiceStoreConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceStoreConfigCutoffConfig: Time local delivery ends for the day based -// on the local timezone of the store. `local_cutoff_time` and -// `store_close_offset_hours` are mutually exclusive. -type ServiceStoreConfigCutoffConfig struct { - // LocalCutoffTime: Time in hours and minutes in the local timezone when local - // delivery ends. - LocalCutoffTime *ServiceStoreConfigCutoffConfigLocalCutoffTime `json:"localCutoffTime,omitempty"` - // NoDeliveryPostCutoff: Merchants can opt-out of showing n+1 day local - // delivery when they have a shipping service configured to n day local - // delivery. For example, if the shipping service defines same-day delivery, - // and it's past the cut-off, setting this field to `true` results in the - // calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the - // same example, setting this field to `false` results in the calculated - // shipping time being one day. This is only for local delivery. - NoDeliveryPostCutoff bool `json:"noDeliveryPostCutoff,omitempty"` - // StoreCloseOffsetHours: Represents cutoff time as the number of hours before - // store closing. Mutually exclusive with other fields (hour and minute). - StoreCloseOffsetHours int64 `json:"storeCloseOffsetHours,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "LocalCutoffTime") 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. "LocalCutoffTime") 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 ServiceStoreConfigCutoffConfig) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfigCutoffConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ServiceStoreConfigCutoffConfigLocalCutoffTime: Time in hours and minutes in -// the local timezone when local delivery ends. -type ServiceStoreConfigCutoffConfigLocalCutoffTime struct { - // Hour: Hour local delivery orders must be placed by to process the same day. - Hour int64 `json:"hour,omitempty,string"` - // Minute: Minute local delivery orders must be placed by to process the same - // day. - Minute int64 `json:"minute,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Hour") 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. "Hour") 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 ServiceStoreConfigCutoffConfigLocalCutoffTime) MarshalJSON() ([]byte, error) { - type NoMethod ServiceStoreConfigCutoffConfigLocalCutoffTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SettlementReport: Settlement reports detail order-level and item-level -// credits and debits between you and Google. -type SettlementReport struct { - // EndDate: The end date on which all transactions are included in the report, - // in ISO 8601 format. - EndDate string `json:"endDate,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#settlementReport" - Kind string `json:"kind,omitempty"` - // PreviousBalance: The residual amount from the previous invoice. This is set - // only if the previous invoices are not paid because of negative balance. - PreviousBalance *Price `json:"previousBalance,omitempty"` - // SettlementId: The ID of the settlement report. - SettlementId string `json:"settlementId,omitempty"` - // StartDate: The start date on which all transactions are included in the - // report, in ISO 8601 format. - StartDate string `json:"startDate,omitempty"` - // TransferAmount: The money due to the merchant. - TransferAmount *Price `json:"transferAmount,omitempty"` - // TransferDate: Date on which transfer for this payment was initiated by - // Google, in ISO 8601 format. - TransferDate string `json:"transferDate,omitempty"` - // TransferIds: The list of bank identifiers used for the transfer. For - // example, Trace ID for Federal Automated Clearing House (ACH). This may also - // be known as the Wire ID. - TransferIds []string `json:"transferIds,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndDate") 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. "EndDate") 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 SettlementReport) MarshalJSON() ([]byte, error) { - type NoMethod SettlementReport - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// SettlementTransaction: Settlement transactions give a detailed breakdown of -// the settlement report. -type SettlementTransaction struct { - // Amount: The amount for the transaction. - Amount *SettlementTransactionAmount `json:"amount,omitempty"` - // Identifiers: Identifiers of the transaction. - Identifiers *SettlementTransactionIdentifiers `json:"identifiers,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#settlementTransaction" - Kind string `json:"kind,omitempty"` - // Transaction: Details of the transaction. - Transaction *SettlementTransactionTransaction `json:"transaction,omitempty"` - // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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 SettlementTransaction) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransaction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementTransactionAmount struct { - Commission *SettlementTransactionAmountCommission `json:"commission,omitempty"` - // Description: The description of the event. Acceptable values are: - - // "taxWithhold" - "principal" - "principalAdjustment" - "shippingFee" - // - "merchantRemittedSalesTax" - "googleRemittedSalesTax" - - // "merchantCoupon" - "merchantCouponTax" - "merchantRemittedDisposalTax" - // - "googleRemittedDisposalTax" - "merchantRemittedRedemptionFee" - - // "googleRemittedRedemptionFee" - "eeeEcoFee" - "furnitureEcoFee" - - // "copyPrivateFee" - "eeeEcoFeeCommission" - "furnitureEcoFeeCommission" - // - "copyPrivateFeeCommission" - "principalRefund" - - // "principalRefundTax" - "itemCommission" - "adjustmentCommission" - - // "shippingFeeCommission" - "commissionRefund" - "damaged" - - // "damagedOrDefectiveItem" - "expiredItem" - "faultyItem" - - // "incorrectItemReceived" - "itemMissing" - "qualityNotExpected" - - // "receivedTooLate" - "storePackageMissing" - "transitPackageMissing" - - // "unsuccessfulDeliveryUndeliverable" - "wrongChargeInStore" - - // "wrongItem" - "returns" - "undeliverable" - - // "issueRelatedRefundAndReplacementAmountDescription" - - // "refundFromMerchant" - "returnLabelShippingFee" - "lumpSumCorrection" - // - "pspFee" - "principalRefundDoesNotFit" - - // "principalRefundOrderedWrongItem" - "principalRefundQualityNotExpected" - // - "principalRefundBetterPriceFound" - "principalRefundNoLongerNeeded" - - // "principalRefundChangedMind" - "principalRefundReceivedTooLate" - - // "principalRefundIncorrectItemReceived" - - // "principalRefundDamagedOrDefectiveItem" - - // "principalRefundDidNotMatchDescription" - "principalRefundExpiredItem" - Description string `json:"description,omitempty"` - // TransactionAmount: The amount that contributes to the line item price. - TransactionAmount *Price `json:"transactionAmount,omitempty"` - // Type: The type of the amount. Acceptable values are: - "itemPrice" - - // "orderPrice" - "refund" - "earlyRefund" - "courtesyRefund" - - // "returnRefund" - "returnLabelShippingFeeAmount" - - // "lumpSumCorrectionAmount" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Commission") 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. "Commission") 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 SettlementTransactionAmount) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransactionAmount - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementTransactionAmountCommission struct { - // Category: The category of the commission. Acceptable values are: - - // "animalsAndPetSupplies" - "dogCatFoodAndCatLitter" - - // "apparelAndAccessories" - "shoesHandbagsAndSunglasses" - - // "costumesAndAccessories" - "jewelry" - "watches" - - // "hobbiesArtsAndCrafts" - "homeAndGarden" - "entertainmentCollectibles" - // - "collectibleCoins" - "sportsCollectibles" - "sportingGoods" - - // "toysAndGames" - "musicalInstruments" - "giftCards" - - // "babyAndToddler" - "babyFoodWipesAndDiapers" - "businessAndIndustrial" - // - "camerasOpticsAndPhotography" - "consumerElectronics" - - // "electronicsAccessories" - "personalComputers" - "videoGameConsoles" - - // "foodAndGrocery" - "beverages" - "tobaccoProducts" - "furniture" - - // "hardware" - "buildingMaterials" - "tools" - "healthAndPersonalCare" - // - "beauty" - "householdSupplies" - "kitchenAndDining" - - // "majorAppliances" - "luggageAndBags" - "media" - "officeSupplies" - - // "softwareAndVideoGames" - "vehiclePartsAndAccessories" - - // "vehicleTiresAndWheels" - "vehicles" - "everythingElse" - Category string `json:"category,omitempty"` - // Rate: Rate of the commission in percentage. - Rate string `json:"rate,omitempty"` - // ForceSendFields is a list of field names (e.g. "Category") 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. "Category") 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 SettlementTransactionAmountCommission) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransactionAmountCommission - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementTransactionIdentifiers struct { - // AdjustmentId: The identifier of the adjustments, if it's available. - AdjustmentId string `json:"adjustmentId,omitempty"` - // MerchantOrderId: The merchant provided order ID. - MerchantOrderId string `json:"merchantOrderId,omitempty"` - // OrderItemId: The identifier of the item. - OrderItemId string `json:"orderItemId,omitempty"` - // SettlementEntryId: The unique ID of the settlement transaction entry. - SettlementEntryId string `json:"settlementEntryId,omitempty"` - // ShipmentIds: The shipment ids for the item. - ShipmentIds []string `json:"shipmentIds,omitempty"` - // TransactionId: The Google transaction ID. - TransactionId string `json:"transactionId,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdjustmentId") 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. "AdjustmentId") 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 SettlementTransactionIdentifiers) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransactionIdentifiers - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementTransactionTransaction struct { - // PostDate: The time on which the event occurred in ISO 8601 format. - PostDate string `json:"postDate,omitempty"` - // Type: The type of the transaction that occurred. Acceptable values are: - - // "order" - "reversal" - "orderRefund" - "reversalRefund" - - // "issueRelatedRefundAndReplacement" - "returnLabelShippingFeeTransaction" - // - "reversalIssueRelatedRefundAndReplacement" - - // "reversalReturnLabelShippingFeeTransaction" - - // "lumpSumCorrectionTransaction" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostDate") 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. "PostDate") 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 SettlementTransactionTransaction) MarshalJSON() ([]byte, error) { - type NoMethod SettlementTransactionTransaction - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementreportsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#settlementreportsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of returns. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*SettlementReport `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 SettlementreportsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod SettlementreportsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type SettlementtransactionsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#settlementtransactionsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of returns. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*SettlementTransaction `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 SettlementtransactionsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod SettlementtransactionsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShipmentInvoice struct { - // InvoiceSummary: [required] Invoice summary. - InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"` - // LineItemInvoices: [required] Invoice details per line item. - LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"` - // ShipmentGroupId: [required] ID of the shipment group. It is assigned by the - // merchant in the `shipLineItems` method and is used to group multiple line - // items that have the same kind of shipping charges. - ShipmentGroupId string `json:"shipmentGroupId,omitempty"` - // ForceSendFields is a list of field names (e.g. "InvoiceSummary") 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. "InvoiceSummary") 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 ShipmentInvoice) MarshalJSON() ([]byte, error) { - type NoMethod ShipmentInvoice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShipmentInvoiceLineItemInvoice struct { - // LineItemId: ID of the line item. Either lineItemId or productId must be set. - LineItemId string `json:"lineItemId,omitempty"` - // ProductId: ID of the product. This is the REST ID used in the products - // service. Either lineItemId or productId must be set. - ProductId string `json:"productId,omitempty"` - // ShipmentUnitIds: [required] The shipment unit ID is assigned by the merchant - // and defines individual quantities within a line item. The same ID can be - // assigned to units that are the same while units that differ must be assigned - // a different ID (for example: free or promotional units). - ShipmentUnitIds []string `json:"shipmentUnitIds,omitempty"` - // UnitInvoice: [required] Invoice details for a single unit. - UnitInvoice *UnitInvoice `json:"unitInvoice,omitempty"` - // ForceSendFields is a list of field names (e.g. "LineItemId") 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. "LineItemId") 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 ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) { - type NoMethod ShipmentInvoiceLineItemInvoice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShipmentTrackingInfo struct { - // Carrier: The shipping carrier that handles the package. Acceptable values - // are: - "boxtal" - "bpost" - "chronopost" - "colisPrive" - - // "colissimo" - "cxt" - "deliv" - "dhl" - "dpd" - "dynamex" - - // "eCourier" - "easypost" - "efw" - "fedex" - "fedexSmartpost" - - // "geodis" - "gls" - "googleCourier" - "gsx" - "jdLogistics" - - // "laPoste" - "lasership" - "manual" - "mpx" - "onTrac" - "other" - // - "tnt" - "uds" - "ups" - "usps" - Carrier string `json:"carrier,omitempty"` - // TrackingNumber: The tracking number for the package. - TrackingNumber string `json:"trackingNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") 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. "Carrier") 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 ShipmentTrackingInfo) MarshalJSON() ([]byte, error) { - type NoMethod ShipmentTrackingInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShippingSettings: The merchant account's shipping settings. All methods -// except getsupportedcarriers and getsupportedholidays require the admin role. -type ShippingSettings struct { - // AccountId: The ID of the account to which these account shipping settings - // belong. Ignored upon update, always present in get request responses. - AccountId uint64 `json:"accountId,omitempty,string"` - // PostalCodeGroups: A list of postal code groups that can be referred to in - // `services`. Optional. - PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` - // Services: The target account's list of services. Optional. - Services []*Service `json:"services,omitempty"` - // Warehouses: Optional. A list of warehouses which can be referred to in - // `services`. - Warehouses []*Warehouse `json:"warehouses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AccountId") 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. "AccountId") 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 ShippingSettings) MarshalJSON() ([]byte, error) { - type NoMethod ShippingSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsCustomBatchRequest struct { - // Entries: The request entries to be processed in the batch. - Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a single -// non-batch shippingsettings request. -type ShippingsettingsCustomBatchRequestEntry struct { - // AccountId: The ID of the account for which to get/update account shipping - // settings. - AccountId uint64 `json:"accountId,omitempty,string"` - // BatchId: An entry ID, unique within the batch request. - BatchId int64 `json:"batchId,omitempty"` - // MerchantId: The ID of the managing account. - MerchantId uint64 `json:"merchantId,omitempty,string"` - // Method: The method of the batch entry. Acceptable values are: - "get" - - // "update" - Method string `json:"method,omitempty"` - // ShippingSettings: The account shipping settings to update. Only defined if - // the method is `update`. - ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "AccountId") 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. "AccountId") 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 ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchRequestEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsCustomBatchResponse struct { - // Entries: The result of the execution of the batch requests. - Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsCustomBatchResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a single -// non-batch shipping settings response. -type ShippingsettingsCustomBatchResponseEntry struct { - // BatchId: The ID of the request entry to which this entry responds. - BatchId int64 `json:"batchId,omitempty"` - // Errors: A list of errors for failed custombatch entries. *Note:* Schema - // errors fail the whole request. - Errors *Errors `json:"errors,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsCustomBatchResponseEntry" - Kind string `json:"kind,omitempty"` - // ShippingSettings: The retrieved or updated account shipping settings. - ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` - // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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 ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsCustomBatchResponseEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsGetSupportedCarriersResponse struct { - // Carriers: A list of supported carriers. May be empty. - Carriers []*CarriersCarrier `json:"carriers,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedCarriersResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Carriers") 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. "Carriers") 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 ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedCarriersResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsGetSupportedHolidaysResponse struct { - // Holidays: A list of holidays applicable for delivery guarantees. May be - // empty. - Holidays []*HolidaysHoliday `json:"holidays,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedHolidaysResponse". - Kind string `json:"kind,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Holidays") 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. "Holidays") 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 ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedHolidaysResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsGetSupportedPickupServicesResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsGetSupportedPickupServicesResponse". - Kind string `json:"kind,omitempty"` - // PickupServices: A list of supported pickup services. May be empty. - PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsGetSupportedPickupServicesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ShippingsettingsListResponse struct { - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#shippingsettingsListResponse". - Kind string `json:"kind,omitempty"` - // NextPageToken: The token for the retrieval of the next page of shipping - // settings. - NextPageToken string `json:"nextPageToken,omitempty"` - Resources []*ShippingSettings `json:"resources,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ShippingsettingsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShoppingAdsProgramStatus: Response message for GetShoppingAdsProgramStatus. -type ShoppingAdsProgramStatus struct { - // GlobalState: State of the program. `ENABLED` if there are offers for at - // least one region. - // - // Possible values: - // "PROGRAM_STATE_UNSPECIFIED" - State is unknown. - // "NOT_ENABLED" - Program is not enabled for any country. - // "NO_OFFERS_UPLOADED" - No products have been uploaded for any region. - // Upload products to Merchant Center. - // "ENABLED" - Program is enabled and offers are uploaded for at least one - // country. - GlobalState string `json:"globalState,omitempty"` - // RegionStatuses: Status of the program in each region. Regions with the same - // status and review eligibility are grouped together in `regionCodes`. - RegionStatuses []*ShoppingAdsProgramStatusRegionStatus `json:"regionStatuses,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "GlobalState") 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. "GlobalState") 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 ShoppingAdsProgramStatus) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShoppingAdsProgramStatusRegionStatus: Status of program and region. -type ShoppingAdsProgramStatusRegionStatus struct { - // DisapprovalDate: Date by which eligibilityStatus will go from `WARNING` to - // `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In ISO - // 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. - DisapprovalDate string `json:"disapprovalDate,omitempty"` - // EligibilityStatus: Eligibility status of the Shopping Ads program. - // - // Possible values: - // "STATE_UNSPECIFIED" - State is not known. - // "APPROVED" - If the account has no issues and review is completed - // successfully. - // "DISAPPROVED" - There are one or more issues that needs to be resolved for - // account to be active for the program. Detailed list of account issues are - // available in - // [accountstatuses](https://developers.google.com/shopping-content/reference/re - // st/v2.1/accountstatuses) API. - // "WARNING" - If account has issues but offers are servable. Some of the - // issue can make account DISAPPROVED after a certain deadline. - // "UNDER_REVIEW" - Account is under review. - // "PENDING_REVIEW" - Account is waiting for review to start. - // "ONBOARDING" - Program is currently onboarding. Upload valid offers to - // complete onboarding. - EligibilityStatus string `json:"eligibilityStatus,omitempty"` - // OnboardingIssues: Issues that must be fixed to be eligible for review. - OnboardingIssues []string `json:"onboardingIssues,omitempty"` - // RegionCodes: The two-letter ISO 3166-1 alpha-2 - // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions - // with the same `eligibilityStatus` and `reviewEligibility`. - RegionCodes []string `json:"regionCodes,omitempty"` - // ReviewEligibilityStatus: If a program is eligible for review in a specific - // region. Only visible if `eligibilityStatus` is `DISAPPROVED`. - // - // Possible values: - // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility state is unknown. - // "ELIGIBLE" - Account is eligible for review for a specified region code. - // "INELIGIBLE" - Account is not eligible for review for a specified region - // code. - ReviewEligibilityStatus string `json:"reviewEligibilityStatus,omitempty"` - // ReviewIneligibilityReason: Review ineligibility reason if account is not - // eligible for review. - // - // Possible values: - // "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED" - Requesting a review from - // Google is not possible. - // "ONBOARDING_ISSUES" - All onboarding issues needs to be fixed. - // "NOT_ENOUGH_OFFERS" - Not enough offers uploaded for this country. - // "IN_COOLDOWN_PERIOD" - Cooldown period applies. Wait until cooldown period - // ends. - // "ALREADY_UNDER_REVIEW" - Account is already under review. - // "NO_REVIEW_REQUIRED" - No issues available to review. - // "WILL_BE_REVIEWED_AUTOMATICALLY" - Account will be automatically reviewed - // at the end of the grace period. - // "IS_RETIRED" - Account is retired. Should not appear in MC. - // "ALREADY_REVIEWED" - Account was already reviewd. - ReviewIneligibilityReason string `json:"reviewIneligibilityReason,omitempty"` - // ReviewIneligibilityReasonDescription: Reason a program in a specific region - // isn’t eligible for review. Only visible if `reviewEligibilityStatus` is - // `INELIGIBLE`. - ReviewIneligibilityReasonDescription string `json:"reviewIneligibilityReasonDescription,omitempty"` - // ReviewIneligibilityReasonDetails: Additional information for ineligibility. - // If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the - // end of the cooldown period is provided. - ReviewIneligibilityReasonDetails *ShoppingAdsProgramStatusReviewIneligibilityReasonDetails `json:"reviewIneligibilityReasonDetails,omitempty"` - // ReviewIssues: Issues evaluated in the review process. Fix all issues before - // requesting a review. - ReviewIssues []string `json:"reviewIssues,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisapprovalDate") 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. "DisapprovalDate") 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 ShoppingAdsProgramStatusRegionStatus) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatusRegionStatus - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ShoppingAdsProgramStatusReviewIneligibilityReasonDetails: Additional details -// for review ineligibility reasons. -type ShoppingAdsProgramStatusReviewIneligibilityReasonDetails struct { - // CooldownTime: This timestamp represents end of cooldown period for review - // ineligbility reason `IN_COOLDOWN_PERIOD`. - CooldownTime string `json:"cooldownTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CooldownTime") 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. "CooldownTime") 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 ShoppingAdsProgramStatusReviewIneligibilityReasonDetails) MarshalJSON() ([]byte, error) { - type NoMethod ShoppingAdsProgramStatusReviewIneligibilityReasonDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Table struct { - // ColumnHeaders: Headers of the table's columns. Optional: if not set then the - // table has only one dimension. - ColumnHeaders *Headers `json:"columnHeaders,omitempty"` - // Name: Name of the table. Required for subtables, ignored for the main table. - Name string `json:"name,omitempty"` - // RowHeaders: Headers of the table's rows. Required. - RowHeaders *Headers `json:"rowHeaders,omitempty"` - // Rows: The list of rows that constitute the table. Must have the same length - // as `rowHeaders`. Required. - Rows []*Row `json:"rows,omitempty"` - // ForceSendFields is a list of field names (e.g. "ColumnHeaders") 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. "ColumnHeaders") 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 Table) MarshalJSON() ([]byte, error) { - type NoMethod Table - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrder struct { - // DeliveryDetails: Overrides the predefined delivery details if provided. - DeliveryDetails *TestOrderDeliveryDetails `json:"deliveryDetails,omitempty"` - // EnableOrderinvoices: Whether the orderinvoices service should support this - // order. - EnableOrderinvoices bool `json:"enableOrderinvoices,omitempty"` - // Kind: Identifies what kind of resource this is. Value: the fixed string - // "content#testOrder" - Kind string `json:"kind,omitempty"` - // LineItems: Required. Line items that are ordered. At least one line item - // must be provided. - LineItems []*TestOrderLineItem `json:"lineItems,omitempty"` - // NotificationMode: Restricted. Do not use. - NotificationMode string `json:"notificationMode,omitempty"` - // PickupDetails: Overrides the predefined pickup details if provided. - PickupDetails *TestOrderPickupDetails `json:"pickupDetails,omitempty"` - // PredefinedBillingAddress: Required. The billing address. Acceptable values - // are: - "dwight" - "jim" - "pam" - PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"` - // PredefinedDeliveryAddress: Required. Identifier of one of the predefined - // delivery addresses for the delivery. Acceptable values are: - "dwight" - - // "jim" - "pam" - PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"` - // PredefinedEmail: Required. Email address of the customer. Acceptable values - // are: - "pog.dwight.schrute@gmail.com" - "pog.jim.halpert@gmail.com" - - // "penpog.pam.beesly@gmail.comding" - PredefinedEmail string `json:"predefinedEmail,omitempty"` - // PredefinedPickupDetails: Identifier of one of the predefined pickup details. - // Required for orders containing line items with shipping type `pickup`. - // Acceptable values are: - "dwight" - "jim" - "pam" - PredefinedPickupDetails string `json:"predefinedPickupDetails,omitempty"` - // Promotions: Promotions associated with the order. - Promotions []*OrderPromotion `json:"promotions,omitempty"` - // ShippingCost: Required. The price of shipping for all items. Shipping tax is - // automatically calculated for orders where marketplace facilitator tax laws - // are applicable. Otherwise, tax settings from Merchant Center are applied. - // Note that shipping is not taxed in certain states. - ShippingCost *Price `json:"shippingCost,omitempty"` - // ShippingOption: Required. The requested shipping option. Acceptable values - // are: - "economy" - "expedited" - "oneDay" - "sameDay" - "standard" - // - "twoDay" - ShippingOption string `json:"shippingOption,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeliveryDetails") 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. "DeliveryDetails") 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 TestOrder) MarshalJSON() ([]byte, error) { - type NoMethod TestOrder - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderAddress struct { - // Country: CLDR country code (for example, "US"). - Country string `json:"country,omitempty"` - // FullAddress: Strings representing the lines of the printed label for mailing - // the order, for example: John Smith 1600 Amphitheatre Parkway Mountain View, - // CA, 94043 United States - FullAddress []string `json:"fullAddress,omitempty"` - // IsPostOfficeBox: Whether the address is a post office box. - IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"` - // Locality: City, town or commune. May also include dependent localities or - // sublocalities (for example, neighborhoods or suburbs). - Locality string `json:"locality,omitempty"` - // PostalCode: Postal Code or ZIP (for example, "94043"). - PostalCode string `json:"postalCode,omitempty"` - // RecipientName: Name of the recipient. - RecipientName string `json:"recipientName,omitempty"` - // Region: Top-level administrative subdivision of the country. For example, a - // state like California ("CA") or a province like Quebec ("QC"). - Region string `json:"region,omitempty"` - // StreetAddress: Street-level part of the address. Use `\n` to add a second - // line. - StreetAddress []string `json:"streetAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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 TestOrderAddress) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderAddress - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderDeliveryDetails struct { - // Address: The delivery address - Address *TestOrderAddress `json:"address,omitempty"` - // IsScheduledDelivery: Whether the order is scheduled delivery order. - IsScheduledDelivery bool `json:"isScheduledDelivery,omitempty"` - // PhoneNumber: The phone number of the person receiving the delivery. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Address") 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. "Address") 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 TestOrderDeliveryDetails) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderDeliveryDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderLineItem struct { - // Product: Required. Product data from the time of the order placement. - Product *TestOrderLineItemProduct `json:"product,omitempty"` - // QuantityOrdered: Required. Number of items ordered. - QuantityOrdered int64 `json:"quantityOrdered,omitempty"` - // ReturnInfo: Required. Details of the return policy for the line item. - ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"` - // ShippingDetails: Required. Details of the requested shipping for the line - // item. - ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"` - // ForceSendFields is a list of field names (e.g. "Product") 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. "Product") 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 TestOrderLineItem) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderLineItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderLineItemProduct struct { - // Brand: Required. Brand of the item. - Brand string `json:"brand,omitempty"` - // Condition: Required. Condition or state of the item. Acceptable values are: - // - "new" - Condition string `json:"condition,omitempty"` - // ContentLanguage: Required. The two-letter ISO 639-1 language code for the - // item. Acceptable values are: - "en" - "fr" - ContentLanguage string `json:"contentLanguage,omitempty"` - // Fees: Fees for the item. Optional. - Fees []*OrderLineItemProductFee `json:"fees,omitempty"` - // Gtin: Global Trade Item Number (GTIN) of the item. Optional. - Gtin string `json:"gtin,omitempty"` - // ImageLink: Required. URL of an image of the item. - ImageLink string `json:"imageLink,omitempty"` - // ItemGroupId: Shared identifier for all variants of the same product. - // Optional. - ItemGroupId string `json:"itemGroupId,omitempty"` - // Mpn: Manufacturer Part Number (MPN) of the item. Optional. - Mpn string `json:"mpn,omitempty"` - // OfferId: Required. An identifier of the item. - OfferId string `json:"offerId,omitempty"` - // Price: Required. The price for the product. Tax is automatically calculated - // for orders where marketplace facilitator tax laws are applicable. Otherwise, - // tax settings from Merchant Center are applied. - Price *Price `json:"price,omitempty"` - // TargetCountry: Required. The CLDR territory code of the target country of - // the product. - TargetCountry string `json:"targetCountry,omitempty"` - // Title: Required. The title of the product. - Title string `json:"title,omitempty"` - // VariantAttributes: Variant attributes for the item. Optional. - VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") 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 TestOrderLineItemProduct) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderLineItemProduct - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderPickupDetails struct { - // LocationCode: Required. Code of the location defined by provider or - // merchant. - LocationCode string `json:"locationCode,omitempty"` - // PickupLocationAddress: Required. Pickup location address. - PickupLocationAddress *TestOrderAddress `json:"pickupLocationAddress,omitempty"` - // PickupLocationType: Pickup location type. Acceptable values are: - - // "locker" - "store" - "curbside" - PickupLocationType string `json:"pickupLocationType,omitempty"` - // PickupPersons: Required. all pickup persons set by users. - PickupPersons []*TestOrderPickupDetailsPickupPerson `json:"pickupPersons,omitempty"` - // ForceSendFields is a list of field names (e.g. "LocationCode") 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. "LocationCode") 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 TestOrderPickupDetails) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderPickupDetails - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TestOrderPickupDetailsPickupPerson struct { - // Name: Required. Full name of the pickup person. - Name string `json:"name,omitempty"` - // PhoneNumber: Required. The phone number of the person picking up the items. - PhoneNumber string `json:"phoneNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") 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. "Name") 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 TestOrderPickupDetailsPickupPerson) MarshalJSON() ([]byte, error) { - type NoMethod TestOrderPickupDetailsPickupPerson - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TextWithTooltip: Block of text that may contain a tooltip with more -// information. -type TextWithTooltip struct { - // SimpleTooltipValue: Value of the tooltip as a simple text. - SimpleTooltipValue string `json:"simpleTooltipValue,omitempty"` - // SimpleValue: Value of the message as a simple text. - SimpleValue string `json:"simpleValue,omitempty"` - // TooltipIconStyle: The suggested type of an icon for tooltip, if a tooltip is - // present. - // - // Possible values: - // "TOOLTIP_ICON_STYLE_UNSPECIFIED" - Default value. Will never be provided - // by the API. - // "INFO" - Used when the tooltip adds additional information to the context, - // the 'i' can be used as an icon. - // "QUESTION" - Used when the tooltip shows helpful information, the '?' can - // be used as an icon. - TooltipIconStyle string `json:"tooltipIconStyle,omitempty"` - // ForceSendFields is a list of field names (e.g. "SimpleTooltipValue") 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. "SimpleTooltipValue") 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 TextWithTooltip) MarshalJSON() ([]byte, error) { - type NoMethod TextWithTooltip - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TimePeriod: A message that represents a time period. -type TimePeriod struct { - // EndTime: The ending timestamp. - EndTime string `json:"endTime,omitempty"` - // StartTime: The starting timestamp. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 TimePeriod) MarshalJSON() ([]byte, error) { - type NoMethod TimePeriod - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TimeZone: Represents a time zone from the IANA Time Zone Database -// (https://www.iana.org/time-zones). -type TimeZone struct { - // Id: IANA Time Zone Database time zone, e.g. "America/New_York". - Id string `json:"id,omitempty"` - // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". - Version string `json:"version,omitempty"` - // 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 TimeZone) MarshalJSON() ([]byte, error) { - type NoMethod TimeZone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TopicTrends: Topic trends fields requested by the merchant in the query. -// Field values are only set if the merchant queries `TopicTrendsView`. -// Forecast data can be queried up to 13 weeks by passing a future date in the -// `date` field. Historical data is measured daily, and forecasted data is -// projected weekly. All data points are normalized based on the highest data -// points returned in the response. If you make separate queries with different -// date ranges, you might see different values for the same date in each -// response. The recommended way to get a trend score of a topic is -// `last7_days_search_interest / last{$day}_days_search_interest - 1`. You can -// view trends for up to eight topics at a time. -type TopicTrends struct { - // CustomerCountryCode: Country trends are calculated for. Must be a two-letter - // country code (ISO 3166-1-alpha-2 code), for example, `“US”`. - CustomerCountryCode string `json:"customerCountryCode,omitempty"` - // Date: Date the trend score was retrieved. - Date *Date `json:"date,omitempty"` - // Last120DaysSearchInterest: Search interest in the last 120 days, with the - // same normalization as search_interest. This field is only present for a past - // date. - Last120DaysSearchInterest float64 `json:"last120DaysSearchInterest,omitempty"` - // Last30DaysSearchInterest: Search interest in the last 30 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last30DaysSearchInterest float64 `json:"last30DaysSearchInterest,omitempty"` - // Last7DaysSearchInterest: Search interest in the last 7 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last7DaysSearchInterest float64 `json:"last7DaysSearchInterest,omitempty"` - // Last90DaysSearchInterest: Search interest in the last 90 days, with the same - // normalization as search_interest. This field is only present for a past - // date. - Last90DaysSearchInterest float64 `json:"last90DaysSearchInterest,omitempty"` - // Next7DaysSearchInterest: Estimated search interest in the next 7 days, with - // the same normalization as search_interest. This field is only present for a - // future date. - Next7DaysSearchInterest float64 `json:"next7DaysSearchInterest,omitempty"` - // SearchInterest: Daily search interest, normalized to the time and country to - // make comparisons easier, with 100 representing peak popularity (from 0 to - // 100) for the requested time period and location. - SearchInterest float64 `json:"searchInterest,omitempty"` - // Topic: Google-provided topic trends are calculated for. Only top eight - // topics are returned. Topic is what shoppers are searching for on Google, - // grouped by the same concept. - Topic string `json:"topic,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomerCountryCode") 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. "CustomerCountryCode") 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 TopicTrends) MarshalJSON() ([]byte, error) { - type NoMethod TopicTrends - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *TopicTrends) UnmarshalJSON(data []byte) error { - type NoMethod TopicTrends - var s1 struct { - Last120DaysSearchInterest gensupport.JSONFloat64 `json:"last120DaysSearchInterest"` - Last30DaysSearchInterest gensupport.JSONFloat64 `json:"last30DaysSearchInterest"` - Last7DaysSearchInterest gensupport.JSONFloat64 `json:"last7DaysSearchInterest"` - Last90DaysSearchInterest gensupport.JSONFloat64 `json:"last90DaysSearchInterest"` - Next7DaysSearchInterest gensupport.JSONFloat64 `json:"next7DaysSearchInterest"` - SearchInterest gensupport.JSONFloat64 `json:"searchInterest"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Last120DaysSearchInterest = float64(s1.Last120DaysSearchInterest) - s.Last30DaysSearchInterest = float64(s1.Last30DaysSearchInterest) - s.Last7DaysSearchInterest = float64(s1.Last7DaysSearchInterest) - s.Last90DaysSearchInterest = float64(s1.Last90DaysSearchInterest) - s.Next7DaysSearchInterest = float64(s1.Next7DaysSearchInterest) - s.SearchInterest = float64(s1.SearchInterest) - return nil -} - -type TransitTable struct { - // PostalCodeGroupNames: A list of postal group names. The last value can be - // "all other locations". Example: `["zone 1", "zone 2", "all other - // locations"]`. The referred postal code groups must match the delivery - // country of the service. - PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` - Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` - // TransitTimeLabels: A list of transit time labels. The last value can be - // "all other labels". Example: `["food", "electronics", "all other - // labels"]`. - TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "PostalCodeGroupNames") 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. "PostalCodeGroupNames") 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 TransitTable) MarshalJSON() ([]byte, error) { - type NoMethod TransitTable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TransitTableTransitTimeRow struct { - Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "Values") 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. "Values") 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 TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { - type NoMethod TransitTableTransitTimeRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type TransitTableTransitTimeRowTransitTimeValue struct { - // MaxTransitTimeInDays: Must be greater than or equal to - // `minTransitTimeInDays`. - MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` - // MinTransitTimeInDays: Transit time range (min-max) in business days. 0 means - // same day delivery, 1 means next day delivery. - MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxTransitTimeInDays") 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. "MaxTransitTimeInDays") 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 TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { - type NoMethod TransitTableTransitTimeRowTransitTimeValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TriggerActionPayload: The payload for the triggered action. -type TriggerActionPayload struct { - // ActionContext: Required. The context from the selected action. The value is - // obtained from rendered issues and needs to be sent back to identify the - // action that is being triggered. - ActionContext string `json:"actionContext,omitempty"` - // ActionInput: Required. Input provided by the merchant. - ActionInput *ActionInput `json:"actionInput,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActionContext") 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. "ActionContext") 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 TriggerActionPayload) MarshalJSON() ([]byte, error) { - type NoMethod TriggerActionPayload - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// TriggerActionResponse: Response informing about the started action. -type TriggerActionResponse struct { - // Message: The message for merchant. - Message string `json:"message,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Message") 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. "Message") 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 TriggerActionResponse) MarshalJSON() ([]byte, error) { - type NoMethod TriggerActionResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UndeleteConversionSourceRequest: Request message for the -// UndeleteConversionSource method. -type UndeleteConversionSourceRequest struct { -} - -type UnitInvoice struct { - // AdditionalCharges: Additional charges for a unit, for example, shipping - // costs. - AdditionalCharges []*UnitInvoiceAdditionalCharge `json:"additionalCharges,omitempty"` - // UnitPrice: [required] Pre-tax or post-tax price of one unit depending on the - // locality of the order. *Note:* Invoicing works on a per unit basis. The - // `unitPrice` is the price of a single unit, and will be multiplied by the - // number of entries in `shipmentUnitId`. - UnitPrice *Price `json:"unitPrice,omitempty"` - // UnitPriceTaxes: Tax amounts to apply to the unit price. - UnitPriceTaxes []*UnitInvoiceTaxLine `json:"unitPriceTaxes,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalCharges") 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. "AdditionalCharges") 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 UnitInvoice) MarshalJSON() ([]byte, error) { - type NoMethod UnitInvoice - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UnitInvoiceAdditionalCharge struct { - // AdditionalChargeAmount: [required] Amount of the additional charge per unit. - // *Note:* Invoicing works on a per unit bases. The `additionalChargeAmount` is - // the amount charged per unit, and will be multiplied by the number of entries - // in `shipmentUnitID`. - AdditionalChargeAmount *Amount `json:"additionalChargeAmount,omitempty"` - // Type: [required] Type of the additional charge. Acceptable values are: - - // "shipping" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalChargeAmount") 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. "AdditionalChargeAmount") 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 UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) { - type NoMethod UnitInvoiceAdditionalCharge - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type UnitInvoiceTaxLine struct { - // TaxAmount: [required] Tax amount for the tax type. - TaxAmount *Price `json:"taxAmount,omitempty"` - // TaxName: Optional name of the tax type. This should only be provided if - // `taxType` is `otherFeeTax`. - TaxName string `json:"taxName,omitempty"` - // TaxType: [required] Type of the tax. Acceptable values are: - "otherFee" - - // "otherFeeTax" - "sales" - TaxType string `json:"taxType,omitempty"` - // ForceSendFields is a list of field names (e.g. "TaxAmount") 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. "TaxAmount") 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 UnitInvoiceTaxLine) MarshalJSON() ([]byte, error) { - type NoMethod UnitInvoiceTaxLine - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// UrlSettings: Specifications related to the `Checkout` URL. The `UriTemplate` -// is of the form `https://www.mystore.com/checkout?item_id={id}` where `{id}` -// will be automatically replaced with data from the merchant account with this -// attribute offer_id -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id) -type UrlSettings struct { - // CartUriTemplate: URL template when the placeholders are expanded will - // redirect the buyer to the cart page on the merchant website with the - // selected item in cart. - CartUriTemplate string `json:"cartUriTemplate,omitempty"` - // CheckoutUriTemplate: URL template when the placeholders are expanded will - // redirect the buyer to the merchant checkout page with the item in the cart. - CheckoutUriTemplate string `json:"checkoutUriTemplate,omitempty"` - // ForceSendFields is a list of field names (e.g. "CartUriTemplate") 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. "CartUriTemplate") 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 UrlSettings) MarshalJSON() ([]byte, error) { - type NoMethod UrlSettings - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Value: The single value of a rate group or the value of a rate group table's -// cell. Exactly one of `noShipping`, `flatRate`, `pricePercentage`, -// `carrierRateName`, `subtableName` must be set. -type Value struct { - // CarrierRateName: The name of a carrier rate referring to a carrier rate - // defined in the same rate group. Can only be set if all other fields are not - // set. - CarrierRateName string `json:"carrierRateName,omitempty"` - // FlatRate: A flat rate. Can only be set if all other fields are not set. - FlatRate *Price `json:"flatRate,omitempty"` - // NoShipping: If true, then the product can't ship. Must be true when set, can - // only be set if all other fields are not set. - NoShipping bool `json:"noShipping,omitempty"` - // PricePercentage: A percentage of the price represented as a number in - // decimal notation (for example, "5.4"). Can only be set if all other fields - // are not set. - PricePercentage string `json:"pricePercentage,omitempty"` - // SubtableName: The name of a subtable. Can only be set in table cells (not - // for single values), and only if all other fields are not set. - SubtableName string `json:"subtableName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CarrierRateName") 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. "CarrierRateName") 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 Value) MarshalJSON() ([]byte, error) { - type NoMethod Value - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VerifyPhoneNumberRequest: Request message for the VerifyPhoneNumber method. -type VerifyPhoneNumberRequest struct { - // PhoneVerificationMethod: Verification method used to receive verification - // code. - // - // Possible values: - // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. - // "SMS" - Receive verification code by SMS. - // "PHONE_CALL" - Receive verification code by phone call. - PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` - // VerificationCode: The verification code that was sent to the phone number - // for validation. - VerificationCode string `json:"verificationCode,omitempty"` - // VerificationId: The verification ID returned by `requestphoneverification`. - VerificationId string `json:"verificationId,omitempty"` - // ForceSendFields is a list of field names (e.g. "PhoneVerificationMethod") 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. "PhoneVerificationMethod") 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 VerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) { - type NoMethod VerifyPhoneNumberRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// VerifyPhoneNumberResponse: Response message for the VerifyPhoneNumber -// method. -type VerifyPhoneNumberResponse struct { - // VerifiedPhoneNumber: Verified phone number if verification is successful. - // This phone number can only be replaced by another verified phone number. - VerifiedPhoneNumber string `json:"verifiedPhoneNumber,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "VerifiedPhoneNumber") 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. "VerifiedPhoneNumber") 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 VerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) { - type NoMethod VerifyPhoneNumberResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Warehouse: A fulfillment warehouse, which stores and handles inventory. -type Warehouse struct { - // BusinessDayConfig: Business days of the warehouse. If not set, will be - // Monday to Friday by default. - BusinessDayConfig *BusinessDayConfig `json:"businessDayConfig,omitempty"` - // CutoffTime: Required. The latest time of day that an order can be accepted - // and begin processing. Later orders will be processed in the next day. The - // time is based on the warehouse postal code. - CutoffTime *WarehouseCutoffTime `json:"cutoffTime,omitempty"` - // HandlingDays: Required. The number of days it takes for this warehouse to - // pack up and ship an item. This is on the warehouse level, but can be - // overridden on the offer level based on the attributes of an item. - HandlingDays int64 `json:"handlingDays,omitempty,string"` - // Name: Required. The name of the warehouse. Must be unique within account. - Name string `json:"name,omitempty"` - // ShippingAddress: Required. Shipping address of the warehouse. - ShippingAddress *Address `json:"shippingAddress,omitempty"` - // ForceSendFields is a list of field names (e.g. "BusinessDayConfig") 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. "BusinessDayConfig") 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 Warehouse) MarshalJSON() ([]byte, error) { - type NoMethod Warehouse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WarehouseBasedDeliveryTime struct { - // Carrier: Required. Carrier, such as "UPS" or "Fedex". The list of - // supported carriers can be retrieved through the `listSupportedCarriers` - // method. - Carrier string `json:"carrier,omitempty"` - // CarrierService: Required. Carrier service, such as "ground" or "2 days". - // The list of supported services for a carrier can be retrieved through the - // `listSupportedCarriers` method. The name of the service must be in the - // eddSupportedServices list. - CarrierService string `json:"carrierService,omitempty"` - // OriginAdministrativeArea: Shipping origin's state. - OriginAdministrativeArea string `json:"originAdministrativeArea,omitempty"` - // OriginCity: Shipping origin's city. - OriginCity string `json:"originCity,omitempty"` - // OriginCountry: Shipping origin's country represented as a CLDR territory - // code (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). - OriginCountry string `json:"originCountry,omitempty"` - // OriginPostalCode: Shipping origin. - OriginPostalCode string `json:"originPostalCode,omitempty"` - // OriginStreetAddress: Shipping origin's street address. - OriginStreetAddress string `json:"originStreetAddress,omitempty"` - // WarehouseName: The name of the warehouse. Warehouse name need to be matched - // with name. If warehouseName is set, the below fields will be ignored. The - // warehouse info will be read from warehouse. - WarehouseName string `json:"warehouseName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Carrier") 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. "Carrier") 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 WarehouseBasedDeliveryTime) MarshalJSON() ([]byte, error) { - type NoMethod WarehouseBasedDeliveryTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type WarehouseCutoffTime struct { - // Hour: Required. Hour (24-hour clock) of the cutoff time until which an order - // has to be placed to be processed in the same day by the warehouse. Hour is - // based on the timezone of warehouse. - Hour int64 `json:"hour,omitempty"` - // Minute: Required. Minute of the cutoff time until which an order has to be - // placed to be processed in the same day by the warehouse. Minute is based on - // the timezone of warehouse. - Minute int64 `json:"minute,omitempty"` - // ForceSendFields is a list of field names (e.g. "Hour") 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. "Hour") 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 WarehouseCutoffTime) MarshalJSON() ([]byte, error) { - type NoMethod WarehouseCutoffTime - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type Weight struct { - // Unit: Required. The weight unit. Acceptable values are: - "kg" - "lb" - Unit string `json:"unit,omitempty"` - // Value: Required. The weight represented as a number. The weight can have a - // maximum precision of four decimal places. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 Weight) MarshalJSON() ([]byte, error) { - type NoMethod Weight - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type AccountsAuthinfoCall struct { - s *APIService - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Authinfo: Returns information about the authenticated user. -func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { - c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} - 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 *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { - 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 *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { - 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 *AccountsAuthinfoCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.authinfo" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsAuthInfoResponse.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 *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, 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 := &AccountsAuthInfoResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type AccountsClaimwebsiteCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Claimwebsite: Claims the website of a Merchant Center sub-account. Merchant -// accounts with approved third-party CSSs aren't required to claim a website. -// -// - accountId: The ID of the account whose website is claimed. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { - c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Overwrite sets the optional parameter "overwrite": Only available to -// selected merchants, for example multi-client accounts (MCAs) and their -// sub-accounts. When set to `True`, this option removes any existing claim on -// the requested website and replaces it with a claim from the account that -// makes the request. -func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { - c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) - 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 *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { - 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 *AccountsClaimwebsiteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.claimwebsite" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsClaimWebsiteResponse.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 *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, 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 := &AccountsClaimWebsiteResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type AccountsCustombatchCall struct { - s *APIService - accountscustombatchrequest *AccountsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Custombatch: Retrieves, inserts, updates, and deletes multiple Merchant -// Center (sub-)accounts in a single request. -func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { - c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountscustombatchrequest = accountscustombatchrequest - 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 *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { - 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 *AccountsCustombatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.custombatch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsCustomBatchResponse.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 *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, 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 := &AccountsCustomBatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type AccountsDeleteCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Merchant Center sub-account. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. This must be a multi-client -// account, and accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { - c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Force sets the optional parameter "force": Option to delete sub-accounts -// with products. The default value is false. -func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - 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 *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { - c.ctx_ = ctx - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AdditionalImageLinks") 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. "AdditionalImageLinks") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s Product) MarshalJSON() ([]byte, error) { + type NoMethod Product + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err +func (s *Product) UnmarshalJSON(data []byte) error { + type NoMethod Product + var s1 struct { + DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"` + *NoMethod } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accounts.delete" call. -func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { return err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } + s.DisplayAdsValue = float64(s1.DisplayAdsValue) return nil } -type AccountsGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Retrieves a Merchant Center account. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { - c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c -} - -// View sets the optional parameter "view": Controls which fields will be -// populated. Acceptable values are: "merchant" and "css". The default value is -// "merchant". -// -// Possible values: -// -// "MERCHANT" - Default. View is populated with Merchant Center fields. -// "CSS" - View is populated with Comparison Shopping Services fields. -func (c *AccountsGetCall) View(view string) *AccountsGetCall { - c.urlParams_.Set("view", view) - return c +// ProductCertification: Product certification +// (https://support.google.com/merchants/answer/13528839), introduced for EU +// energy efficiency labeling compliance using the EU EPREL +// (https://eprel.ec.europa.eu/screen/home) database. +type ProductCertification struct { + // CertificationAuthority: The certification authority, for example + // "European_Commission". Maximum length is 2000 characters. + CertificationAuthority string `json:"certificationAuthority,omitempty"` + // CertificationCode: The certification code, for eaxample "123456". Maximum + // length is 2000 characters. + CertificationCode string `json:"certificationCode,omitempty"` + // CertificationName: The name of the certification, for example "EPREL". + // Maximum length is 2000 characters. + CertificationName string `json:"certificationName,omitempty"` + // CertificationValue: The certification value (also known as class, level or + // grade), for example "A+", "C", "gold". Maximum length is 2000 characters. + CertificationValue string `json:"certificationValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "CertificationAuthority") 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. "CertificationAuthority") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ProductCertification) MarshalJSON() ([]byte, error) { + type NoMethod ProductCertification + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { - c.ifNoneMatch_ = entityTag - return c +// ProductCluster: Product cluster fields. A product cluster is a grouping for +// different offers that represent the same product. Values are only set for +// fields requested explicitly in the request's search query. +type ProductCluster struct { + // Brand: Brand of the product cluster. + Brand string `json:"brand,omitempty"` + // BrandInventoryStatus: Tells if there is at least one product of the brand + // currently `IN_STOCK` in your product feed across multiple countries, all + // products are `OUT_OF_STOCK` in your product feed, or `NOT_IN_INVENTORY`. The + // field doesn't take the Best Sellers report country filter into account. + // + // Possible values: + // "INVENTORY_STATUS_UNSPECIFIED" - Inventory status is unknown. + // "IN_STOCK" - Merchant has a product for this product cluster or brand in + // stock. + // "OUT_OF_STOCK" - Merchant has a product for this product cluster or brand + // in inventory but it is currently out of stock. + // "NOT_IN_INVENTORY" - Merchant does not have a product for this product + // cluster or brand in inventory. + BrandInventoryStatus string `json:"brandInventoryStatus,omitempty"` + // CategoryL1: Product category (1st level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL1 string `json:"categoryL1,omitempty"` + // CategoryL2: Product category (2nd level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL2 string `json:"categoryL2,omitempty"` + // CategoryL3: Product category (3rd level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL3 string `json:"categoryL3,omitempty"` + // CategoryL4: Product category (4th level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL4 string `json:"categoryL4,omitempty"` + // CategoryL5: Product category (5th level) of the product cluster, represented + // in Google's product taxonomy. + CategoryL5 string `json:"categoryL5,omitempty"` + // InventoryStatus: Tells whether the product cluster is `IN_STOCK` in your + // product feed across multiple countries, `OUT_OF_STOCK` in your product feed, + // or `NOT_IN_INVENTORY` at all. The field doesn't take the Best Sellers report + // country filter into account. + // + // Possible values: + // "INVENTORY_STATUS_UNSPECIFIED" - Inventory status is unknown. + // "IN_STOCK" - Merchant has a product for this product cluster or brand in + // stock. + // "OUT_OF_STOCK" - Merchant has a product for this product cluster or brand + // in inventory but it is currently out of stock. + // "NOT_IN_INVENTORY" - Merchant does not have a product for this product + // cluster or brand in inventory. + InventoryStatus string `json:"inventoryStatus,omitempty"` + // Title: Title of the product cluster. + Title string `json:"title,omitempty"` + // VariantGtins: GTINs of example variants of the product cluster. + VariantGtins []string `json:"variantGtins,omitempty"` + // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { - c.ctx_ = ctx - return c +func (s ProductCluster) MarshalJSON() ([]byte, error) { + type NoMethod ProductCluster + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} +// ProductDeliveryTime: The estimated days to deliver a product after an order +// is placed. Only authorized shipping signals partners working with a merchant +// can use this resource. Merchants should use the `products` +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#productshipping) +// resource instead. +type ProductDeliveryTime struct { + // AreaDeliveryTimes: Required. A set of associations between `DeliveryArea` + // and `DeliveryTime` entries. The total number of `areaDeliveryTimes` can be + // at most 100. + AreaDeliveryTimes []*ProductDeliveryTimeAreaDeliveryTime `json:"areaDeliveryTimes,omitempty"` + // ProductId: Required. The `id` of the product. + ProductId *ProductId `json:"productId,omitempty"` -func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AreaDeliveryTimes") 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. "AreaDeliveryTimes") 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:"-"` } -// Do executes the "content.accounts.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Account.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 *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, 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 := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod ProductDeliveryTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsInsertCall struct { - s *APIService - merchantId uint64 - account *Account - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// ProductDeliveryTimeAreaDeliveryTime: A pairing of `DeliveryArea` associated +// with a `DeliveryTime` for this product. +type ProductDeliveryTimeAreaDeliveryTime struct { + // DeliveryArea: Required. The delivery area associated with `deliveryTime` for + // this product. + DeliveryArea *DeliveryArea `json:"deliveryArea,omitempty"` + // DeliveryTime: Required. The delivery time associated with `deliveryArea` for + // this product. + DeliveryTime *ProductDeliveryTimeAreaDeliveryTimeDeliveryTime `json:"deliveryTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeliveryArea") 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. "DeliveryArea") 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:"-"` } -// Insert: Creates a Merchant Center sub-account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { - c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.account = account - return c +func (s ProductDeliveryTimeAreaDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod ProductDeliveryTimeAreaDeliveryTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductDeliveryTimeAreaDeliveryTimeDeliveryTime: A delivery time for this +// product. +type ProductDeliveryTimeAreaDeliveryTimeDeliveryTime struct { + // MaxHandlingTimeDays: Required. The maximum number of business days + // (inclusive) between when an order is placed and when the product ships. If a + // product ships in the same day, set this value to 0. + MaxHandlingTimeDays int64 `json:"maxHandlingTimeDays,omitempty"` + // MaxTransitTimeDays: Required. The maximum number of business days + // (inclusive) between when the product ships and when the product is + // delivered. + MaxTransitTimeDays int64 `json:"maxTransitTimeDays,omitempty"` + // MinHandlingTimeDays: Required. The minimum number of business days + // (inclusive) between when an order is placed and when the product ships. If a + // product ships in the same day, set this value to 0. + MinHandlingTimeDays int64 `json:"minHandlingTimeDays,omitempty"` + // MinTransitTimeDays: Required. The minimum number of business days + // (inclusive) between when the product ships and when the product is + // delivered. + MinTransitTimeDays int64 `json:"minTransitTimeDays,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxHandlingTimeDays") 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. "MaxHandlingTimeDays") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { - c.ctx_ = ctx - return c +func (s ProductDeliveryTimeAreaDeliveryTimeDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod ProductDeliveryTimeAreaDeliveryTimeDeliveryTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ProductDimension struct { + // Unit: Required. The length units. Acceptable values are: - "in" - "cm" + Unit string `json:"unit,omitempty"` + // Value: Required. The length value represented as a number. The value can + // have a maximum precision of four decimal places. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductDimension) MarshalJSON() ([]byte, error) { + type NoMethod ProductDimension + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Account.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 *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, 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 := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, +func (s *ProductDimension) UnmarshalJSON(data []byte) error { + type NoMethod ProductDimension + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err } - return ret, nil -} - -type AccountsLinkCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accountslinkrequest *AccountsLinkRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Link: Performs an action on a link between two Merchant Center accounts, -// namely accountId and linkedAccountId. -// -// - accountId: The ID of the account that should be linked. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { - c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.accountslinkrequest = accountslinkrequest - return c + s.Value = float64(s1.Value) + return nil } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductId: The Content API ID of the product. +type ProductId struct { + // ProductId: The Content API ID of the product, in the form + // `channel:contentLanguage:targetCountry:offerId`. + ProductId string `json:"productId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductId") 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. "ProductId") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { - c.ctx_ = ctx - return c +func (s ProductId) MarshalJSON() ([]byte, error) { + type NoMethod ProductId + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLinkCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// ProductIssue: An issue affecting specific product. +type ProductIssue struct { + // Actions: A list of actionable steps that can be executed to solve the issue. + // An example is requesting a re-review or providing arguments when merchant + // disagrees with the issue. Actions that are supported in (your) third-party + // application can be rendered as buttons and should be available to merchant + // when they expand the issue. + Actions []*Action `json:"actions,omitempty"` + // Impact: Clarifies the severity of the issue. The summarizing message, if + // present, should be shown right under the title for each issue. It helps + // merchants to quickly understand the impact of the issue. The detailed + // breakdown helps the merchant to fully understand the impact of the issue. It + // can be rendered as dialog that opens when the merchant mouse over the + // summarized impact statement. Issues with different severity can be styled + // differently. They may use a different color or icon to signal the difference + // between `ERROR`, `WARNING` and `INFO`. + Impact *ProductIssueImpact `json:"impact,omitempty"` + // PrerenderedContent: Details of the issue as a pre-rendered HTML. HTML + // elements contain CSS classes that can be used to customize the style of the + // content. Always sanitize the HTML before embedding it directly to your + // application. The sanitizer needs to allow basic HTML tags, such as: `div`, + // `span`, `p`, `a`, `ul`, `li`, `table`, `tr`, `td`. For example, you can use + // DOMPurify (https://www.npmjs.com/package/dompurify). CSS classes: * + // `issue-detail` - top level container for the detail of the issue * + // `callout-banners` - section of the `issue-detail` with callout banners * + // `callout-banner` - single callout banner, inside `callout-banners` * + // `callout-banner-info` - callout with important information (default) * + // `callout-banner-warning` - callout with a warning * `callout-banner-error` - + // callout informing about an error (most severe) * `issue-content` - section + // of the `issue-detail`, contains multiple `content-element` * + // `content-element` - content element such as a list, link or paragraph, + // inside `issue-content` * `root-causes` - unordered list with items + // describing root causes of the issue, inside `issue-content` * + // `root-causes-intro` - intro text before the `root-causes` list, inside + // `issue-content` * `segment` - section of the text, `span` inside paragraph * + // `segment-attribute` - section of the text that represents a product + // attribute, for example 'image\_link' * `segment-literal` - section of the + // text that contains a special value, for example '0-1000 kg' * `segment-bold` + // - section of the text that should be rendered as bold * `segment-italic` - + // section of the text that should be rendered as italic * `tooltip` - used on + // paragraphs that should be rendered with a tooltip. A section of the text in + // such a paragraph will have a class `tooltip-text` and is intended to be + // shown in a mouse over dialog. If the style is not used, the `tooltip-text` + // section would be shown on a new line, after the main part of the text. * + // `tooltip-text` - marks a section of the text within a `tooltip`, that is + // intended to be shown in a mouse over dialog. * `tooltip-icon` - marks a + // section of the text within a `tooltip`, that can be replaced with a tooltip + // icon, for example '?' or 'i'. By default, this section contains a `br` tag, + // that is separating the main text and the tooltip text when the style is not + // used. * `tooltip-style-question` - the tooltip shows helpful information, + // can use the '?' as an icon. * `tooltip-style-info` - the tooltip adds + // additional information fitting to the context, can use the 'i' as an icon. * + // `content-moderation` - marks the paragraph that explains how the issue was + // identified. * `list-intro` - marks the paragraph that contains an intro for + // a list. This paragraph will be always followed by a list. * `new-element` - + // Present for new elements added to the pre-rendered content in the future. To + // make sure that a new content element does not break your style, you can hide + // everything with this class. + PrerenderedContent string `json:"prerenderedContent,omitempty"` + // Title: Title of the issue. + Title string `json:"title,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 (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountslinkrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductIssue) MarshalJSON() ([]byte, error) { + type NoMethod ProductIssue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.link" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsLinkResponse.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 *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, 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 := &AccountsLinkResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +// ProductIssueImpact: Overall impact of product issue. +type ProductIssueImpact struct { + // Breakdowns: Detailed impact breakdown. Explains the types of restriction the + // issue has in different shopping destinations and territory. If present, it + // should be rendered to the merchant. Can be shown as a mouse over dropdown or + // a dialog. Each breakdown item represents a group of regions with the same + // impact details. + Breakdowns []*Breakdown `json:"breakdowns,omitempty"` + // Message: Optional. Message summarizing the overall impact of the issue. If + // present, it should be rendered to the merchant. For example: "Limits + // visibility in France" + Message string `json:"message,omitempty"` + // Severity: The severity of the issue. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Default value. Will never be provided by the API. + // "ERROR" - Causes either an account suspension or an item disapproval. + // Errors should be resolved as soon as possible to ensure items are eligible + // to appear in results again. + // "WARNING" - Warnings can negatively impact the performance of ads and can + // lead to item or account suspensions in the future unless the issue is + // resolved. + // "INFO" - Infos are suggested optimizations to increase data quality. + // Resolving these issues is recommended, but not required. + Severity string `json:"severity,omitempty"` + // ForceSendFields is a list of field names (e.g. "Breakdowns") 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. "Breakdowns") 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:"-"` } -type AccountsListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s ProductIssueImpact) MarshalJSON() ([]byte, error) { + type NoMethod ProductIssueImpact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// List: Lists the sub-accounts in your Merchant Center account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountsService) List(merchantId uint64) *AccountsListCall { - c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +type ProductProductDetail struct { + // AttributeName: The name of the product detail. + AttributeName string `json:"attributeName,omitempty"` + // AttributeValue: The value of the product detail. + AttributeValue string `json:"attributeValue,omitempty"` + // SectionName: The section header used to group a set of product details. + SectionName string `json:"sectionName,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeName") 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. "AttributeName") 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:"-"` } -// Label sets the optional parameter "label": If view is set to "css", only -// return accounts that are assigned label with given ID. -func (c *AccountsListCall) Label(label uint64) *AccountsListCall { - c.urlParams_.Set("label", fmt.Sprint(label)) - return c +func (s ProductProductDetail) MarshalJSON() ([]byte, error) { + type NoMethod ProductProductDetail + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// accounts to return in the response, used for paging. -func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +type ProductShipping struct { + // Country: The CLDR territory code of the country to which an item will ship. + Country string `json:"country,omitempty"` + // LocationGroupName: The location where the shipping is applicable, + // represented by a location group name. + LocationGroupName string `json:"locationGroupName,omitempty"` + // LocationId: The numeric ID of a location that the shipping rate applies to + // as defined in the Google Ads API. + LocationId int64 `json:"locationId,omitempty,string"` + // MaxHandlingTime: Maximum handling time (inclusive) between when the order is + // received and shipped in business days. 0 means that the order is shipped on + // the same day as it's received if it happens before the cut-off time. Both + // maxHandlingTime and maxTransitTime are required if providing shipping + // speeds. + MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"` + // MaxTransitTime: Maximum transit time (inclusive) between when the order has + // shipped and when it's delivered in business days. 0 means that the order is + // delivered on the same day as it ships. Both maxHandlingTime and + // maxTransitTime are required if providing shipping speeds. + MaxTransitTime int64 `json:"maxTransitTime,omitempty,string"` + // MinHandlingTime: Minimum handling time (inclusive) between when the order is + // received and shipped in business days. 0 means that the order is shipped on + // the same day as it's received if it happens before the cut-off time. + // minHandlingTime can only be present together with maxHandlingTime; but it's + // not required if maxHandlingTime is present. + MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"` + // MinTransitTime: Minimum transit time (inclusive) between when the order has + // shipped and when it's delivered in business days. 0 means that the order is + // delivered on the same day as it ships. minTransitTime can only be present + // together with maxTransitTime; but it's not required if maxTransitTime is + // present. + MinTransitTime int64 `json:"minTransitTime,omitempty,string"` + // PostalCode: The postal code range that the shipping rate applies to, + // represented by a postal code, a postal code prefix followed by a * wildcard, + // a range between two postal codes or two postal code prefixes of equal + // length. + PostalCode string `json:"postalCode,omitempty"` + // Price: Fixed shipping price, represented as a number. + Price *Price `json:"price,omitempty"` + // Region: The geographic region to which a shipping rate applies. + Region string `json:"region,omitempty"` + // Service: A free-form description of the service class or delivery speed. + Service string `json:"service,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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:"-"` } -// Name sets the optional parameter "name": If set, only the accounts with the -// given name (case sensitive) will be returned. -func (c *AccountsListCall) Name(name string) *AccountsListCall { - c.urlParams_.Set("name", name) - return c +func (s ProductShipping) MarshalJSON() ([]byte, error) { + type NoMethod ProductShipping + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type ProductShippingDimension struct { + // Unit: The unit of value. + Unit string `json:"unit,omitempty"` + // Value: The dimension of the product used to calculate the shipping cost of + // the item. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` } -// View sets the optional parameter "view": Controls which fields will be -// populated. Acceptable values are: "merchant" and "css". The default value is -// "merchant". -// -// Possible values: -// -// "MERCHANT" - Default. View is populated with Merchant Center fields. -// "CSS" - View is populated with Comparison Shopping Services fields. -func (c *AccountsListCall) View(view string) *AccountsListCall { - c.urlParams_.Set("view", view) - return c +func (s ProductShippingDimension) MarshalJSON() ([]byte, error) { + type NoMethod ProductShippingDimension + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error { + type NoMethod ProductShippingDimension + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil } -// 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 *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { - c.ifNoneMatch_ = entityTag - return c +type ProductShippingWeight struct { + // Unit: The unit of value. + Unit string `json:"unit,omitempty"` + // Value: The weight of the product used to calculate the shipping cost of the + // item. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { - c.ctx_ = ctx - return c +func (s ProductShippingWeight) MarshalJSON() ([]byte, error) { + type NoMethod ProductShippingWeight + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) +func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error { + type NoMethod ProductShippingWeight + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod } - return c.header_ + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil } -func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ProductStatus: The status of a product, that is, information about a product +// computed asynchronously. +type ProductStatus struct { + // CreationDate: Date on which the item has been created, in ISO 8601 format. + CreationDate string `json:"creationDate,omitempty"` + // DestinationStatuses: The intended destinations for the product. + DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"` + // GoogleExpirationDate: Date on which the item expires in Google Shopping, in + // ISO 8601 format. + GoogleExpirationDate string `json:"googleExpirationDate,omitempty"` + // ItemLevelIssues: A list of all issues associated with the product. + ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productStatus" + Kind string `json:"kind,omitempty"` + // LastUpdateDate: Date on which the item has been last updated, in ISO 8601 + // format. + LastUpdateDate string `json:"lastUpdateDate,omitempty"` + // Link: The link to the product. + Link string `json:"link,omitempty"` + // ProductId: The ID of the product for which status is reported. + ProductId string `json:"productId,omitempty"` + // Title: The title of the product. + Title string `json:"title,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreationDate") 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. "CreationDate") 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:"-"` } -// Do executes the "content.accounts.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsListResponse.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 *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, 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 := &AccountsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductStatus) MarshalJSON() ([]byte, error) { + type NoMethod ProductStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) 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 ProductStatusDestinationStatus struct { + // ApprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the + // offer is approved. + ApprovedCountries []string `json:"approvedCountries,omitempty"` + // Destination: The name of the destination + Destination string `json:"destination,omitempty"` + // DisapprovedCountries: List of country codes (ISO 3166-1 alpha-2) where the + // offer is disapproved. + DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` + // PendingCountries: List of country codes (ISO 3166-1 alpha-2) where the offer + // is pending approval. + PendingCountries []string `json:"pendingCountries,omitempty"` + // Status: Deprecated. Destination approval status in `targetCountry` of the + // offer. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApprovedCountries") 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. "ApprovedCountries") 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:"-"` } -type AccountsListlinksCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) { + type NoMethod ProductStatusDestinationStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Listlinks: Returns the list of accounts linked to your Merchant Center -// account. -// -// - accountId: The ID of the account for which to list links. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Listlinks(merchantId uint64, accountId uint64) *AccountsListlinksCall { - c := &AccountsListlinksCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c +type ProductStatusItemLevelIssue struct { + // ApplicableCountries: List of country codes (ISO 3166-1 alpha-2) where issue + // applies to the offer. + ApplicableCountries []string `json:"applicableCountries,omitempty"` + // AttributeName: The attribute's name, if the issue is caused by a single + // attribute. + AttributeName string `json:"attributeName,omitempty"` + // Code: The error code of the issue. + Code string `json:"code,omitempty"` + // Description: A short issue description in English. + Description string `json:"description,omitempty"` + // Destination: The destination the issue applies to. + Destination string `json:"destination,omitempty"` + // Detail: A detailed issue description in English. + Detail string `json:"detail,omitempty"` + // Documentation: The URL of a web page to help with resolving this issue. + Documentation string `json:"documentation,omitempty"` + // Resolution: Whether the issue can be resolved by the merchant. + Resolution string `json:"resolution,omitempty"` + // Servability: How this issue affects serving of the offer. + Servability string `json:"servability,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApplicableCountries") 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. "ApplicableCountries") 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:"-"` } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// links to return in the response, used for pagination. The minimum allowed -// value is 5 results per page. If provided value is lower than 5, it will be -// automatically increased to 5. -func (c *AccountsListlinksCall) MaxResults(maxResults int64) *AccountsListlinksCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +func (s ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) { + type NoMethod ProductStatusItemLevelIssue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ProductStructuredDescription: Structured description, for algorithmically +// (AI)-generated descriptions. See description +// (https://support.google.com/merchants/answer/6324468#When_to_use) for more +// information. +type ProductStructuredDescription struct { + // Content: Required. The description text. Maximum length is 5000 characters. + Content string `json:"content,omitempty"` + // DigitalSourceType: Optional. The digital source type. Acceptable values are: + // - "trained_algorithmic_media" - "default" + DigitalSourceType string `json:"digitalSourceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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:"-"` } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountsListlinksCall) PageToken(pageToken string) *AccountsListlinksCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (s ProductStructuredDescription) MarshalJSON() ([]byte, error) { + type NoMethod ProductStructuredDescription + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsListlinksCall) Fields(s ...googleapi.Field) *AccountsListlinksCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductStructuredTitle: Structured title, for algorithmically (AI)-generated +// titles. See title +// (https://support.google.com/merchants/answer/6324415#Whentouse) for more +// information. +type ProductStructuredTitle struct { + // Content: Required. The title text. Maximum length is 150 characters. + Content string `json:"content,omitempty"` + // DigitalSourceType: Optional. The digital source type. Acceptable values are: + // - "trained_algorithmic_media" - "default" + DigitalSourceType string `json:"digitalSourceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Content") 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. "Content") 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:"-"` } -// 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 *AccountsListlinksCall) IfNoneMatch(entityTag string) *AccountsListlinksCall { - c.ifNoneMatch_ = entityTag - return c +func (s ProductStructuredTitle) MarshalJSON() ([]byte, error) { + type NoMethod ProductStructuredTitle + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsListlinksCall) Context(ctx context.Context) *AccountsListlinksCall { - c.ctx_ = ctx - return c +type ProductSubscriptionCost struct { + // Amount: The amount the buyer has to pay per subscription period. + Amount *Price `json:"amount,omitempty"` + // Period: The type of subscription period. - "month" - "year" + Period string `json:"period,omitempty"` + // PeriodLength: The number of subscription periods the buyer has to pay. + PeriodLength int64 `json:"periodLength,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsListlinksCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ProductSubscriptionCost) MarshalJSON() ([]byte, error) { + type NoMethod ProductSubscriptionCost + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsListlinksCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/listlinks") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ProductTax struct { + // Country: The country within which the item is taxed, specified as a CLDR + // territory code. + Country string `json:"country,omitempty"` + // LocationId: The numeric ID of a location that the tax rate applies to as + // defined in the Google Ads API. + LocationId int64 `json:"locationId,omitempty,string"` + // PostalCode: The postal code range that the tax rate applies to, represented + // by a ZIP code, a ZIP code prefix using * wildcard, a range between two ZIP + // codes or two ZIP code prefixes of equal length. Examples: 94114, 94*, + // 94002-95460, 94*-95*. + PostalCode string `json:"postalCode,omitempty"` + // Rate: The percentage of tax rate that applies to the item price. + Rate float64 `json:"rate,omitempty"` + // Region: The geographic region to which the tax rate applies. + Region string `json:"region,omitempty"` + // TaxShip: Should be set to true if tax is charged on shipping. + TaxShip bool `json:"taxShip,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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:"-"` } -// Do executes the "content.accounts.listlinks" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsListLinksResponse.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 *AccountsListlinksCall) Do(opts ...googleapi.CallOption) (*AccountsListLinksResponse, 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 := &AccountsListLinksResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductTax) MarshalJSON() ([]byte, error) { + type NoMethod ProductTax + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *AccountsListlinksCall) Pages(ctx context.Context, f func(*AccountsListLinksResponse) 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) +func (s *ProductTax) UnmarshalJSON(data []byte) error { + type NoMethod ProductTax + var s1 struct { + Rate gensupport.JSONFloat64 `json:"rate"` + *NoMethod } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Rate = float64(s1.Rate) + return nil } -type AccountsRequestphoneverificationCall struct { - s *APIService - merchantId int64 - accountId int64 - requestphoneverificationrequest *RequestPhoneVerificationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Requestphoneverification: Request verification code to start phone -// verification. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Requestphoneverification(merchantId int64, accountId int64, requestphoneverificationrequest *RequestPhoneVerificationRequest) *AccountsRequestphoneverificationCall { - c := &AccountsRequestphoneverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.requestphoneverificationrequest = requestphoneverificationrequest - 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 *AccountsRequestphoneverificationCall) Fields(s ...googleapi.Field) *AccountsRequestphoneverificationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *AccountsRequestphoneverificationCall) Context(ctx context.Context) *AccountsRequestphoneverificationCall { - c.ctx_ = ctx - return c +type ProductUnitPricingBaseMeasure struct { + // Unit: The unit of the denominator. + Unit string `json:"unit,omitempty"` + // Value: The denominator of the unit price. + Value int64 `json:"value,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsRequestphoneverificationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) { + type NoMethod ProductUnitPricingBaseMeasure + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsRequestphoneverificationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.requestphoneverificationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/requestphoneverification") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ProductUnitPricingMeasure struct { + // Unit: The unit of the measure. + Unit string `json:"unit,omitempty"` + // Value: The measure of an item. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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:"-"` } -// Do executes the "content.accounts.requestphoneverification" call. -// Any non-2xx status code is an error. Response headers are in either -// *RequestPhoneVerificationResponse.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 *AccountsRequestphoneverificationCall) Do(opts ...googleapi.CallOption) (*RequestPhoneVerificationResponse, 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 := &RequestPhoneVerificationResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) { + type NoMethod ProductUnitPricingMeasure + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - account *Account - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error { + type NoMethod ProductUnitPricingMeasure + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Value = float64(s1.Value) + return nil } -// Update: Updates a Merchant Center account. Any fields that are not provided -// are deleted from the resource. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { - c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.account = account - return c +// ProductView: Product fields. Values are only set for fields requested +// explicitly in the request's search query. +type ProductView struct { + // AggregatedDestinationStatus: Aggregated destination status. + // + // Possible values: + // "AGGREGATED_STATUS_UNSPECIFIED" - Undefined aggregated status. + // "NOT_ELIGIBLE_OR_DISAPPROVED" - Offer isn't eligible, or is disapproved + // for all destinations. + // "PENDING" - Offer's status is pending in all destinations. + // "ELIGIBLE_LIMITED" - Offer is eligible for some (but not all) + // destinations. + // "ELIGIBLE" - Offer is eligible for all destinations. + AggregatedDestinationStatus string `json:"aggregatedDestinationStatus,omitempty"` + // Availability: Availability of the product. + Availability string `json:"availability,omitempty"` + // Brand: Brand of the product. + Brand string `json:"brand,omitempty"` + // CategoryL1: First level of the product category in Google's product taxonomy + // (https://support.google.com/merchants/answer/6324436). + CategoryL1 string `json:"categoryL1,omitempty"` + // CategoryL2: Second level of the product category in Google's product + // taxonomy (https://support.google.com/merchants/answer/6324436). + CategoryL2 string `json:"categoryL2,omitempty"` + // CategoryL3: Third level of the product category in Google's product taxonomy + // (https://support.google.com/merchants/answer/6324436). + CategoryL3 string `json:"categoryL3,omitempty"` + // CategoryL4: Fourth level of the product category in Google's product + // taxonomy (https://support.google.com/merchants/answer/6324436). + CategoryL4 string `json:"categoryL4,omitempty"` + // CategoryL5: Fifth level of the product category in Google's product taxonomy + // (https://support.google.com/merchants/answer/6324436). + CategoryL5 string `json:"categoryL5,omitempty"` + // Channel: Channel of the product (online versus local). + // + // Possible values: + // "CHANNEL_UNSPECIFIED" - Indicates that the channel is unspecified. + // "LOCAL" - Indicates that the channel is local. + // "ONLINE" - Indicates that the channel is online. + Channel string `json:"channel,omitempty"` + // ClickPotential: Estimated performance potential compared to highest + // performing products of the merchant. + // + // Possible values: + // "CLICK_POTENTIAL_UNSPECIFIED" - Unknown predicted clicks impact. + // "LOW" - Potential to receive a low number of clicks compared to the + // highest performing products of the merchant. + // "MEDIUM" - Potential to receive a moderate number of clicks compared to + // the highest performing products of the merchant. + // "HIGH" - Potential to receive a similar number of clicks as the highest + // performing products of the merchant. + ClickPotential string `json:"clickPotential,omitempty"` + // ClickPotentialRank: Rank of the product based on its click potential. A + // product with `click_potential_rank` 1 has the highest click potential among + // the merchant's products that fulfill the search query conditions. + ClickPotentialRank int64 `json:"clickPotentialRank,omitempty,string"` + // Condition: Condition of the product. + Condition string `json:"condition,omitempty"` + // CreationTime: The time the merchant created the product in timestamp + // seconds. + CreationTime string `json:"creationTime,omitempty"` + // CurrencyCode: Product price currency code (for example, ISO 4217). Absent if + // product price is not available. + CurrencyCode string `json:"currencyCode,omitempty"` + // ExpirationDate: Expiration date for the product. Specified on insertion. + ExpirationDate *Date `json:"expirationDate,omitempty"` + // Gtin: GTIN of the product. + Gtin []string `json:"gtin,omitempty"` + // Id: The REST ID of the product, in the form of + // channel:contentLanguage:targetCountry:offerId. Content API methods that + // operate on products take this as their productId parameter. Should always be + // included in the SELECT clause. + Id string `json:"id,omitempty"` + // ItemGroupId: Item group ID provided by the merchant for grouping variants + // together. + ItemGroupId string `json:"itemGroupId,omitempty"` + // ItemIssues: List of item issues for the product. + ItemIssues []*ProductViewItemIssue `json:"itemIssues,omitempty"` + // LanguageCode: Language code of the product in BCP 47 format. + LanguageCode string `json:"languageCode,omitempty"` + // OfferId: Merchant-provided id of the product. + OfferId string `json:"offerId,omitempty"` + // PriceMicros: Product price specified as micros (1 millionth of a standard + // unit, 1 USD = 1000000 micros) in the product currency. Absent in case the + // information about the price of the product is not available. + PriceMicros int64 `json:"priceMicros,omitempty,string"` + // ProductTypeL1: First level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL1 string `json:"productTypeL1,omitempty"` + // ProductTypeL2: Second level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL2 string `json:"productTypeL2,omitempty"` + // ProductTypeL3: Third level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL3 string `json:"productTypeL3,omitempty"` + // ProductTypeL4: Fourth level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL4 string `json:"productTypeL4,omitempty"` + // ProductTypeL5: Fifth level of the product type in merchant's own product + // taxonomy (https://support.google.com/merchants/answer/6324436). + ProductTypeL5 string `json:"productTypeL5,omitempty"` + // ShippingLabel: The normalized shipping label specified in the feed + ShippingLabel string `json:"shippingLabel,omitempty"` + // Title: Title of the product. + Title string `json:"title,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "AggregatedDestinationStatus") 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. "AggregatedDestinationStatus") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ProductView) MarshalJSON() ([]byte, error) { + type NoMethod ProductView + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { - c.ctx_ = ctx - return c +// ProductViewItemIssue: Item issue associated with the product. +type ProductViewItemIssue struct { + // IssueType: Item issue type. + IssueType *ProductViewItemIssueItemIssueType `json:"issueType,omitempty"` + // Resolution: Item issue resolution. + // + // Possible values: + // "UNKNOWN" - Unknown resolution type. + // "MERCHANT_ACTION" - The merchant has to fix the issue. + // "PENDING_PROCESSING" - The issue will be resolved automatically (for + // example, image crawl), or Google review. No merchant action is required now. + // Resolution might lead to another issue (for example, if crawl fails). + Resolution string `json:"resolution,omitempty"` + // Severity: Item issue severity. + Severity *ProductViewItemIssueItemIssueSeverity `json:"severity,omitempty"` + // ForceSendFields is a list of field names (e.g. "IssueType") 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. "IssueType") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ProductViewItemIssue) MarshalJSON() ([]byte, error) { + type NoMethod ProductViewItemIssue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ProductViewItemIssueIssueSeverityPerDestination: Issue severity for all +// affected regions in a destination. +type ProductViewItemIssueIssueSeverityPerDestination struct { + // DemotedCountries: List of demoted countries in the destination. + DemotedCountries []string `json:"demotedCountries,omitempty"` + // Destination: Issue destination. + Destination string `json:"destination,omitempty"` + // DisapprovedCountries: List of disapproved countries in the destination. + DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` + // ForceSendFields is a list of field names (e.g. "DemotedCountries") 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. "DemotedCountries") 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:"-"` } -// Do executes the "content.accounts.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Account.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 *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, 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 := &Account{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductViewItemIssueIssueSeverityPerDestination) MarshalJSON() ([]byte, error) { + type NoMethod ProductViewItemIssueIssueSeverityPerDestination + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsUpdatelabelsCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accountsupdatelabelsrequest *AccountsUpdateLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// ProductViewItemIssueItemIssueSeverity: Severity of an issue per destination +// in a region, and aggregated severity. +type ProductViewItemIssueItemIssueSeverity struct { + // AggregatedSeverity: Severity of an issue aggregated for destination. + // + // Possible values: + // "AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED" - Undefined Issue severity. + // "DISAPPROVED" - Issue disapproves the product in at least one of the + // selected destinations. + // "DEMOTED" - Issue demotes the product in all selected destinations it + // affects. + // "PENDING" - Issue resolution is `PENDING_PROCESSING`. + AggregatedSeverity string `json:"aggregatedSeverity,omitempty"` + // SeverityPerDestination: Item issue severity for every destination. + SeverityPerDestination []*ProductViewItemIssueIssueSeverityPerDestination `json:"severityPerDestination,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregatedSeverity") 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. "AggregatedSeverity") 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:"-"` } -// Updatelabels: Updates labels that are assigned to the Merchant Center -// account by CSS user. -// -// - accountId: The ID of the account whose labels are updated. -// - merchantId: The ID of the managing account. -func (r *AccountsService) Updatelabels(merchantId uint64, accountId uint64, accountsupdatelabelsrequest *AccountsUpdateLabelsRequest) *AccountsUpdatelabelsCall { - c := &AccountsUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.accountsupdatelabelsrequest = accountsupdatelabelsrequest - return c +func (s ProductViewItemIssueItemIssueSeverity) MarshalJSON() ([]byte, error) { + type NoMethod ProductViewItemIssueItemIssueSeverity + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsUpdatelabelsCall) Fields(s ...googleapi.Field) *AccountsUpdatelabelsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductViewItemIssueItemIssueType: Type of the item issue. +type ProductViewItemIssueItemIssueType struct { + // CanonicalAttribute: Canonical attribute name for attribute-specific issues. + CanonicalAttribute string `json:"canonicalAttribute,omitempty"` + // Code: Error code of the issue. + Code string `json:"code,omitempty"` + // ForceSendFields is a list of field names (e.g. "CanonicalAttribute") 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. "CanonicalAttribute") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsUpdatelabelsCall) Context(ctx context.Context) *AccountsUpdatelabelsCall { - c.ctx_ = ctx - return c +func (s ProductViewItemIssueItemIssueType) MarshalJSON() ([]byte, error) { + type NoMethod ProductViewItemIssueItemIssueType + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsUpdatelabelsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ProductWeight struct { + // Unit: Required. The weight unit. Acceptable values are: - "g" - "kg" - + // "oz" - "lb" + Unit string `json:"unit,omitempty"` + // Value: Required. The weight represented as a number. The weight can have a + // maximum precision of four decimal places. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 (c *AccountsUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountsupdatelabelsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/updatelabels") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductWeight) MarshalJSON() ([]byte, error) { + type NoMethod ProductWeight + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.updatelabels" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountsUpdateLabelsResponse.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 *AccountsUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*AccountsUpdateLabelsResponse, 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 := &AccountsUpdateLabelsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, +func (s *ProductWeight) UnmarshalJSON(data []byte) error { + type NoMethod ProductWeight + var s1 struct { + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err } - return ret, nil + s.Value = float64(s1.Value) + return nil } -type AccountsVerifyphonenumberCall struct { - s *APIService - merchantId int64 - accountId int64 - verifyphonenumberrequest *VerifyPhoneNumberRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProductsCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// Verifyphonenumber: Validates verification code to verify phone number for -// the account. If successful this will overwrite the value of -// `accounts.businessinformation.phoneNumber`. Only verified phone number will -// replace an existing verified phone number. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// accountId must be the ID of a sub-account of this account. -func (r *AccountsService) Verifyphonenumber(merchantId int64, accountId int64, verifyphonenumberrequest *VerifyPhoneNumberRequest) *AccountsVerifyphonenumberCall { - c := &AccountsVerifyphonenumberCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.verifyphonenumberrequest = verifyphonenumberrequest - return c +func (s ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ProductsCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsVerifyphonenumberCall) Fields(s ...googleapi.Field) *AccountsVerifyphonenumberCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductsCustomBatchRequestEntry: A batch entry encoding a single non-batch +// products request. +type ProductsCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // FeedId: The Content API Supplemental Feed ID. If present then product + // insertion or deletion applies to a supplemental feed instead of primary + // Content API feed. + FeedId uint64 `json:"feedId,omitempty,string"` + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: The method of the batch entry. Acceptable values are: - "delete" - + // "get" - "insert" - "update" + Method string `json:"method,omitempty"` + // Product: The product to insert or update. Only required if the method is + // `insert` or `update`. If the `update` method is used with `updateMask` only + // to delete a field, then this isn't required. For example, setting + // `salePrice` on the `updateMask` and not providing a `product` will result in + // an existing sale price on the product specified by `productId` being + // deleted. + Product *Product `json:"product,omitempty"` + // ProductId: The ID of the product to get or mutate. Only defined if the + // method is `get`, `delete`, or `update`. + ProductId string `json:"productId,omitempty"` + // UpdateMask: The comma-separated list of product attributes to be updated. + // Example: "title,salePrice". Attributes specified in the update mask + // without a value specified in the body will be deleted from the product. *You + // must specify the update mask to delete attributes.* Only top-level product + // attributes can be updated. If not defined, product attributes with set + // values will be updated and other attributes will stay unchanged. Only + // defined if the method is `update`. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsVerifyphonenumberCall) Context(ctx context.Context) *AccountsVerifyphonenumberCall { - c.ctx_ = ctx - return c +func (s ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ProductsCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsVerifyphonenumberCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ProductsCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productsCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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 (c *AccountsVerifyphonenumberCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifyphonenumberrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/verifyphonenumber") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ProductsCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.verifyphonenumber" call. -// Any non-2xx status code is an error. Response headers are in either -// *VerifyPhoneNumberResponse.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 *AccountsVerifyphonenumberCall) Do(opts ...googleapi.CallOption) (*VerifyPhoneNumberResponse, 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 := &VerifyPhoneNumberResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +// ProductsCustomBatchResponseEntry: A batch entry encoding a single non-batch +// products response. +type ProductsCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry this entry responds to. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productsCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // Product: The inserted product. Only defined if the method is `insert` and if + // the request was successful. + Product *Product `json:"product,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -type AccountsCredentialsCreateCall struct { - s *APIService - accountId int64 - accountcredentials *AccountCredentials - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ProductsCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Create: Uploads credentials for the Merchant Center account. If credentials -// already exist for this Merchant Center account and purpose, this method -// updates them. -// -// - accountId: The merchant id of the account these credentials belong to. -func (r *AccountsCredentialsService) Create(accountId int64, accountcredentials *AccountCredentials) *AccountsCredentialsCreateCall { - c := &AccountsCredentialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.accountcredentials = accountcredentials - return c +type ProductsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of products. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*Product `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsCredentialsCreateCall) Fields(s ...googleapi.Field) *AccountsCredentialsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ProductsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ProductsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsCredentialsCreateCall) Context(ctx context.Context) *AccountsCredentialsCreateCall { - c.ctx_ = ctx - return c +type ProductstatusesCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsCredentialsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsCredentialsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountcredentials) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/credentials") - 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ProductstatusesCustomBatchRequestEntry: A batch entry encoding a single +// non-batch productstatuses request. +type ProductstatusesCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // Destinations: If set, only issues for the specified destinations are + // returned, otherwise only issues for the Shopping destination. + Destinations []string `json:"destinations,omitempty"` + // IncludeAttributes: Deprecated: Setting this field has no effect and + // attributes are never included. + IncludeAttributes bool `json:"includeAttributes,omitempty"` + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: The method of the batch entry. Acceptable values are: - "get" + Method string `json:"method,omitempty"` + // ProductId: The ID of the product whose status to get. + ProductId string `json:"productId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Do executes the "content.accounts.credentials.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountCredentials.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 *AccountsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*AccountCredentials, 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 := &AccountCredentials{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsLabelsCreateCall struct { - s *APIService - accountId int64 - accountlabel *AccountLabel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProductstatusesCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productstatusesCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// Create: Creates a new label, not assigned to any account. -// -// - accountId: The id of the account this label belongs to. -func (r *AccountsLabelsService) Create(accountId int64, accountlabel *AccountLabel) *AccountsLabelsCreateCall { - c := &AccountsLabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.accountlabel = accountlabel - return c +func (s ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLabelsCreateCall) Fields(s ...googleapi.Field) *AccountsLabelsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ProductstatusesCustomBatchResponseEntry: A batch entry encoding a single +// non-batch productstatuses response. +type ProductstatusesCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry this entry responds to. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productstatusesCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // ProductStatus: The requested product status. Only defined if the request was + // successful. + ProductStatus *ProductStatus `json:"productStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsCreateCall) Context(ctx context.Context) *AccountsLabelsCreateCall { - c.ctx_ = ctx - return c +func (s ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLabelsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ProductstatusesListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#productstatusesListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of products + // statuses. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*ProductStatus `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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 (c *AccountsLabelsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountlabel) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") - 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ProductstatusesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ProductstatusesListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.labels.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountLabel.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 *AccountsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*AccountLabel, 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 := &AccountLabel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} +// Promotion: Represents a promotion. See the following articles for more +// details. * Promotions feed specification +// (https://support.google.com/merchants/answer/2906014) * Local promotions +// feed specification (https://support.google.com/merchants/answer/10146130) * +// Promotions on Buy on Google product data specification +// (https://support.google.com/merchants/answer/9173673) +type Promotion struct { + // Brand: Product filter by brand for the promotion. + Brand []string `json:"brand,omitempty"` + // BrandExclusion: Product filter by brand exclusion for the promotion. + BrandExclusion []string `json:"brandExclusion,omitempty"` + // ContentLanguage: Required. The content language used as part of the unique + // identifier. `en` content language is available for all target countries. + // `fr` content language is available for `CA` and `FR` target countries. `de` + // content language is available for `DE` target country. `nl` content language + // is available for `NL` target country. `it` content language is available for + // `IT` target country. `pt` content language is available for `BR` target + // country. `ja` content language is available for `JP` target country. `ko` + // content language is available for `KR` target country. + ContentLanguage string `json:"contentLanguage,omitempty"` + // CouponValueType: Required. Coupon value type for the promotion. + // + // Possible values: + // "COUPON_VALUE_TYPE_UNSPECIFIED" - Indicates that the coupon value type is + // unspecified. + // "MONEY_OFF" - Money off coupon value type. + // "PERCENT_OFF" - Percent off coupon value type. + // "BUY_M_GET_N_MONEY_OFF" - Buy M quantity, get N money off coupon value + // type. `buy_this_quantity` and `get_this_quantity` must be present. + // `money_off_amount` must also be present. + // "BUY_M_GET_N_PERCENT_OFF" - Buy M quantity, get N percent off coupon value + // type. `buy_this_quantity` and `get_this_quantity` must be present. + // `percent_off_percentage` must also be present. + // "BUY_M_GET_MONEY_OFF" - Buy M quantity, get money off. `buy_this_quantity` + // and `money_off_amount` must be present. + // "BUY_M_GET_PERCENT_OFF" - Buy M quantity, get money off. + // `buy_this_quantity` and `percent_off_percentage` must be present. + // "FREE_GIFT" - Free gift with description only. + // "FREE_GIFT_WITH_VALUE" - Free gift with value (description is optional). + // "FREE_GIFT_WITH_ITEM_ID" - Free gift with item ID (description is + // optional). + // "FREE_SHIPPING_STANDARD" - Standard free shipping coupon value type. + // "FREE_SHIPPING_OVERNIGHT" - Overnight free shipping coupon value type. + // "FREE_SHIPPING_TWO_DAY" - Two day free shipping coupon value type. + CouponValueType string `json:"couponValueType,omitempty"` + // FreeGiftDescription: Free gift description for the promotion. + FreeGiftDescription string `json:"freeGiftDescription,omitempty"` + // FreeGiftItemId: Free gift item ID for the promotion. + FreeGiftItemId string `json:"freeGiftItemId,omitempty"` + // FreeGiftValue: Free gift value for the promotion. + FreeGiftValue *PriceAmount `json:"freeGiftValue,omitempty"` + // GenericRedemptionCode: Generic redemption code for the promotion. To be used + // with the `offerType` field. + GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"` + // GetThisQuantityDiscounted: The number of items discounted in the promotion. + GetThisQuantityDiscounted int64 `json:"getThisQuantityDiscounted,omitempty"` + // Id: Output only. The REST promotion ID to uniquely identify the promotion. + // Content API methods that operate on promotions take this as their + // `promotionId` parameter. The REST ID for a promotion is of the form + // channel:contentLanguage:targetCountry:promotionId The `channel` field has a + // value of "online", "in_store", or "online_in_store". + Id string `json:"id,omitempty"` + // ItemGroupId: Product filter by item group ID for the promotion. + ItemGroupId []string `json:"itemGroupId,omitempty"` + // ItemGroupIdExclusion: Product filter by item group ID exclusion for the + // promotion. + ItemGroupIdExclusion []string `json:"itemGroupIdExclusion,omitempty"` + // ItemId: Product filter by item ID for the promotion. + ItemId []string `json:"itemId,omitempty"` + // ItemIdExclusion: Product filter by item ID exclusion for the promotion. + ItemIdExclusion []string `json:"itemIdExclusion,omitempty"` + // LimitQuantity: Maximum purchase quantity for the promotion. + LimitQuantity int64 `json:"limitQuantity,omitempty"` + // LimitValue: Maximum purchase value for the promotion. + LimitValue *PriceAmount `json:"limitValue,omitempty"` + // LongTitle: Required. Long title for the promotion. + LongTitle string `json:"longTitle,omitempty"` + // MinimumPurchaseAmount: Minimum purchase amount for the promotion. + MinimumPurchaseAmount *PriceAmount `json:"minimumPurchaseAmount,omitempty"` + // MinimumPurchaseQuantity: Minimum purchase quantity for the promotion. + MinimumPurchaseQuantity int64 `json:"minimumPurchaseQuantity,omitempty"` + // MoneyBudget: Cost cap for the promotion. + MoneyBudget *PriceAmount `json:"moneyBudget,omitempty"` + // MoneyOffAmount: The money off amount offered in the promotion. + MoneyOffAmount *PriceAmount `json:"moneyOffAmount,omitempty"` + // OfferType: Required. Type of the promotion. + // + // Possible values: + // "OFFER_TYPE_UNSPECIFIED" - Unknown offer type. + // "NO_CODE" - Offer type without a code. + // "GENERIC_CODE" - Offer type with a code. + OfferType string `json:"offerType,omitempty"` + // OrderLimit: Order limit for the promotion. + OrderLimit int64 `json:"orderLimit,omitempty"` + // PercentOff: The percentage discount offered in the promotion. + PercentOff int64 `json:"percentOff,omitempty"` + // ProductApplicability: Required. Applicability of the promotion to either all + // products or only specific products. + // + // Possible values: + // "PRODUCT_APPLICABILITY_UNSPECIFIED" - Which products the promotion applies + // to is unknown. + // "ALL_PRODUCTS" - Applicable to all products. + // "SPECIFIC_PRODUCTS" - Applicable to only a single product or list of + // products. + ProductApplicability string `json:"productApplicability,omitempty"` + // ProductType: Product filter by product type for the promotion. + ProductType []string `json:"productType,omitempty"` + // ProductTypeExclusion: Product filter by product type exclusion for the + // promotion. + ProductTypeExclusion []string `json:"productTypeExclusion,omitempty"` + // PromotionDestinationIds: Destination ID for the promotion. + PromotionDestinationIds []string `json:"promotionDestinationIds,omitempty"` + // PromotionDisplayDates: String representation of the promotion display dates. + // Deprecated. Use `promotion_display_time_period` instead. + PromotionDisplayDates string `json:"promotionDisplayDates,omitempty"` + // PromotionDisplayTimePeriod: `TimePeriod` representation of the promotion's + // display dates. + PromotionDisplayTimePeriod *TimePeriod `json:"promotionDisplayTimePeriod,omitempty"` + // PromotionEffectiveDates: String representation of the promotion effective + // dates. Deprecated. Use `promotion_effective_time_period` instead. + PromotionEffectiveDates string `json:"promotionEffectiveDates,omitempty"` + // PromotionEffectiveTimePeriod: Required. `TimePeriod` representation of the + // promotion's effective dates. + PromotionEffectiveTimePeriod *TimePeriod `json:"promotionEffectiveTimePeriod,omitempty"` + // PromotionId: Required. The user provided promotion ID to uniquely identify + // the promotion. + PromotionId string `json:"promotionId,omitempty"` + // PromotionStatus: Output only. The current status of the promotion. + PromotionStatus *PromotionPromotionStatus `json:"promotionStatus,omitempty"` + // PromotionUrl: URL to the page on the merchant's site where the promotion + // shows. Local Inventory ads promotions throw an error if no promo url is + // included. URL is used to confirm that the promotion is valid and can be + // redeemed. + PromotionUrl string `json:"promotionUrl,omitempty"` + // RedemptionChannel: Required. Redemption channel for the promotion. At least + // one channel is required. + // + // Possible values: + // "REDEMPTION_CHANNEL_UNSPECIFIED" - Indicates that the channel is + // unspecified. + // "IN_STORE" - Indicates that the channel is in store. + // "ONLINE" - Indicates that the channel is online. + RedemptionChannel []string `json:"redemptionChannel,omitempty"` + // ShippingServiceNames: Shipping service names for the promotion. + ShippingServiceNames []string `json:"shippingServiceNames,omitempty"` + // StoreApplicability: Whether the promotion applies to all stores, or only + // specified stores. Local Inventory ads promotions throw an error if no store + // applicability is included. An INVALID_ARGUMENT error is thrown if + // store_applicability is set to ALL_STORES and store_code or + // score_code_exclusion is set to a value. + // + // Possible values: + // "STORE_APPLICABILITY_UNSPECIFIED" - Which store codes the promotion + // applies to is unknown. + // "ALL_STORES" - Promotion applies to all stores. + // "SPECIFIC_STORES" - Promotion applies to only the specified stores. + StoreApplicability string `json:"storeApplicability,omitempty"` + // StoreCode: Store codes to include for the promotion. + StoreCode []string `json:"storeCode,omitempty"` + // StoreCodeExclusion: Store codes to exclude for the promotion. + StoreCodeExclusion []string `json:"storeCodeExclusion,omitempty"` + // TargetCountry: Required. The target country used as part of the unique + // identifier. Can be `AU`, `CA`, `DE`, `FR`, `GB`, `IN`, `US`, `BR`, `ES`, + // `NL`, `JP`, `IT` or `KR`. + TargetCountry string `json:"targetCountry,omitempty"` -type AccountsLabelsDeleteCall struct { - s *APIService - accountId int64 - labelId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") 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:"-"` } -// Delete: Deletes a label and removes it from all accounts to which it was -// assigned. -// -// - accountId: The id of the account that owns the label. -// - labelId: The id of the label to delete. -func (r *AccountsLabelsService) Delete(accountId int64, labelId int64) *AccountsLabelsDeleteCall { - c := &AccountsLabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.labelId = labelId - return c +func (s Promotion) MarshalJSON() ([]byte, error) { + type NoMethod Promotion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLabelsDeleteCall) Fields(s ...googleapi.Field) *AccountsLabelsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// PromotionPromotionStatus: The status of the promotion. +type PromotionPromotionStatus struct { + // CreationDate: Date on which the promotion has been created in ISO 8601 + // (http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and offset, for + // example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" + CreationDate string `json:"creationDate,omitempty"` + // DestinationStatuses: The intended destinations for the promotion. + DestinationStatuses []*PromotionPromotionStatusDestinationStatus `json:"destinationStatuses,omitempty"` + // LastUpdateDate: Date on which the promotion status has been last updated in + // ISO 8601 (http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and + // offset, for example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" + LastUpdateDate string `json:"lastUpdateDate,omitempty"` + // PromotionIssue: A list of issues associated with the promotion. + PromotionIssue []*PromotionPromotionStatusPromotionIssue `json:"promotionIssue,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreationDate") 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. "CreationDate") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsDeleteCall) Context(ctx context.Context) *AccountsLabelsDeleteCall { - c.ctx_ = ctx - return c +func (s PromotionPromotionStatus) MarshalJSON() ([]byte, error) { + type NoMethod PromotionPromotionStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLabelsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// PromotionPromotionStatusDestinationStatus: The destination status of the +// promotion. +type PromotionPromotionStatusDestinationStatus struct { + // Destination: The name of the destination. + Destination string `json:"destination,omitempty"` + // Status: The status for the specified destination. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown promotion state. + // "IN_REVIEW" - The promotion is under review. + // "REJECTED" - The promotion is disapproved + // "LIVE" - The promotion is approved and active. + // "STOPPED" - The promotion is stopped by merchant. + // "EXPIRED" - The promotion is no longer active. + // "PENDING" - The promotion is not stopped, and all reviews are approved, + // but the active date is in the future. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "Destination") 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. "Destination") 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 (c *AccountsLabelsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), - "labelId": strconv.FormatInt(c.labelId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s PromotionPromotionStatusDestinationStatus) MarshalJSON() ([]byte, error) { + type NoMethod PromotionPromotionStatusDestinationStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.labels.delete" call. -func (c *AccountsLabelsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +// PromotionPromotionStatusPromotionIssue: The issue associated with the +// promotion. +type PromotionPromotionStatusPromotionIssue struct { + // Code: Code of the issue. + Code string `json:"code,omitempty"` + // Detail: Explanation of the issue. + Detail string `json:"detail,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:"-"` } -type AccountsLabelsListCall struct { - s *APIService - accountId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s PromotionPromotionStatusPromotionIssue) MarshalJSON() ([]byte, error) { + type NoMethod PromotionPromotionStatusPromotionIssue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// List: Lists the labels assigned to an account. -// -// - accountId: The account id for whose labels are to be listed. -func (r *AccountsLabelsService) List(accountId int64) *AccountsLabelsListCall { - c := &AccountsLabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - return c -} +// PubsubNotificationSettings: Settings for Pub/Sub notifications, all methods +// require that the caller is a direct user of the merchant center account. +type PubsubNotificationSettings struct { + // CloudTopicName: Cloud pub/sub topic to which notifications are sent + // (read-only). + CloudTopicName string `json:"cloudTopicName,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#pubsubNotificationSettings" + Kind string `json:"kind,omitempty"` + // RegisteredEvents: List of event types. Acceptable values are: - + // "orderPendingShipment" + RegisteredEvents []string `json:"registeredEvents,omitempty"` -// PageSize sets the optional parameter "pageSize": The maximum number of -// labels to return. The service may return fewer than this value. If -// unspecified, at most 50 labels will be returned. The maximum value is 1000; -// values above 1000 will be coerced to 1000. -func (c *AccountsLabelsListCall) PageSize(pageSize int64) *AccountsLabelsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CloudTopicName") 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. "CloudTopicName") 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:"-"` } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListAccountLabels` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListAccountLabels` must match the call that provided the page token. -func (c *AccountsLabelsListCall) PageToken(pageToken string) *AccountsLabelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (s PubsubNotificationSettings) MarshalJSON() ([]byte, error) { + type NoMethod PubsubNotificationSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLabelsListCall) Fields(s ...googleapi.Field) *AccountsLabelsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type RateGroup struct { + // ApplicableShippingLabels: A list of shipping labels defining the products to + // which this rate group applies to. This is a disjunction: only one of the + // labels has to match for the rate group to apply. May only be empty for the + // last rate group of a service. Required. + ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"` + // CarrierRates: A list of carrier rates that can be referred to by `mainTable` + // or `singleValue`. + CarrierRates []*CarrierRate `json:"carrierRates,omitempty"` + // MainTable: A table defining the rate group, when `singleValue` is not + // expressive enough. Can only be set if `singleValue` is not set. + MainTable *Table `json:"mainTable,omitempty"` + // Name: Name of the rate group. Optional. If set has to be unique within + // shipping service. + Name string `json:"name,omitempty"` + // SingleValue: The value of the rate group (for example, flat rate $10). Can + // only be set if `mainTable` and `subtables` are not set. + SingleValue *Value `json:"singleValue,omitempty"` + // Subtables: A list of subtables referred to by `mainTable`. Can only be set + // if `mainTable` is set. + Subtables []*Table `json:"subtables,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApplicableShippingLabels") + // 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. "ApplicableShippingLabels") 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:"-"` } -// 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 *AccountsLabelsListCall) IfNoneMatch(entityTag string) *AccountsLabelsListCall { - c.ifNoneMatch_ = entityTag - return c +func (s RateGroup) MarshalJSON() ([]byte, error) { + type NoMethod RateGroup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsListCall) Context(ctx context.Context) *AccountsLabelsListCall { - c.ctx_ = ctx - return c +// Recommendation: Recommendations are suggested ways to improve your merchant +// account's performance. For example, to engage with a feature, or start using +// a new Google product. +type Recommendation struct { + // AdditionalCallToAction: Output only. CTAs of this recommendation. Repeated. + AdditionalCallToAction []*RecommendationCallToAction `json:"additionalCallToAction,omitempty"` + // AdditionalDescriptions: Output only. List of additional localized + // descriptions for a recommendation. Localication uses the `languageCode` + // field in `GenerateRecommendations` requests. Not all description types are + // guaranteed to be present and we recommend to rely on default description. + AdditionalDescriptions []*RecommendationDescription `json:"additionalDescriptions,omitempty"` + // Creative: Output only. Any creatives attached to the recommendation. + // Repeated. + Creative []*RecommendationCreative `json:"creative,omitempty"` + // DefaultCallToAction: Optional. Default CTA of the recommendation. + DefaultCallToAction *RecommendationCallToAction `json:"defaultCallToAction,omitempty"` + // DefaultDescription: Optional. Localized recommendation description. The + // localization the {@link `GenerateRecommendationsRequest.language_code`} + // field in {@link `GenerateRecommendationsRequest`} requests. + DefaultDescription string `json:"defaultDescription,omitempty"` + // NumericalImpact: Optional. A numerical score of the impact from the + // recommendation's description. For example, a recommendation might suggest an + // upward trend in sales for a certain product. Higher number means larger + // impact. + NumericalImpact int64 `json:"numericalImpact,omitempty"` + // Paid: Optional. Indicates whether a user needs to pay when they complete the + // user journey suggested by the recommendation. + Paid bool `json:"paid,omitempty"` + // RecommendationName: Optional. Localized recommendation name. The + // localization uses the {@link `GenerateRecommendationsRequest.language_code`} + // field in {@link `GenerateRecommendationsRequest`} requests. + RecommendationName string `json:"recommendationName,omitempty"` + // SubType: Optional. Subtype of the recommendations. Only applicable when + // multiple recommendations can be generated per type, and is used as an + // identifier of recommendation under the same recommendation type. + SubType string `json:"subType,omitempty"` + // Title: Optional. Localized Recommendation Title. Localization uses the + // {@link `GenerateRecommendationsRequest.language_code`} field in {@link + // `GenerateRecommendationsRequest`} requests. + Title string `json:"title,omitempty"` + // Type: Output only. Type of the recommendation. List of currently available + // recommendation types: - OPPORTUNITY_CREATE_NEW_COLLECTION - + // OPPORTUNITY_CREATE_EMAIL_CAMPAIGN + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdditionalCallToAction") 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. "AdditionalCallToAction") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLabelsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s Recommendation) MarshalJSON() ([]byte, error) { + type NoMethod Recommendation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsLabelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// RecommendationCallToAction: Call to action (CTA) that explains how a +// merchant can implement this recommendation +type RecommendationCallToAction struct { + // Intent: Output only. Intent of the action. This value describes the intent + // (for example, `OPEN_CREATE_EMAIL_CAMPAIGN_FLOW`) and can vary from + // recommendation to recommendation. This value can change over time for the + // same recommendation. Currently available intent values: - + // OPEN_CREATE_EMAIL_CAMPAIGN_FLOW: Opens a user journey where they can create + // a marketing email campaign. (No default URL) - OPEN_CREATE_COLLECTION_TAB: + // Opens a user journey where they can create a collection + // (https://support.google.com/merchants/answer/9703228) for their Merchant + // account. (No default URL) + Intent string `json:"intent,omitempty"` + // LocalizedText: Output only. Localized text of the CTA. Optional. + LocalizedText string `json:"localizedText,omitempty"` + // Uri: Optional. URL of the CTA. This field will only be set for some + // recommendations where there is a suggested landing URL. Otherwise it will be + // set to an empty string. We recommend developers to use their own custom + // landing page according to the description of the intent field above when + // this uri field is empty. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Intent") 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. "Intent") 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:"-"` } -// Do executes the "content.accounts.labels.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAccountLabelsResponse.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 *AccountsLabelsListCall) Do(opts ...googleapi.CallOption) (*ListAccountLabelsResponse, 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 := &ListAccountLabelsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s RecommendationCallToAction) MarshalJSON() ([]byte, error) { + type NoMethod RecommendationCallToAction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *AccountsLabelsListCall) Pages(ctx context.Context, f func(*ListAccountLabelsResponse) 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) - } +// RecommendationCreative: Creative is a multimedia attachment to +// recommendation that can be used on the frontend. +type RecommendationCreative struct { + // Type: Type of the creative. + // + // Possible values: + // "CREATIVE_TYPE_UNSPECIFIED" - Default value. If provided, shall be + // considered invalid. + // "VIDEO" - Video creatives. + // "PHOTO" - Photo creatives. + Type string `json:"type,omitempty"` + // Uri: URL of the creative. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Type") 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. "Type") 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:"-"` } -type AccountsLabelsPatchCall struct { - s *APIService - accountId int64 - labelId int64 - accountlabel *AccountLabel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s RecommendationCreative) MarshalJSON() ([]byte, error) { + type NoMethod RecommendationCreative + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Patch: Updates a label. -// -// - accountId: The id of the account this label belongs to. -// - labelId: The id of the label to update. -func (r *AccountsLabelsService) Patch(accountId int64, labelId int64, accountlabel *AccountLabel) *AccountsLabelsPatchCall { - c := &AccountsLabelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.labelId = labelId - c.accountlabel = accountlabel - return c +// RecommendationDescription: Google-provided description for the +// recommendation. +type RecommendationDescription struct { + // Text: Output only. Text of the description. + Text string `json:"text,omitempty"` + // Type: Output only. Type of the description. + // + // Possible values: + // "DESCRIPTION_TYPE_UNSPECIFIED" - Default value. Will never be provided by + // the API. + // "SHORT" - Short description. + // "LONG" - Long description. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Text") 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. "Text") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsLabelsPatchCall) Fields(s ...googleapi.Field) *AccountsLabelsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RecommendationDescription) MarshalJSON() ([]byte, error) { + type NoMethod RecommendationDescription + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsLabelsPatchCall) Context(ctx context.Context) *AccountsLabelsPatchCall { - c.ctx_ = ctx - return c -} +// Region: Represents a geographic region that you can use as a target with +// both the `RegionalInventory` and `ShippingSettings` services. You can define +// regions as collections of either postal codes or, in some countries, using +// predefined geotargets. +type Region struct { + // DisplayName: The display name of the region. + DisplayName string `json:"displayName,omitempty"` + // GeotargetArea: A list of geotargets that defines the region area. + GeotargetArea *RegionGeoTargetArea `json:"geotargetArea,omitempty"` + // MerchantId: Output only. Immutable. Merchant that owns the region. + MerchantId int64 `json:"merchantId,omitempty,string"` + // PostalCodeArea: A list of postal codes that defines the region area. + PostalCodeArea *RegionPostalCodeArea `json:"postalCodeArea,omitempty"` + // RegionId: Output only. Immutable. The ID uniquely identifying each region. + RegionId string `json:"regionId,omitempty"` + // RegionalInventoryEligible: Output only. Indicates if the region is eligible + // to use in the Regional Inventory configuration. + RegionalInventoryEligible bool `json:"regionalInventoryEligible,omitempty"` + // ShippingEligible: Output only. Indicates if the region is eligible to use in + // the Shipping Services configuration. + ShippingEligible bool `json:"shippingEligible,omitempty"` -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsLabelsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 (c *AccountsLabelsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountlabel) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") - 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - "labelId": strconv.FormatInt(c.labelId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s Region) MarshalJSON() ([]byte, error) { + type NoMethod Region + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.labels.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountLabel.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 *AccountsLabelsPatchCall) Do(opts ...googleapi.CallOption) (*AccountLabel, 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 := &AccountLabel{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +// RegionGeoTargetArea: A list of geotargets that defines the region area. +type RegionGeoTargetArea struct { + // GeotargetCriteriaIds: Required. A non-empty list of location IDs + // (https://developers.google.com/adwords/api/docs/appendix/geotargeting). They + // must all be of the same location type (e.g., state). + GeotargetCriteriaIds googleapi.Int64s `json:"geotargetCriteriaIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "GeotargetCriteriaIds") 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. "GeotargetCriteriaIds") 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:"-"` } -type AccountsReturncarrierCreateCall struct { - s *APIService - accountId int64 - accountreturncarrier *AccountReturnCarrier - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s RegionGeoTargetArea) MarshalJSON() ([]byte, error) { + type NoMethod RegionGeoTargetArea + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Create: Links return carrier to a merchant account. -// -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -func (r *AccountsReturncarrierService) Create(accountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierCreateCall { - c := &AccountsReturncarrierCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.accountreturncarrier = accountreturncarrier - return c +// RegionPostalCodeArea: A list of postal codes that defines the region area. +// Note: All regions defined using postal codes are accessible via the +// account's `ShippingSettings.postalCodeGroups` resource. +type RegionPostalCodeArea struct { + // PostalCodes: Required. A range of postal codes. + PostalCodes []*RegionPostalCodeAreaPostalCodeRange `json:"postalCodes,omitempty"` + // RegionCode: Required. CLDR territory code or the country the postal code + // group applies to. + RegionCode string `json:"regionCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostalCodes") 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. "PostalCodes") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsReturncarrierCreateCall) Fields(s ...googleapi.Field) *AccountsReturncarrierCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RegionPostalCodeArea) MarshalJSON() ([]byte, error) { + type NoMethod RegionPostalCodeArea + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierCreateCall) Context(ctx context.Context) *AccountsReturncarrierCreateCall { - c.ctx_ = ctx - return c +// RegionPostalCodeAreaPostalCodeRange: A range of postal codes that defines +// the region area. +type RegionPostalCodeAreaPostalCodeRange struct { + // Begin: Required. A postal code or a pattern of the form prefix* denoting the + // inclusive lower bound of the range defining the area. Examples values: + // "94108", "9410*", "9*". + Begin string `json:"begin,omitempty"` + // End: Optional. A postal code or a pattern of the form prefix* denoting the + // inclusive upper bound of the range defining the area. It must have the same + // length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code + // then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin + // is a pattern then postalCodeRangeEnd must be a pattern with the same prefix + // length. Optional: if not set, then the area is defined as being all the + // postal codes matching postalCodeRangeBegin. + End string `json:"end,omitempty"` + // ForceSendFields is a list of field names (e.g. "Begin") 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. "Begin") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsReturncarrierCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s RegionPostalCodeAreaPostalCodeRange) MarshalJSON() ([]byte, error) { + type NoMethod RegionPostalCodeAreaPostalCodeRange + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsReturncarrierCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountreturncarrier) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") - 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} +// RegionalInventory: Regional inventory resource. contains the regional name +// and all attributes which are overridden for the specified region. +type RegionalInventory struct { + // Availability: The availability of the product. + Availability string `json:"availability,omitempty"` + // CustomAttributes: A list of custom (merchant-provided) attributes. It can + // also be used for submitting any attribute of the feed specification in its + // generic form. + CustomAttributes []*CustomAttribute `json:"customAttributes,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#regionalInventory". + Kind string `json:"kind,omitempty"` + // Price: The price of the product. + Price *Price `json:"price,omitempty"` + // RegionId: The ID uniquely identifying each region. + RegionId string `json:"regionId,omitempty"` + // SalePrice: The sale price of the product. Mandatory if + // `sale_price_effective_date` is defined. + SalePrice *Price `json:"salePrice,omitempty"` + // SalePriceEffectiveDate: A date range represented by a pair of ISO 8601 dates + // separated by a space, comma, or slash. Both dates might be specified as + // 'null' if undecided. + SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"` -// Do executes the "content.accounts.returncarrier.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountReturnCarrier.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 *AccountsReturncarrierCreateCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, 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 := &AccountReturnCarrier{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Availability") 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. "Availability") 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:"-"` } -type AccountsReturncarrierDeleteCall struct { - s *APIService - accountId int64 - carrierAccountId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s RegionalInventory) MarshalJSON() ([]byte, error) { + type NoMethod RegionalInventory + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Delete: Delete a return carrier in the merchant account. -// -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -// - carrierAccountId: The Google-provided unique carrier ID, used to update -// the resource. -func (r *AccountsReturncarrierService) Delete(accountId int64, carrierAccountId int64) *AccountsReturncarrierDeleteCall { - c := &AccountsReturncarrierDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.carrierAccountId = carrierAccountId - return c +type RegionalinventoryCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*RegionalinventoryCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsReturncarrierDeleteCall) Fields(s ...googleapi.Field) *AccountsReturncarrierDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RegionalinventoryCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionalinventoryCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierDeleteCall) Context(ctx context.Context) *AccountsReturncarrierDeleteCall { - c.ctx_ = ctx - return c +// RegionalinventoryCustomBatchRequestEntry: A batch entry encoding a single +// non-batch regional inventory request. +type RegionalinventoryCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: Method of the batch request entry. Acceptable values are: - + // "insert" + Method string `json:"method,omitempty"` + // ProductId: The ID of the product for which to update price and availability. + ProductId string `json:"productId,omitempty"` + // RegionalInventory: Price and availability of the product. + RegionalInventory *RegionalInventory `json:"regionalInventory,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsReturncarrierDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s RegionalinventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod RegionalinventoryCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsReturncarrierDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), - "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type RegionalinventoryCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*RegionalinventoryCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#regionalinventoryCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// Do executes the "content.accounts.returncarrier.delete" call. -func (c *AccountsReturncarrierDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +func (s RegionalinventoryCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod RegionalinventoryCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountsReturncarrierListCall struct { - s *APIService - accountId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// RegionalinventoryCustomBatchResponseEntry: A batch entry encoding a single +// non-batch regional inventory response. +type RegionalinventoryCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry this entry responds to. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#regionalinventoryCustomBatchResponseEntry". + Kind string `json:"kind,omitempty"` + // RegionalInventory: Price and availability of the product. + RegionalInventory *RegionalInventory `json:"regionalInventory,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// List: Lists available return carriers in the merchant account. -// -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -func (r *AccountsReturncarrierService) List(accountId int64) *AccountsReturncarrierListCall { - c := &AccountsReturncarrierListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - return c +func (s RegionalinventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod RegionalinventoryCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RenderAccountIssuesRequestPayload: The payload for configuring how the +// content should be rendered. +type RenderAccountIssuesRequestPayload struct { + // ContentOption: Optional. How the detailed content should be returned. + // Default option is to return the content as a pre-rendered HTML text. + // + // Possible values: + // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be provided by + // the API. + // "PRE_RENDERED_HTML" - Returns the detail of the issue as a pre-rendered + // HTML text. + ContentOption string `json:"contentOption,omitempty"` + // UserInputActionOption: Optional. How actions with user input form should be + // handled. If not provided, actions will be returned as links that points + // merchant to Merchant Center where they can request the action. + // + // Possible values: + // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. Will + // never be provided by the API. + // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are + // represented only as links that points merchant to Merchant Center where they + // can request the action. Provides easier to implement alternative to + // `BUILT_IN_USER_INPUT_ACTIONS`. + // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form definition + // for each complex action. Your application needs to display this content and + // input form to the merchant before they can request processing of the action. + // To start the action, your application needs to call the `triggeraction` + // method. + UserInputActionOption string `json:"userInputActionOption,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentOption") 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. "ContentOption") 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 RenderAccountIssuesRequestPayload) MarshalJSON() ([]byte, error) { + type NoMethod RenderAccountIssuesRequestPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RenderAccountIssuesResponse: Response containing support content and actions +// for listed account issues. +type RenderAccountIssuesResponse struct { + // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) contains + // a link to a page where merchant can bring their appeal to an external body + // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). + // If the ADR is present, it MUST be available to the merchant on the page that + // shows the list with their account issues. + AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` + // Issues: List of account issues for a given account. This list can be shown + // with compressed, expandable items. In the compressed form, the title and + // impact should be shown for each issue. Once the issue is expanded, the + // detailed content and available actions should be rendered. + Issues []*AccountIssue `json:"issues,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AlternateDisputeResolution") + // 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. "AlternateDisputeResolution") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsReturncarrierListCall) Fields(s ...googleapi.Field) *AccountsReturncarrierListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RenderAccountIssuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RenderAccountIssuesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *AccountsReturncarrierListCall) IfNoneMatch(entityTag string) *AccountsReturncarrierListCall { - c.ifNoneMatch_ = entityTag - return c +// RenderProductIssuesRequestPayload: The payload for configuring how the +// content should be rendered. +type RenderProductIssuesRequestPayload struct { + // ContentOption: Optional. How the detailed content should be returned. + // Default option is to return the content as a pre-rendered HTML text. + // + // Possible values: + // "CONTENT_OPTION_UNSPECIFIED" - Default value. Will never be provided by + // the API. + // "PRE_RENDERED_HTML" - Returns the detail of the issue as a pre-rendered + // HTML text. + ContentOption string `json:"contentOption,omitempty"` + // UserInputActionOption: Optional. How actions with user input form should be + // handled. If not provided, actions will be returned as links that points + // merchant to Merchant Center where they can request the action. + // + // Possible values: + // "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" - Default value. Will + // never be provided by the API. + // "REDIRECT_TO_MERCHANT_CENTER" - Actions that require user input are + // represented only as links that points merchant to Merchant Center where they + // can request the action. Provides easier to implement alternative to + // `BUILT_IN_USER_INPUT_ACTIONS`. + // "BUILT_IN_USER_INPUT_ACTIONS" - Returns content and input form definition + // for each complex action. Your application needs to display this content and + // input form to the merchant before they can request processing of the action. + // To start the action, your application needs to call the `triggeraction` + // method. + UserInputActionOption string `json:"userInputActionOption,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentOption") 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. "ContentOption") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierListCall) Context(ctx context.Context) *AccountsReturncarrierListCall { - c.ctx_ = ctx - return c +func (s RenderProductIssuesRequestPayload) MarshalJSON() ([]byte, error) { + type NoMethod RenderProductIssuesRequestPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsReturncarrierListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// RenderProductIssuesResponse: Response containing support content and actions +// for listed product issues. +type RenderProductIssuesResponse struct { + // AlternateDisputeResolution: The Alternate Dispute Resolution (ADR) contains + // a link to a page where merchant can bring their appeal to an external body + // (https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). + // If present, the link should be shown on the same page as the list of issues. + AlternateDisputeResolution *AlternateDisputeResolution `json:"alternateDisputeResolution,omitempty"` + // Issues: List of issues for a given product. This list can be shown with + // compressed, expandable items. In the compressed form, the title and impact + // should be shown for each issue. Once the issue is expanded, the detailed + // content and available actions should be rendered. + Issues []*ProductIssue `json:"issues,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AlternateDisputeResolution") + // 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. "AlternateDisputeResolution") 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 (c *AccountsReturncarrierListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "accountId": strconv.FormatInt(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s RenderProductIssuesResponse) MarshalJSON() ([]byte, error) { + type NoMethod RenderProductIssuesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.accounts.returncarrier.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListAccountReturnCarrierResponse.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 *AccountsReturncarrierListCall) Do(opts ...googleapi.CallOption) (*ListAccountReturnCarrierResponse, 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 := &ListAccountReturnCarrierResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +// ReportInteractionRequest: Request to report interactions on a +// recommendation. +type ReportInteractionRequest struct { + // InteractionType: Required. Type of the interaction that is reported, for + // example INTERACTION_CLICK. + // + // Possible values: + // "INTERACTION_TYPE_UNSPECIFIED" - Default value. If provided, the service + // will throw ApiError with description "Required parameter: interactionType". + // "INTERACTION_DISMISS" - When a recommendation is dismissed. + // "INTERACTION_CLICK" - When a recommendation is clicked. + InteractionType string `json:"interactionType,omitempty"` + // ResponseToken: Required. Token of the response when recommendation was + // returned. + ResponseToken string `json:"responseToken,omitempty"` + // Subtype: Optional. Subtype of the recommendations this interaction happened + // on. This field must be set only to the value that is returned by {@link + // `RecommendationsService.GenerateRecommendations`} call. + Subtype string `json:"subtype,omitempty"` + // Type: Required. Type of the recommendations on which this interaction + // happened. This field must be set only to the value that is returned by + // {@link `GenerateRecommendationsResponse`} call. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "InteractionType") 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. "InteractionType") 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:"-"` } -type AccountsReturncarrierPatchCall struct { - s *APIService - accountId int64 - carrierAccountId int64 - accountreturncarrier *AccountReturnCarrier - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ReportInteractionRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReportInteractionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Patch: Updates a return carrier in the merchant account. -// -// - accountId: The Merchant Center Account Id under which the Return Carrier -// is to be linked. -// - carrierAccountId: The Google-provided unique carrier ID, used to update -// the resource. -func (r *AccountsReturncarrierService) Patch(accountId int64, carrierAccountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierPatchCall { - c := &AccountsReturncarrierPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountId = accountId - c.carrierAccountId = carrierAccountId - c.accountreturncarrier = accountreturncarrier - return c +// ReportRow: Result row returned from the search query. +type ReportRow struct { + // BestSellers: Best sellers fields requested by the merchant in the query. + // Field values are only set if the merchant queries + // `BestSellersProductClusterView` or `BestSellersBrandView`. + BestSellers *BestSellers `json:"bestSellers,omitempty"` + // Brand: Brand fields requested by the merchant in the query. Field values are + // only set if the merchant queries `BestSellersBrandView`. + Brand *Brand `json:"brand,omitempty"` + // CompetitiveVisibility: Competitive visibility fields requested by the + // merchant in the query. Field values are only set if the merchant queries + // `CompetitiveVisibilityTopMerchantView`, `CompetitiveVisibilityBenchmarkView` + // or `CompetitiveVisibilityCompetitorView`. + CompetitiveVisibility *CompetitiveVisibility `json:"competitiveVisibility,omitempty"` + // Metrics: Metrics requested by the merchant in the query. Metric values are + // only set for metrics requested explicitly in the query. + Metrics *Metrics `json:"metrics,omitempty"` + // PriceCompetitiveness: Price competitiveness fields requested by the merchant + // in the query. Field values are only set if the merchant queries + // `PriceCompetitivenessProductView`. + PriceCompetitiveness *PriceCompetitiveness `json:"priceCompetitiveness,omitempty"` + // PriceInsights: Price insights fields requested by the merchant in the query. + // Field values are only set if the merchant queries + // `PriceInsightsProductView`. + PriceInsights *PriceInsights `json:"priceInsights,omitempty"` + // ProductCluster: Product cluster fields requested by the merchant in the + // query. Field values are only set if the merchant queries + // `BestSellersProductClusterView`. + ProductCluster *ProductCluster `json:"productCluster,omitempty"` + // ProductView: Product fields requested by the merchant in the query. Field + // values are only set if the merchant queries `ProductView`. + ProductView *ProductView `json:"productView,omitempty"` + // Segments: Segmentation dimensions requested by the merchant in the query. + // Dimension values are only set for dimensions requested explicitly in the + // query. + Segments *Segments `json:"segments,omitempty"` + // TopicTrends: Topic trends + // (https://support.google.com/merchants/answer/13542370) fields requested by + // the merchant in the query. Field values are only set if the merchant queries + // `TopicTrendsView`. + TopicTrends *TopicTrends `json:"topicTrends,omitempty"` + // ForceSendFields is a list of field names (e.g. "BestSellers") 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. "BestSellers") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountsReturncarrierPatchCall) Fields(s ...googleapi.Field) *AccountsReturncarrierPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ReportRow) MarshalJSON() ([]byte, error) { + type NoMethod ReportRow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountsReturncarrierPatchCall) Context(ctx context.Context) *AccountsReturncarrierPatchCall { - c.ctx_ = ctx - return c +// RequestPhoneVerificationRequest: Request message for the +// RequestPhoneVerification method. +type RequestPhoneVerificationRequest struct { + // LanguageCode: Language code IETF BCP 47 syntax + // (https://tools.ietf.org/html/bcp47) (for example, en-US). Language code is + // used to provide localized `SMS` and `PHONE_CALL`. Default language used is + // en-US if not provided. + LanguageCode string `json:"languageCode,omitempty"` + // PhoneNumber: Phone number to be verified. + PhoneNumber string `json:"phoneNumber,omitempty"` + // PhoneRegionCode: Required. Two letter country code for the phone number, for + // example `CA` for Canadian numbers. See the ISO 3166-1 alpha-2 + // (https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) + // officially assigned codes. + PhoneRegionCode string `json:"phoneRegionCode,omitempty"` + // PhoneVerificationMethod: Verification method to receive verification code. + // + // Possible values: + // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. + // "SMS" - Receive verification code by SMS. + // "PHONE_CALL" - Receive verification code by phone call. + PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` + // ForceSendFields is a list of field names (e.g. "LanguageCode") 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. "LanguageCode") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountsReturncarrierPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s RequestPhoneVerificationRequest) MarshalJSON() ([]byte, error) { + type NoMethod RequestPhoneVerificationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountsReturncarrierPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountreturncarrier) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") - 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{ - "accountId": strconv.FormatInt(c.accountId, 10), - "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} +// RequestPhoneVerificationResponse: Response message for the +// RequestPhoneVerification method. +type RequestPhoneVerificationResponse struct { + // VerificationId: The verification ID to use in subsequent calls to + // `verifyphonenumber`. + VerificationId string `json:"verificationId,omitempty"` -// Do executes the "content.accounts.returncarrier.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountReturnCarrier.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 *AccountsReturncarrierPatchCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, 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 := &AccountReturnCarrier{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "VerificationId") 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. "VerificationId") 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:"-"` } -type AccountstatusesCustombatchCall struct { - s *APIService - accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s RequestPhoneVerificationResponse) MarshalJSON() ([]byte, error) { + type NoMethod RequestPhoneVerificationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Custombatch: Retrieves multiple Merchant Center account statuses in a single -// request. -func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { - c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accountstatusescustombatchrequest = accountstatusescustombatchrequest - return c +// RequestReviewFreeListingsRequest: Request message for the +// RequestReviewFreeListings Program method. +type RequestReviewFreeListingsRequest struct { + // RegionCode: The code ISO 3166-1 alpha-2 + // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country for which + // review is to be requested. + RegionCode string `json:"regionCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "RegionCode") 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. "RegionCode") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s RequestReviewFreeListingsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RequestReviewFreeListingsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { - c.ctx_ = ctx - return c +// RequestReviewShoppingAdsRequest: Request message for the +// RequestReviewShoppingAds program method. +type RequestReviewShoppingAdsRequest struct { + // RegionCode: The code ISO 3166-1 alpha-2 + // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country for which + // review is to be requested. + RegionCode string `json:"regionCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "RegionCode") 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. "RegionCode") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountstatusesCustombatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s RequestReviewShoppingAdsRequest) MarshalJSON() ([]byte, error) { + type NoMethod RequestReviewShoppingAdsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ReturnAddress: Return address resource. +type ReturnAddress struct { + // Address: Required. The address. + Address *ReturnAddressAddress `json:"address,omitempty"` + // Country: Required. The country of sale where the return address is + // applicable. + Country string `json:"country,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnAddress" + Kind string `json:"kind,omitempty"` + // Label: Required. The user-defined label of the return address. For the + // default address, use the label "default". + Label string `json:"label,omitempty"` + // PhoneNumber: Required. The merchant's contact phone number regarding the + // return. + PhoneNumber string `json:"phoneNumber,omitempty"` + // ReturnAddressId: Return address ID generated by Google. + ReturnAddressId string `json:"returnAddressId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Address") 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. "Address") 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:"-"` } -// Do executes the "content.accountstatuses.custombatch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountstatusesCustomBatchResponse.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 *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, 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 := &AccountstatusesCustomBatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ReturnAddress) MarshalJSON() ([]byte, error) { + type NoMethod ReturnAddress + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountstatusesGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReturnAddressAddress struct { + // Country: CLDR country code (for example, "US"). + Country string `json:"country,omitempty"` + // Locality: City, town or commune. May also include dependent localities or + // sublocalities (for example, neighborhoods or suburbs). + Locality string `json:"locality,omitempty"` + // PostalCode: Postal code or ZIP (for example, "94043"). + PostalCode string `json:"postalCode,omitempty"` + // RecipientName: Name of the recipient to address returns to. + RecipientName string `json:"recipientName,omitempty"` + // Region: Top-level administrative subdivision of the country. For example, a + // state like California ("CA") or a province like Quebec ("QC"). + Region string `json:"region,omitempty"` + // StreetAddress: Street-level part of the address. May be up to two lines, + // each line specified as an array element. + StreetAddress []string `json:"streetAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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:"-"` } -// Get: Retrieves the status of a Merchant Center account. No itemLevelIssues -// are returned for multi-client accounts. -// -// - accountId: The ID of the account. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { - c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c +func (s ReturnAddressAddress) MarshalJSON() ([]byte, error) { + type NoMethod ReturnAddressAddress + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Destinations sets the optional parameter "destinations": If set, only issues -// for the specified destinations are returned, otherwise only issues for the -// Shopping destination. -func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) - return c +// ReturnPolicy: Return policy resource. +type ReturnPolicy struct { + // Country: Required. The country of sale where the return policy is + // applicable. + Country string `json:"country,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnPolicy" + Kind string `json:"kind,omitempty"` + // Label: Required. The user-defined label of the return policy. For the + // default policy, use the label "default". + Label string `json:"label,omitempty"` + // Name: Required. The name of the policy as shown in Merchant Center. + Name string `json:"name,omitempty"` + // NonFreeReturnReasons: Return reasons that will incur return fees. + NonFreeReturnReasons []string `json:"nonFreeReturnReasons,omitempty"` + // Policy: Required. The policy. + Policy *ReturnPolicyPolicy `json:"policy,omitempty"` + // ReturnPolicyId: Return policy ID generated by Google. + ReturnPolicyId string `json:"returnPolicyId,omitempty"` + // ReturnShippingFee: The return shipping fee that will apply to non free + // return reasons. + ReturnShippingFee *Price `json:"returnShippingFee,omitempty"` + // SeasonalOverrides: An optional list of seasonal overrides. + SeasonalOverrides []*ReturnPolicySeasonalOverride `json:"seasonalOverrides,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Country") 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. "Country") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ReturnPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { - c.ifNoneMatch_ = entityTag - return c +// ReturnPolicyOnline: Return policy online object. This is currently used to +// represent return policies for ads and free listings programs. +type ReturnPolicyOnline struct { + // Countries: The countries of sale where the return policy is applicable. The + // values must be a valid 2 letter ISO 3166 code, e.g. "US". + Countries []string `json:"countries,omitempty"` + // ItemConditions: The item conditions that are accepted for returns. This is + // required to not be empty unless the type of return policy is noReturns. + // + // Possible values: + // "ITEM_CONDITION_UNSPECIFIED" - Default value. This value is unused. + // "NEW" - New. + // "USED" - Used. + ItemConditions []string `json:"itemConditions,omitempty"` + // Label: The unique user-defined label of the return policy. The same label + // cannot be used in different return policies for the same country. Policies + // with the label 'default' will apply to all products, unless a product + // specifies a return_policy_label attribute. + Label string `json:"label,omitempty"` + // Name: The name of the policy as shown in Merchant Center. + Name string `json:"name,omitempty"` + // Policy: The return policy. + Policy *ReturnPolicyOnlinePolicy `json:"policy,omitempty"` + // RestockingFee: The restocking fee that applies to all return reason + // categories. This would be treated as a free restocking fee if the value is + // not set. + RestockingFee *ReturnPolicyOnlineRestockingFee `json:"restockingFee,omitempty"` + // ReturnMethods: The return methods of how customers can return an item. This + // value is required to not be empty unless the type of return policy is + // noReturns. + // + // Possible values: + // "RETURN_METHOD_UNSPECIFIED" - Default value. This value is unused. + // "BY_MAIL" - By mail. + // "IN_STORE" - In store. + // "AT_A_KIOSK" - At a kiosk. + ReturnMethods []string `json:"returnMethods,omitempty"` + // ReturnPolicyId: Output only. Return policy ID generated by Google. + ReturnPolicyId string `json:"returnPolicyId,omitempty"` + // ReturnPolicyUri: The return policy uri. This can used by Google to do a + // sanity check for the policy. + ReturnPolicyUri string `json:"returnPolicyUri,omitempty"` + // ReturnReasonCategoryInfo: The return reason category information. This + // required to not be empty unless the type of return policy is noReturns. + ReturnReasonCategoryInfo []*ReturnPolicyOnlineReturnReasonCategoryInfo `json:"returnReasonCategoryInfo,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Countries") 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. "Countries") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { - c.ctx_ = ctx - return c +func (s ReturnPolicyOnline) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnline + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountstatusesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// ReturnPolicyOnlinePolicy: The available policies. +type ReturnPolicyOnlinePolicy struct { + // Days: The number of days items can be returned after delivery, where one day + // is defined to be 24 hours after the delivery timestamp. Required for + // `numberOfDaysAfterDelivery` returns. + Days int64 `json:"days,omitempty,string"` + // Type: Policy type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. This value is unused. + // "NUMBER_OF_DAYS_AFTER_DELIVERY" - Number of days after a return is + // delivered. + // "NO_RETURNS" - No returns. + // "LIFETIME_RETURNS" - Life time returns. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Days") 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. "Days") 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 ReturnPolicyOnlinePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnlinePolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ReturnPolicyOnlineRestockingFee: The restocking fee. This can either be a +// fixed fee or a micro percent. +type ReturnPolicyOnlineRestockingFee struct { + // FixedFee: Fixed restocking fee. + FixedFee *PriceAmount `json:"fixedFee,omitempty"` + // MicroPercent: Percent of total price in micros. 15,000,000 means 15% of the + // total price would be charged. + MicroPercent int64 `json:"microPercent,omitempty"` + // ForceSendFields is a list of field names (e.g. "FixedFee") 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. "FixedFee") 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:"-"` } -// Do executes the "content.accountstatuses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountStatus.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 *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, 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 := &AccountStatus{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ReturnPolicyOnlineRestockingFee) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnlineRestockingFee + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccountstatusesListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// ReturnPolicyOnlineReturnReasonCategoryInfo: The return reason category info +// wrapper. +type ReturnPolicyOnlineReturnReasonCategoryInfo struct { + // ReturnLabelSource: The corresponding return label source. + // + // Possible values: + // "RETURN_LABEL_SOURCE_UNSPECIFIED" - Default value. This value is unused. + // "DOWNLOAD_AND_PRINT" - Download and print the label. + // "IN_THE_BOX" - Label in the box. + // "CUSTOMER_RESPONSIBILITY" - Customers' responsibility to get the label. + ReturnLabelSource string `json:"returnLabelSource,omitempty"` + // ReturnReasonCategory: The return reason category. + // + // Possible values: + // "RETURN_REASON_CATEGORY_UNSPECIFIED" - Default value. This value is + // unused. + // "BUYER_REMORSE" - Buyer remorse. + // "ITEM_DEFECT" - Item defect. + ReturnReasonCategory string `json:"returnReasonCategory,omitempty"` + // ReturnShippingFee: The corresponding return shipping fee. This is only + // applicable when returnLabelSource is not the customer's responsibility. + ReturnShippingFee *ReturnPolicyOnlineReturnShippingFee `json:"returnShippingFee,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReturnLabelSource") 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. "ReturnLabelSource") 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:"-"` } -// List: Lists the statuses of the sub-accounts in your Merchant Center -// account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { - c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +func (s ReturnPolicyOnlineReturnReasonCategoryInfo) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnlineReturnReasonCategoryInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Destinations sets the optional parameter "destinations": If set, only issues -// for the specified destinations are returned, otherwise only issues for the -// Shopping destination. -func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) - return c +// ReturnPolicyOnlineReturnShippingFee: The return shipping fee. This can +// either be a fixed fee or a boolean to indicate that the customer pays the +// actual shipping cost. +type ReturnPolicyOnlineReturnShippingFee struct { + // FixedFee: Fixed return shipping fee amount. This value is only applicable + // when type is FIXED. We will treat the return shipping fee as free if type is + // FIXED and this value is not set. + FixedFee *PriceAmount `json:"fixedFee,omitempty"` + // Type: Type of return shipping fee. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. This value is unused. + // "FIXED" - The return shipping fee is a fixed value. + // "CUSTOMER_PAYING_ACTUAL_FEE" - Customer will pay the actual return + // shipping fee. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "FixedFee") 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. "FixedFee") 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:"-"` } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// account statuses to return in the response, used for paging. -func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +func (s ReturnPolicyOnlineReturnShippingFee) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyOnlineReturnShippingFee + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Name sets the optional parameter "name": If set, only the accounts with the -// given name (case sensitive) will be returned. -func (c *AccountstatusesListCall) Name(name string) *AccountstatusesListCall { - c.urlParams_.Set("name", name) - return c +type ReturnPolicyPolicy struct { + // LastReturnDate: Required. Last day for returning the items. In ISO 8601 + // format. When specifying the return window like this, set the policy type to + // "lastReturnDate". Use this for seasonal overrides only. + LastReturnDate string `json:"lastReturnDate,omitempty"` + // NumberOfDays: The number of days items can be returned after delivery, where + // one day is defined to be 24 hours after the delivery timestamp. When + // specifying the return window like this, set the policy type to + // "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, 180, + // 270 and 365 for the default policy. Additional policies further allow 14, + // 15, 21 and 28 days, but note that for most items a minimum of 30 days is + // required for returns. Exceptions may be made for electronics. A policy of + // less than 30 days can only be applied to those items. + NumberOfDays int64 `json:"numberOfDays,omitempty,string"` + // Type: Policy type. Use "lastReturnDate" for seasonal overrides only. Note + // that for most items a minimum of 30 days is required for returns. Exceptions + // may be made for electronics or non-returnable items such as food, + // perishables, and living things. A policy of less than 30 days can only be + // applied to those items. Acceptable values are: - "lastReturnDate" - + // "lifetimeReturns" - "noReturns" - "numberOfDaysAfterDelivery" + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "LastReturnDate") 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. "LastReturnDate") 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:"-"` } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (s ReturnPolicyPolicy) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicyPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type ReturnPolicySeasonalOverride struct { + // EndDate: Required. Last day on which the override applies. In ISO 8601 + // format. + EndDate string `json:"endDate,omitempty"` + // Name: Required. The name of the seasonal override as shown in Merchant + // Center. + Name string `json:"name,omitempty"` + // Policy: Required. The policy which is in effect during that time. + Policy *ReturnPolicyPolicy `json:"policy,omitempty"` + // StartDate: Required. First day on which the override applies. In ISO 8601 + // format. + StartDate string `json:"startDate,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndDate") 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. "EndDate") 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:"-"` } -// 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 *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { - c.ifNoneMatch_ = entityTag - return c +func (s ReturnPolicySeasonalOverride) MarshalJSON() ([]byte, error) { + type NoMethod ReturnPolicySeasonalOverride + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { - c.ctx_ = ctx - return c +type ReturnaddressCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ReturnaddressCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccountstatusesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ReturnaddressCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ReturnaddressCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // MerchantId: The Merchant Center account ID. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: Method of the batch request entry. Acceptable values are: - + // "delete" - "get" - "insert" + Method string `json:"method,omitempty"` + // ReturnAddress: The return address to submit. This should be set only if the + // method is `insert`. + ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` + // ReturnAddressId: The return address ID. This should be set only if the + // method is `delete` or `get`. + ReturnAddressId string `json:"returnAddressId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Do executes the "content.accountstatuses.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountstatusesListResponse.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 *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, 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 := &AccountstatusesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ReturnaddressCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) 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 ReturnaddressCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ReturnaddressCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnaddressCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -type AccounttaxCustombatchCall struct { - s *APIService - accounttaxcustombatchrequest *AccounttaxCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ReturnaddressCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Custombatch: Retrieves and updates tax settings of multiple accounts in a -// single request. -func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { - c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.accounttaxcustombatchrequest = accounttaxcustombatchrequest - return c +type ReturnaddressCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors defined if, and only if, the request failed. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnaddressCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // ReturnAddress: The retrieved return address. + ReturnAddress *ReturnAddress `json:"returnAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ReturnaddressCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { - c.ctx_ = ctx - return c +type ReturnaddressListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnaddressListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of addresses. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*ReturnAddress `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccounttaxCustombatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ReturnaddressListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReturnaddressListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ReturnpolicyCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ReturnpolicyCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// Do executes the "content.accounttax.custombatch" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccounttaxCustomBatchResponse.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 *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, 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 := &AccounttaxCustomBatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ReturnpolicyCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type AccounttaxGetCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ReturnpolicyCustomBatchRequestEntry struct { + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // MerchantId: The Merchant Center account ID. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: Method of the batch request entry. Acceptable values are: - + // "delete" - "get" - "insert" + Method string `json:"method,omitempty"` + // ReturnPolicy: The return policy to submit. This should be set only if the + // method is `insert`. + ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` + // ReturnPolicyId: The return policy ID. This should be set only if the method + // is `delete` or `get`. + ReturnPolicyId string `json:"returnPolicyId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Get: Retrieves the tax settings of the account. -// -// - accountId: The ID of the account for which to get/update account tax -// settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { - c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - return c +func (s ReturnpolicyCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type ReturnpolicyCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ReturnpolicyCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnpolicyCustomBatchResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// 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 *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { - c.ifNoneMatch_ = entityTag - return c +func (s ReturnpolicyCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { - c.ctx_ = ctx - return c +type ReturnpolicyCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors defined if, and only if, the request failed. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnpolicyCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // ReturnPolicy: The retrieved return policy. + ReturnPolicy *ReturnPolicy `json:"returnPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccounttaxGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ReturnpolicyCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type ReturnpolicyListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#returnpolicyListResponse". + Kind string `json:"kind,omitempty"` + Resources []*ReturnPolicy `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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:"-"` } -// Do executes the "content.accounttax.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountTax.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 *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, 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 := &AccountTax{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s ReturnpolicyListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReturnpolicyListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type Row struct { + // Cells: The list of cells that constitute the row. Must have the same length + // as `columnHeaders` for two-dimensional tables, a length of 1 for + // one-dimensional tables. Required. + Cells []*Value `json:"cells,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cells") 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. "Cells") 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:"-"` } -type AccounttaxListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s Row) MarshalJSON() ([]byte, error) { + type NoMethod Row + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// List: Lists the tax settings of the sub-accounts in your Merchant Center -// account. -// -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { - c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +// SearchRequest: Request message for the ReportService.Search method. +type SearchRequest struct { + // PageSize: Number of ReportRows to retrieve in a single page. Defaults to + // 1000. Values above 5000 are coerced to 5000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: Token of the page to retrieve. If not specified, the first page + // of results is returned. In order to request the next page of results, the + // value obtained from `next_page_token` in the previous response should be + // used. + PageToken string `json:"pageToken,omitempty"` + // Query: Required. Query that defines performance metrics to retrieve and + // dimensions according to which the metrics are to be segmented. For details + // on how to construct your query, see the Query Language guide + // (https://developers.google.com/shopping-content/guides/reports/query-language/overview). + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageSize") 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. "PageSize") 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:"-"` } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// tax settings to return in the response, used for paging. -func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +func (s SearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod SearchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} +// SearchResponse: Response message for the ReportService.Search method. +type SearchResponse struct { + // NextPageToken: Token which can be sent as `page_token` to retrieve the next + // page. If omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Results: Rows that matched the search query. + Results []*ReportRow `json:"results,omitempty"` -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// 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 *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { - c.ifNoneMatch_ = entityTag - return c +func (s SearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod SearchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { - c.ctx_ = ctx - return c +// Segments: Dimensions according to which metrics are segmented in the +// response. Values of product dimensions, such as `offer_id`, reflect the +// state of a product at the time of the corresponding event, for example, +// impression or order. Segment fields cannot be selected in queries without +// also selecting at least one metric field. Values are only set for dimensions +// requested explicitly in the request's search query. +type Segments struct { + // Brand: Brand of the product. + Brand string `json:"brand,omitempty"` + // CategoryL1: Product category (1st level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL1 string `json:"categoryL1,omitempty"` + // CategoryL2: Product category (2nd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL2 string `json:"categoryL2,omitempty"` + // CategoryL3: Product category (3rd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL3 string `json:"categoryL3,omitempty"` + // CategoryL4: Product category (4th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL4 string `json:"categoryL4,omitempty"` + // CategoryL5: Product category (5th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in Google's product taxonomy. + CategoryL5 string `json:"categoryL5,omitempty"` + // CurrencyCode: Currency in which price metrics are represented, for example, + // if you select `ordered_item_sales_micros`, the returned value will be + // represented by this currency. + CurrencyCode string `json:"currencyCode,omitempty"` + // CustomLabel0: Custom label 0 for custom grouping of products. + CustomLabel0 string `json:"customLabel0,omitempty"` + // CustomLabel1: Custom label 1 for custom grouping of products. + CustomLabel1 string `json:"customLabel1,omitempty"` + // CustomLabel2: Custom label 2 for custom grouping of products. + CustomLabel2 string `json:"customLabel2,omitempty"` + // CustomLabel3: Custom label 3 for custom grouping of products. + CustomLabel3 string `json:"customLabel3,omitempty"` + // CustomLabel4: Custom label 4 for custom grouping of products. + CustomLabel4 string `json:"customLabel4,omitempty"` + // CustomerCountryCode: Code of the country where the customer is located at + // the time of the event. Represented in the ISO 3166 format. If the customer + // country cannot be determined, a special 'ZZ' code is returned. + CustomerCountryCode string `json:"customerCountryCode,omitempty"` + // Date: Date in the merchant timezone to which metrics apply. + Date *Date `json:"date,omitempty"` + // OfferId: Merchant-provided id of the product. + OfferId string `json:"offerId,omitempty"` + // ProductTypeL1: Product type (1st level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL1 string `json:"productTypeL1,omitempty"` + // ProductTypeL2: Product type (2nd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL2 string `json:"productTypeL2,omitempty"` + // ProductTypeL3: Product type (3rd level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL3 string `json:"productTypeL3,omitempty"` + // ProductTypeL4: Product type (4th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL4 string `json:"productTypeL4,omitempty"` + // ProductTypeL5: Product type (5th level) + // (https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) + // in merchant's own product taxonomy. + ProductTypeL5 string `json:"productTypeL5,omitempty"` + // Program: Program to which metrics apply, for example, Free Product Listing. + // + // Possible values: + // "PROGRAM_UNSPECIFIED" - Not specified. + // "SHOPPING_ADS" - Shopping Ads. + // "FREE_PRODUCT_LISTING" - Free Product Listing. + // "FREE_LOCAL_PRODUCT_LISTING" - Free Local Product Listing. + // "BUY_ON_GOOGLE_LISTING" - *Deprecated*: This value is no longer supported. + // Retrieving all metrics for the `BUY_ON_GOOGLE_LISTING` program returns 0 + // starting from May 2024. Buy on Google Listing. + Program string `json:"program,omitempty"` + // Title: Title of the product. + Title string `json:"title,omitempty"` + // Week: First day of the week (Monday) of the metrics date in the merchant + // timezone. + Week *Date `json:"week,omitempty"` + // ForceSendFields is a list of field names (e.g. "Brand") 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. "Brand") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccounttaxListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s Segments) MarshalJSON() ([]byte, error) { + type NoMethod Segments + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +type Service struct { + // Active: A boolean exposing the active status of the shipping service. + // Required. + Active bool `json:"active,omitempty"` + // Currency: The CLDR code of the currency to which this service applies. Must + // match that of the prices in rate groups. + Currency string `json:"currency,omitempty"` + // DeliveryCountry: The CLDR territory code of the country to which the service + // applies. Required. + DeliveryCountry string `json:"deliveryCountry,omitempty"` + // DeliveryTime: Time spent in various aspects from order to the delivery of + // the product. Required. + DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"` + // Eligibility: Eligibility for this service. Acceptable values are: - "All + // scenarios" - "All scenarios except Shopping Actions" - "Shopping + // Actions" + Eligibility string `json:"eligibility,omitempty"` + // MinimumOrderValue: Minimum order value for this service. If set, indicates + // that customers will have to spend at least this amount. All prices within a + // service must have the same currency. Cannot be set together with + // minimum_order_value_table. + MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"` + // MinimumOrderValueTable: Table of per store minimum order values for the + // pickup fulfillment type. Cannot be set together with minimum_order_value. + MinimumOrderValueTable *MinimumOrderValueTable `json:"minimumOrderValueTable,omitempty"` + // Name: Free-form name of the service. Must be unique within target account. + // Required. + Name string `json:"name,omitempty"` + // PickupService: The carrier-service pair delivering items to collection + // points. The list of supported pickup services can be retrieved through the + // `getSupportedPickupServices` method. Required if and only if the service + // delivery type is `pickup`. + PickupService *PickupCarrierService `json:"pickupService,omitempty"` + // RateGroups: Shipping rate group definitions. Only the last one is allowed to + // have an empty `applicableShippingLabels`, which means "everything else". The + // other `applicableShippingLabels` must not overlap. + RateGroups []*RateGroup `json:"rateGroups,omitempty"` + // ShipmentType: Type of locations this service ships orders to. Acceptable + // values are: - "delivery" - "pickup` (deprecated)" - "local_delivery" - + // "collection_point" + ShipmentType string `json:"shipmentType,omitempty"` + // StoreConfig: A list of stores your products are delivered from. This is only + // available for the local delivery shipment type. + StoreConfig *ServiceStoreConfig `json:"storeConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Active") 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. "Active") 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:"-"` } -// Do executes the "content.accounttax.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccounttaxListResponse.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 *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, 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 := &AccounttaxListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s Service) MarshalJSON() ([]byte, error) { + type NoMethod Service + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) 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) - } +// ServiceStoreConfig: Stores that provide local delivery. Only valid with +// local delivery fulfillment. +type ServiceStoreConfig struct { + // CutoffConfig: Time local delivery ends for the day. This can be either + // `local_cutoff_time` or `store_close_offset_hours`, if both are provided an + // error is thrown. + CutoffConfig *ServiceStoreConfigCutoffConfig `json:"cutoffConfig,omitempty"` + // ServiceRadius: Maximum delivery radius. Only needed for local delivery + // fulfillment type. + ServiceRadius *Distance `json:"serviceRadius,omitempty"` + // StoreCodes: A list of store codes that provide local delivery. If empty, + // then `store_service_type` must be `all_stores`, or an error is thrown. If + // not empty, then `store_service_type` must be `selected_stores`, or an error + // is thrown. + StoreCodes []string `json:"storeCodes,omitempty"` + // StoreServiceType: Indicates whether all stores listed by this merchant + // provide local delivery or not. Acceptable values are `all stores` and + // `selected stores` + StoreServiceType string `json:"storeServiceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CutoffConfig") 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. "CutoffConfig") 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:"-"` } -type AccounttaxUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - accounttax *AccountTax - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ServiceStoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Update: Updates the tax settings of the account. Any fields that are not -// provided are deleted from the resource. -// -// - accountId: The ID of the account for which to get/update account tax -// settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { - c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.accounttax = accounttax - return c +// ServiceStoreConfigCutoffConfig: Time local delivery ends for the day based +// on the local timezone of the store. `local_cutoff_time` and +// `store_close_offset_hours` are mutually exclusive. +type ServiceStoreConfigCutoffConfig struct { + // LocalCutoffTime: Time in hours and minutes in the local timezone when local + // delivery ends. + LocalCutoffTime *ServiceStoreConfigCutoffConfigLocalCutoffTime `json:"localCutoffTime,omitempty"` + // NoDeliveryPostCutoff: Merchants can opt-out of showing n+1 day local + // delivery when they have a shipping service configured to n day local + // delivery. For example, if the shipping service defines same-day delivery, + // and it's past the cut-off, setting this field to `true` results in the + // calculated shipping service rate returning `NO_DELIVERY_POST_CUTOFF`. In the + // same example, setting this field to `false` results in the calculated + // shipping time being one day. This is only for local delivery. + NoDeliveryPostCutoff bool `json:"noDeliveryPostCutoff,omitempty"` + // StoreCloseOffsetHours: Represents cutoff time as the number of hours before + // store closing. Mutually exclusive with other fields (hour and minute). + StoreCloseOffsetHours int64 `json:"storeCloseOffsetHours,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "LocalCutoffTime") 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. "LocalCutoffTime") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ServiceStoreConfigCutoffConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfigCutoffConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { - c.ctx_ = ctx - return c +// ServiceStoreConfigCutoffConfigLocalCutoffTime: Time in hours and minutes in +// the local timezone when local delivery ends. +type ServiceStoreConfigCutoffConfigLocalCutoffTime struct { + // Hour: Hour local delivery orders must be placed by to process the same day. + Hour int64 `json:"hour,omitempty,string"` + // Minute: Minute local delivery orders must be placed by to process the same + // day. + Minute int64 `json:"minute,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Hour") 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. "Hour") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *AccounttaxUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ServiceStoreConfigCutoffConfigLocalCutoffTime) MarshalJSON() ([]byte, error) { + type NoMethod ServiceStoreConfigCutoffConfigLocalCutoffTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") - 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// SettlementReport: Settlement reports detail order-level and item-level +// credits and debits between you and Google. +type SettlementReport struct { + // EndDate: The end date on which all transactions are included in the report, + // in ISO 8601 format. + EndDate string `json:"endDate,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#settlementReport" + Kind string `json:"kind,omitempty"` + // PreviousBalance: The residual amount from the previous invoice. This is set + // only if the previous invoices are not paid because of negative balance. + PreviousBalance *Price `json:"previousBalance,omitempty"` + // SettlementId: The ID of the settlement report. + SettlementId string `json:"settlementId,omitempty"` + // StartDate: The start date on which all transactions are included in the + // report, in ISO 8601 format. + StartDate string `json:"startDate,omitempty"` + // TransferAmount: The money due to the merchant. + TransferAmount *Price `json:"transferAmount,omitempty"` + // TransferDate: Date on which transfer for this payment was initiated by + // Google, in ISO 8601 format. + TransferDate string `json:"transferDate,omitempty"` + // TransferIds: The list of bank identifiers used for the transfer. For + // example, Trace ID for Federal Automated Clearing House (ACH). This may also + // be known as the Wire ID. + TransferIds []string `json:"transferIds,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "EndDate") 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. "EndDate") 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:"-"` } -// Do executes the "content.accounttax.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *AccountTax.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 *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, 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 := &AccountTax{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s SettlementReport) MarshalJSON() ([]byte, error) { + type NoMethod SettlementReport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type BuyongoogleprogramsActivateCall struct { - s *APIService - merchantId int64 - regionCode string - activatebuyongoogleprogramrequest *ActivateBuyOnGoogleProgramRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// SettlementTransaction: Settlement transactions give a detailed breakdown of +// the settlement report. +type SettlementTransaction struct { + // Amount: The amount for the transaction. + Amount *SettlementTransactionAmount `json:"amount,omitempty"` + // Identifiers: Identifiers of the transaction. + Identifiers *SettlementTransactionIdentifiers `json:"identifiers,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#settlementTransaction" + Kind string `json:"kind,omitempty"` + // Transaction: Details of the transaction. + Transaction *SettlementTransactionTransaction `json:"transaction,omitempty"` + // ForceSendFields is a list of field names (e.g. "Amount") 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. "Amount") 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:"-"` } -// Activate: Reactivates the BoG program in your Merchant Center account. Moves -// the program to the active state when allowed, for example, when paused. This -// method is only available to selected merchants. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Activate(merchantId int64, regionCode string, activatebuyongoogleprogramrequest *ActivateBuyOnGoogleProgramRequest) *BuyongoogleprogramsActivateCall { - c := &BuyongoogleprogramsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.activatebuyongoogleprogramrequest = activatebuyongoogleprogramrequest - return c +func (s SettlementTransaction) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransaction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsActivateCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsActivateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type SettlementTransactionAmount struct { + Commission *SettlementTransactionAmountCommission `json:"commission,omitempty"` + // Description: The description of the event. Acceptable values are: - + // "taxWithhold" - "principal" - "principalAdjustment" - "shippingFee" + // - "merchantRemittedSalesTax" - "googleRemittedSalesTax" - + // "merchantCoupon" - "merchantCouponTax" - "merchantRemittedDisposalTax" + // - "googleRemittedDisposalTax" - "merchantRemittedRedemptionFee" - + // "googleRemittedRedemptionFee" - "eeeEcoFee" - "furnitureEcoFee" - + // "copyPrivateFee" - "eeeEcoFeeCommission" - "furnitureEcoFeeCommission" + // - "copyPrivateFeeCommission" - "principalRefund" - + // "principalRefundTax" - "itemCommission" - "adjustmentCommission" - + // "shippingFeeCommission" - "commissionRefund" - "damaged" - + // "damagedOrDefectiveItem" - "expiredItem" - "faultyItem" - + // "incorrectItemReceived" - "itemMissing" - "qualityNotExpected" - + // "receivedTooLate" - "storePackageMissing" - "transitPackageMissing" - + // "unsuccessfulDeliveryUndeliverable" - "wrongChargeInStore" - + // "wrongItem" - "returns" - "undeliverable" - + // "issueRelatedRefundAndReplacementAmountDescription" - + // "refundFromMerchant" - "returnLabelShippingFee" - "lumpSumCorrection" + // - "pspFee" - "principalRefundDoesNotFit" - + // "principalRefundOrderedWrongItem" - "principalRefundQualityNotExpected" + // - "principalRefundBetterPriceFound" - "principalRefundNoLongerNeeded" - + // "principalRefundChangedMind" - "principalRefundReceivedTooLate" - + // "principalRefundIncorrectItemReceived" - + // "principalRefundDamagedOrDefectiveItem" - + // "principalRefundDidNotMatchDescription" - "principalRefundExpiredItem" + Description string `json:"description,omitempty"` + // TransactionAmount: The amount that contributes to the line item price. + TransactionAmount *Price `json:"transactionAmount,omitempty"` + // Type: The type of the amount. Acceptable values are: - "itemPrice" - + // "orderPrice" - "refund" - "earlyRefund" - "courtesyRefund" - + // "returnRefund" - "returnLabelShippingFeeAmount" - + // "lumpSumCorrectionAmount" + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Commission") 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. "Commission") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsActivateCall) Context(ctx context.Context) *BuyongoogleprogramsActivateCall { - c.ctx_ = ctx - return c +func (s SettlementTransactionAmount) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransactionAmount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsActivateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type SettlementTransactionAmountCommission struct { + // Category: The category of the commission. Acceptable values are: - + // "animalsAndPetSupplies" - "dogCatFoodAndCatLitter" - + // "apparelAndAccessories" - "shoesHandbagsAndSunglasses" - + // "costumesAndAccessories" - "jewelry" - "watches" - + // "hobbiesArtsAndCrafts" - "homeAndGarden" - "entertainmentCollectibles" + // - "collectibleCoins" - "sportsCollectibles" - "sportingGoods" - + // "toysAndGames" - "musicalInstruments" - "giftCards" - + // "babyAndToddler" - "babyFoodWipesAndDiapers" - "businessAndIndustrial" + // - "camerasOpticsAndPhotography" - "consumerElectronics" - + // "electronicsAccessories" - "personalComputers" - "videoGameConsoles" - + // "foodAndGrocery" - "beverages" - "tobaccoProducts" - "furniture" - + // "hardware" - "buildingMaterials" - "tools" - "healthAndPersonalCare" + // - "beauty" - "householdSupplies" - "kitchenAndDining" - + // "majorAppliances" - "luggageAndBags" - "media" - "officeSupplies" - + // "softwareAndVideoGames" - "vehiclePartsAndAccessories" - + // "vehicleTiresAndWheels" - "vehicles" - "everythingElse" + Category string `json:"category,omitempty"` + // Rate: Rate of the commission in percentage. + Rate string `json:"rate,omitempty"` + // ForceSendFields is a list of field names (e.g. "Category") 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. "Category") 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 (c *BuyongoogleprogramsActivateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.activatebuyongoogleprogramrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}/activate") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s SettlementTransactionAmountCommission) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransactionAmountCommission + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.buyongoogleprograms.activate" call. -func (c *BuyongoogleprogramsActivateCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +type SettlementTransactionIdentifiers struct { + // AdjustmentId: The identifier of the adjustments, if it's available. + AdjustmentId string `json:"adjustmentId,omitempty"` + // MerchantOrderId: The merchant provided order ID. + MerchantOrderId string `json:"merchantOrderId,omitempty"` + // OrderItemId: The identifier of the item. + OrderItemId string `json:"orderItemId,omitempty"` + // SettlementEntryId: The unique ID of the settlement transaction entry. + SettlementEntryId string `json:"settlementEntryId,omitempty"` + // ShipmentIds: The shipment ids for the item. + ShipmentIds []string `json:"shipmentIds,omitempty"` + // TransactionId: The Google transaction ID. + TransactionId string `json:"transactionId,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdjustmentId") 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. "AdjustmentId") 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:"-"` } -type BuyongoogleprogramsGetCall struct { - s *APIService - merchantId int64 - regionCode string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s SettlementTransactionIdentifiers) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransactionIdentifiers + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type SettlementTransactionTransaction struct { + // PostDate: The time on which the event occurred in ISO 8601 format. + PostDate string `json:"postDate,omitempty"` + // Type: The type of the transaction that occurred. Acceptable values are: - + // "order" - "reversal" - "orderRefund" - "reversalRefund" - + // "issueRelatedRefundAndReplacement" - "returnLabelShippingFeeTransaction" + // - "reversalIssueRelatedRefundAndReplacement" - + // "reversalReturnLabelShippingFeeTransaction" - + // "lumpSumCorrectionTransaction" + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostDate") 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. "PostDate") 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:"-"` } -// Get: Retrieves a status of the BoG program for your Merchant Center account. -// -// - merchantId: The ID of the account. -// - regionCode: The Program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Get(merchantId int64, regionCode string) *BuyongoogleprogramsGetCall { - c := &BuyongoogleprogramsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - return c +func (s SettlementTransactionTransaction) MarshalJSON() ([]byte, error) { + type NoMethod SettlementTransactionTransaction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsGetCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} +type SettlementreportsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#settlementreportsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of returns. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*SettlementReport `json:"resources,omitempty"` -// 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 *BuyongoogleprogramsGetCall) IfNoneMatch(entityTag string) *BuyongoogleprogramsGetCall { - c.ifNoneMatch_ = entityTag - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsGetCall) Context(ctx context.Context) *BuyongoogleprogramsGetCall { - c.ctx_ = ctx - return c +func (s SettlementreportsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod SettlementreportsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} +type SettlementtransactionsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#settlementtransactionsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of returns. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*SettlementTransaction `json:"resources,omitempty"` -func (c *BuyongoogleprogramsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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:"-"` } -// Do executes the "content.buyongoogleprograms.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *BuyOnGoogleProgramStatus.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 *BuyongoogleprogramsGetCall) Do(opts ...googleapi.CallOption) (*BuyOnGoogleProgramStatus, 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 := &BuyOnGoogleProgramStatus{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +func (s SettlementtransactionsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod SettlementtransactionsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type BuyongoogleprogramsOnboardCall struct { - s *APIService - merchantId int64 - regionCode string - onboardbuyongoogleprogramrequest *OnboardBuyOnGoogleProgramRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +// ShippingSettings: The merchant account's shipping settings. All methods +// except getsupportedcarriers and getsupportedholidays require the admin role. +type ShippingSettings struct { + // AccountId: The ID of the account to which these account shipping settings + // belong. Ignored upon update, always present in get request responses. + AccountId uint64 `json:"accountId,omitempty,string"` + // PostalCodeGroups: A list of postal code groups that can be referred to in + // `services`. Optional. + PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"` + // Services: The target account's list of services. Optional. + Services []*Service `json:"services,omitempty"` + // Warehouses: Optional. A list of warehouses which can be referred to in + // `services`. + Warehouses []*Warehouse `json:"warehouses,omitempty"` -// Onboard: Onboards the BoG program in your Merchant Center account. By using -// this method, you agree to the Terms of Service -// (https://merchants.google.com/mc/termsofservice/transactions/US/latest). -// Calling this method is only possible if the authenticated account is the -// same as the merchant id in the request. Calling this method multiple times -// will only accept Terms of Service if the latest version is not currently -// signed. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Onboard(merchantId int64, regionCode string, onboardbuyongoogleprogramrequest *OnboardBuyOnGoogleProgramRequest) *BuyongoogleprogramsOnboardCall { - c := &BuyongoogleprogramsOnboardCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.onboardbuyongoogleprogramrequest = onboardbuyongoogleprogramrequest - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AccountId") 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. "AccountId") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsOnboardCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsOnboardCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ShippingSettings) MarshalJSON() ([]byte, error) { + type NoMethod ShippingSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsOnboardCall) Context(ctx context.Context) *BuyongoogleprogramsOnboardCall { - c.ctx_ = ctx - return c +type ShippingsettingsCustomBatchRequest struct { + // Entries: The request entries to be processed in the batch. + Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsOnboardCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *BuyongoogleprogramsOnboardCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.onboardbuyongoogleprogramrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}/onboard") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a single +// non-batch shippingsettings request. +type ShippingsettingsCustomBatchRequestEntry struct { + // AccountId: The ID of the account for which to get/update account shipping + // settings. + AccountId uint64 `json:"accountId,omitempty,string"` + // BatchId: An entry ID, unique within the batch request. + BatchId int64 `json:"batchId,omitempty"` + // MerchantId: The ID of the managing account. + MerchantId uint64 `json:"merchantId,omitempty,string"` + // Method: The method of the batch entry. Acceptable values are: - "get" - + // "update" + Method string `json:"method,omitempty"` + // ShippingSettings: The account shipping settings to update. Only defined if + // the method is `update`. + ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccountId") 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. "AccountId") 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:"-"` } -// Do executes the "content.buyongoogleprograms.onboard" call. -func (c *BuyongoogleprogramsOnboardCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +func (s ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchRequestEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type BuyongoogleprogramsPatchCall struct { - s *APIService - merchantId int64 - regionCode string - buyongoogleprogramstatus *BuyOnGoogleProgramStatus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} +type ShippingsettingsCustomBatchResponse struct { + // Entries: The result of the execution of the batch requests. + Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsCustomBatchResponse". + Kind string `json:"kind,omitempty"` -// Patch: Updates the status of the BoG program for your Merchant Center -// account. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Patch(merchantId int64, regionCode string, buyongoogleprogramstatus *BuyOnGoogleProgramStatus) *BuyongoogleprogramsPatchCall { - c := &BuyongoogleprogramsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.buyongoogleprogramstatus = buyongoogleprogramstatus - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Entries") 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. "Entries") 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:"-"` } -// UpdateMask sets the optional parameter "updateMask": The list of fields to -// update. If the update mask is not provided, then all the fields set in -// buyOnGoogleProgramStatus will be updated. Clearing fields is only possible -// if update mask is provided. -func (c *BuyongoogleprogramsPatchCall) UpdateMask(updateMask string) *BuyongoogleprogramsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c +func (s ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsPatchCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a single +// non-batch shipping settings response. +type ShippingsettingsCustomBatchResponseEntry struct { + // BatchId: The ID of the request entry to which this entry responds. + BatchId int64 `json:"batchId,omitempty"` + // Errors: A list of errors for failed custombatch entries. *Note:* Schema + // errors fail the whole request. + Errors *Errors `json:"errors,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsCustomBatchResponseEntry" + Kind string `json:"kind,omitempty"` + // ShippingSettings: The retrieved or updated account shipping settings. + ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"` + // ForceSendFields is a list of field names (e.g. "BatchId") 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. "BatchId") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsPatchCall) Context(ctx context.Context) *BuyongoogleprogramsPatchCall { - c.ctx_ = ctx - return c +func (s ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsCustomBatchResponseEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type ShippingsettingsGetSupportedCarriersResponse struct { + // Carriers: A list of supported carriers. May be empty. + Carriers []*CarriersCarrier `json:"carriers,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsGetSupportedCarriersResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Carriers") 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. "Carriers") 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 (c *BuyongoogleprogramsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.buyongoogleprogramstatus) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedCarriersResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.buyongoogleprograms.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *BuyOnGoogleProgramStatus.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 *BuyongoogleprogramsPatchCall) Do(opts ...googleapi.CallOption) (*BuyOnGoogleProgramStatus, 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 := &BuyOnGoogleProgramStatus{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +type ShippingsettingsGetSupportedHolidaysResponse struct { + // Holidays: A list of holidays applicable for delivery guarantees. May be + // empty. + Holidays []*HolidaysHoliday `json:"holidays,omitempty"` + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsGetSupportedHolidaysResponse". + Kind string `json:"kind,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Holidays") 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. "Holidays") 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:"-"` } -type BuyongoogleprogramsPauseCall struct { - s *APIService - merchantId int64 - regionCode string - pausebuyongoogleprogramrequest *PauseBuyOnGoogleProgramRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedHolidaysResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Pause: Pauses the BoG program in your Merchant Center account. This method -// is only available to selected merchants. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Pause(merchantId int64, regionCode string, pausebuyongoogleprogramrequest *PauseBuyOnGoogleProgramRequest) *BuyongoogleprogramsPauseCall { - c := &BuyongoogleprogramsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.pausebuyongoogleprogramrequest = pausebuyongoogleprogramrequest - return c +type ShippingsettingsGetSupportedPickupServicesResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsGetSupportedPickupServicesResponse". + Kind string `json:"kind,omitempty"` + // PickupServices: A list of supported pickup services. May be empty. + PickupServices []*PickupServicesPickupService `json:"pickupServices,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsPauseCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsPauseCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s ShippingsettingsGetSupportedPickupServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsGetSupportedPickupServicesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsPauseCall) Context(ctx context.Context) *BuyongoogleprogramsPauseCall { - c.ctx_ = ctx - return c +type ShippingsettingsListResponse struct { + // Kind: Identifies what kind of resource this is. Value: the fixed string + // "content#shippingsettingsListResponse". + Kind string `json:"kind,omitempty"` + // NextPageToken: The token for the retrieval of the next page of shipping + // settings. + NextPageToken string `json:"nextPageToken,omitempty"` + Resources []*ShippingSettings `json:"resources,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Kind") 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. "Kind") 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:"-"` } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsPauseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +func (s ShippingsettingsListResponse) MarshalJSON() ([]byte, error) { + type NoMethod ShippingsettingsListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (c *BuyongoogleprogramsPauseCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausebuyongoogleprogramrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}/pause") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// ShoppingAdsProgramStatus: Response message for GetShoppingAdsProgramStatus. +type ShoppingAdsProgramStatus struct { + // GlobalState: State of the program. `ENABLED` if there are offers for at + // least one region. + // + // Possible values: + // "PROGRAM_STATE_UNSPECIFIED" - State is unknown. + // "NOT_ENABLED" - Program is not enabled for any country. + // "NO_OFFERS_UPLOADED" - No products have been uploaded for any region. + // Upload products to Merchant Center. + // "ENABLED" - Program is enabled and offers are uploaded for at least one + // country. + GlobalState string `json:"globalState,omitempty"` + // RegionStatuses: Status of the program in each region. Regions with the same + // status and review eligibility are grouped together in `regionCodes`. + RegionStatuses []*ShoppingAdsProgramStatusRegionStatus `json:"regionStatuses,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "GlobalState") 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. "GlobalState") 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:"-"` } -// Do executes the "content.buyongoogleprograms.pause" call. -func (c *BuyongoogleprogramsPauseCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +func (s ShoppingAdsProgramStatus) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type BuyongoogleprogramsRequestreviewCall struct { - s *APIService - merchantId int64 - regionCode string - requestreviewbuyongoogleprogramrequest *RequestReviewBuyOnGoogleProgramRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// ShoppingAdsProgramStatusRegionStatus: Status of program and region. +type ShoppingAdsProgramStatusRegionStatus struct { + // DisapprovalDate: Date by which eligibilityStatus will go from `WARNING` to + // `DISAPPROVED`. Only visible when your eligibilityStatus is WARNING. In ISO + // 8601 (https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. + DisapprovalDate string `json:"disapprovalDate,omitempty"` + // EligibilityStatus: Eligibility status of the Shopping Ads program. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is not known. + // "APPROVED" - If the account has no issues and review is completed + // successfully. + // "DISAPPROVED" - There are one or more issues that needs to be resolved for + // account to be active for the program. Detailed list of account issues are + // available in + // [accountstatuses](https://developers.google.com/shopping-content/reference/re + // st/v2.1/accountstatuses) API. + // "WARNING" - If account has issues but offers are servable. Some of the + // issue can make account DISAPPROVED after a certain deadline. + // "UNDER_REVIEW" - Account is under review. + // "PENDING_REVIEW" - Account is waiting for review to start. + // "ONBOARDING" - Program is currently onboarding. Upload valid offers to + // complete onboarding. + EligibilityStatus string `json:"eligibilityStatus,omitempty"` + // OnboardingIssues: Issues that must be fixed to be eligible for review. + OnboardingIssues []string `json:"onboardingIssues,omitempty"` + // RegionCodes: The two-letter ISO 3166-1 alpha-2 + // (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all the regions + // with the same `eligibilityStatus` and `reviewEligibility`. + RegionCodes []string `json:"regionCodes,omitempty"` + // ReviewEligibilityStatus: If a program is eligible for review in a specific + // region. Only visible if `eligibilityStatus` is `DISAPPROVED`. + // + // Possible values: + // "REVIEW_ELIGIBILITY_UNSPECIFIED" - Review eligibility state is unknown. + // "ELIGIBLE" - Account is eligible for review for a specified region code. + // "INELIGIBLE" - Account is not eligible for review for a specified region + // code. + ReviewEligibilityStatus string `json:"reviewEligibilityStatus,omitempty"` + // ReviewIneligibilityReason: Review ineligibility reason if account is not + // eligible for review. + // + // Possible values: + // "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED" - Requesting a review from + // Google is not possible. + // "ONBOARDING_ISSUES" - All onboarding issues needs to be fixed. + // "NOT_ENOUGH_OFFERS" - Not enough offers uploaded for this country. + // "IN_COOLDOWN_PERIOD" - Cooldown period applies. Wait until cooldown period + // ends. + // "ALREADY_UNDER_REVIEW" - Account is already under review. + // "NO_REVIEW_REQUIRED" - No issues available to review. + // "WILL_BE_REVIEWED_AUTOMATICALLY" - Account will be automatically reviewed + // at the end of the grace period. + // "IS_RETIRED" - Account is retired. Should not appear in MC. + // "ALREADY_REVIEWED" - Account was already reviewd. + ReviewIneligibilityReason string `json:"reviewIneligibilityReason,omitempty"` + // ReviewIneligibilityReasonDescription: Reason a program in a specific region + // isn’t eligible for review. Only visible if `reviewEligibilityStatus` is + // `INELIGIBLE`. + ReviewIneligibilityReasonDescription string `json:"reviewIneligibilityReasonDescription,omitempty"` + // ReviewIneligibilityReasonDetails: Additional information for ineligibility. + // If `reviewIneligibilityReason` is `IN_COOLDOWN_PERIOD`, a timestamp for the + // end of the cooldown period is provided. + ReviewIneligibilityReasonDetails *ShoppingAdsProgramStatusReviewIneligibilityReasonDetails `json:"reviewIneligibilityReasonDetails,omitempty"` + // ReviewIssues: Issues evaluated in the review process. Fix all issues before + // requesting a review. + ReviewIssues []string `json:"reviewIssues,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisapprovalDate") 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. "DisapprovalDate") 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:"-"` } -// Requestreview: Requests review and then activates the BoG program in your -// Merchant Center account for the first time. Moves the program to the -// REVIEW_PENDING state. This method is only available to selected merchants. -// -// - merchantId: The ID of the account. -// - regionCode: The program region code ISO 3166-1 alpha-2 -// (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Currently only US is -// available. -func (r *BuyongoogleprogramsService) Requestreview(merchantId int64, regionCode string, requestreviewbuyongoogleprogramrequest *RequestReviewBuyOnGoogleProgramRequest) *BuyongoogleprogramsRequestreviewCall { - c := &BuyongoogleprogramsRequestreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.regionCode = regionCode - c.requestreviewbuyongoogleprogramrequest = requestreviewbuyongoogleprogramrequest - return c +func (s ShoppingAdsProgramStatusRegionStatus) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatusRegionStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *BuyongoogleprogramsRequestreviewCall) Fields(s ...googleapi.Field) *BuyongoogleprogramsRequestreviewCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// ShoppingAdsProgramStatusReviewIneligibilityReasonDetails: Additional details +// for review ineligibility reasons. +type ShoppingAdsProgramStatusReviewIneligibilityReasonDetails struct { + // CooldownTime: This timestamp represents end of cooldown period for review + // ineligbility reason `IN_COOLDOWN_PERIOD`. + CooldownTime string `json:"cooldownTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CooldownTime") 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. "CooldownTime") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *BuyongoogleprogramsRequestreviewCall) Context(ctx context.Context) *BuyongoogleprogramsRequestreviewCall { - c.ctx_ = ctx - return c +func (s ShoppingAdsProgramStatusReviewIneligibilityReasonDetails) MarshalJSON() ([]byte, error) { + type NoMethod ShoppingAdsProgramStatusReviewIneligibilityReasonDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *BuyongoogleprogramsRequestreviewCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type Table struct { + // ColumnHeaders: Headers of the table's columns. Optional: if not set then the + // table has only one dimension. + ColumnHeaders *Headers `json:"columnHeaders,omitempty"` + // Name: Name of the table. Required for subtables, ignored for the main table. + Name string `json:"name,omitempty"` + // RowHeaders: Headers of the table's rows. Required. + RowHeaders *Headers `json:"rowHeaders,omitempty"` + // Rows: The list of rows that constitute the table. Must have the same length + // as `rowHeaders`. Required. + Rows []*Row `json:"rows,omitempty"` + // ForceSendFields is a list of field names (e.g. "ColumnHeaders") 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. "ColumnHeaders") 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 (c *BuyongoogleprogramsRequestreviewCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.requestreviewbuyongoogleprogramrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/buyongoogleprograms/{regionCode}/requestreview") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "regionCode": c.regionCode, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s Table) MarshalJSON() ([]byte, error) { + type NoMethod Table + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.buyongoogleprograms.requestreview" call. -func (c *BuyongoogleprogramsRequestreviewCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +// TextWithTooltip: Block of text that may contain a tooltip with more +// information. +type TextWithTooltip struct { + // SimpleTooltipValue: Value of the tooltip as a simple text. + SimpleTooltipValue string `json:"simpleTooltipValue,omitempty"` + // SimpleValue: Value of the message as a simple text. + SimpleValue string `json:"simpleValue,omitempty"` + // TooltipIconStyle: The suggested type of an icon for tooltip, if a tooltip is + // present. + // + // Possible values: + // "TOOLTIP_ICON_STYLE_UNSPECIFIED" - Default value. Will never be provided + // by the API. + // "INFO" - Used when the tooltip adds additional information to the context, + // the 'i' can be used as an icon. + // "QUESTION" - Used when the tooltip shows helpful information, the '?' can + // be used as an icon. + TooltipIconStyle string `json:"tooltipIconStyle,omitempty"` + // ForceSendFields is a list of field names (e.g. "SimpleTooltipValue") 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. "SimpleTooltipValue") 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:"-"` } -type CollectionsCreateCall struct { - s *APIService - merchantId int64 - collection *Collection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (s TextWithTooltip) MarshalJSON() ([]byte, error) { + type NoMethod TextWithTooltip + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TimePeriod: A message that represents a time period. +type TimePeriod struct { + // EndTime: The ending timestamp. + EndTime string `json:"endTime,omitempty"` + // StartTime: The starting timestamp. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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:"-"` } -// Create: Uploads a collection to your Merchant Center account. If a -// collection with the same collectionId already exists, this method updates -// that entry. In each update, the collection is completely replaced by the -// fields in the body of the update request. -// -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Create(merchantId int64, collection *Collection) *CollectionsCreateCall { - c := &CollectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collection = collection - return c +func (s TimePeriod) MarshalJSON() ([]byte, error) { + type NoMethod TimePeriod + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CollectionsCreateCall) Fields(s ...googleapi.Field) *CollectionsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +// TimeZone: Represents a time zone from the IANA Time Zone Database +// (https://www.iana.org/time-zones). +type TimeZone struct { + // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + Id string `json:"id,omitempty"` + // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". + Version string `json:"version,omitempty"` + // 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *CollectionsCreateCall) Context(ctx context.Context) *CollectionsCreateCall { - c.ctx_ = ctx - return c +func (s TimeZone) MarshalJSON() ([]byte, error) { + type NoMethod TimeZone + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CollectionsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// TopicTrends: Topic trends fields requested by the merchant in the query. +// Field values are only set if the merchant queries `TopicTrendsView`. +// Forecast data can be queried up to 13 weeks by passing a future date in the +// `date` field. Historical data is measured daily, and forecasted data is +// projected weekly. All data points are normalized based on the highest data +// points returned in the response. If you make separate queries with different +// date ranges, you might see different values for the same date in each +// response. The recommended way to get a trend score of a topic is +// `last7_days_search_interest / last{$day}_days_search_interest - 1`. You can +// view trends for up to eight topics at a time. +type TopicTrends struct { + // CustomerCountryCode: Country trends are calculated for. Must be a two-letter + // country code (ISO 3166-1-alpha-2 code), for example, `“US”`. + CustomerCountryCode string `json:"customerCountryCode,omitempty"` + // Date: Date the trend score was retrieved. + Date *Date `json:"date,omitempty"` + // Last120DaysSearchInterest: Search interest in the last 120 days, with the + // same normalization as search_interest. This field is only present for a past + // date. + Last120DaysSearchInterest float64 `json:"last120DaysSearchInterest,omitempty"` + // Last30DaysSearchInterest: Search interest in the last 30 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last30DaysSearchInterest float64 `json:"last30DaysSearchInterest,omitempty"` + // Last7DaysSearchInterest: Search interest in the last 7 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last7DaysSearchInterest float64 `json:"last7DaysSearchInterest,omitempty"` + // Last90DaysSearchInterest: Search interest in the last 90 days, with the same + // normalization as search_interest. This field is only present for a past + // date. + Last90DaysSearchInterest float64 `json:"last90DaysSearchInterest,omitempty"` + // Next7DaysSearchInterest: Estimated search interest in the next 7 days, with + // the same normalization as search_interest. This field is only present for a + // future date. + Next7DaysSearchInterest float64 `json:"next7DaysSearchInterest,omitempty"` + // SearchInterest: Daily search interest, normalized to the time and country to + // make comparisons easier, with 100 representing peak popularity (from 0 to + // 100) for the requested time period and location. + SearchInterest float64 `json:"searchInterest,omitempty"` + // Topic: Google-provided topic trends are calculated for. Only top eight + // topics are returned. Topic is what shoppers are searching for on Google, + // grouped by the same concept. + Topic string `json:"topic,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomerCountryCode") 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. "CustomerCountryCode") 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 (c *CollectionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.collection) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s TopicTrends) MarshalJSON() ([]byte, error) { + type NoMethod TopicTrends + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.collections.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Collection.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 *CollectionsCreateCall) Do(opts ...googleapi.CallOption) (*Collection, 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 := &Collection{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, +func (s *TopicTrends) UnmarshalJSON(data []byte) error { + type NoMethod TopicTrends + var s1 struct { + Last120DaysSearchInterest gensupport.JSONFloat64 `json:"last120DaysSearchInterest"` + Last30DaysSearchInterest gensupport.JSONFloat64 `json:"last30DaysSearchInterest"` + Last7DaysSearchInterest gensupport.JSONFloat64 `json:"last7DaysSearchInterest"` + Last90DaysSearchInterest gensupport.JSONFloat64 `json:"last90DaysSearchInterest"` + Next7DaysSearchInterest gensupport.JSONFloat64 `json:"next7DaysSearchInterest"` + SearchInterest gensupport.JSONFloat64 `json:"searchInterest"` + *NoMethod } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err } - return ret, nil + s.Last120DaysSearchInterest = float64(s1.Last120DaysSearchInterest) + s.Last30DaysSearchInterest = float64(s1.Last30DaysSearchInterest) + s.Last7DaysSearchInterest = float64(s1.Last7DaysSearchInterest) + s.Last90DaysSearchInterest = float64(s1.Last90DaysSearchInterest) + s.Next7DaysSearchInterest = float64(s1.Next7DaysSearchInterest) + s.SearchInterest = float64(s1.SearchInterest) + return nil } -type CollectionsDeleteCall struct { - s *APIService - merchantId int64 - collectionId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type TransitTable struct { + // PostalCodeGroupNames: A list of postal group names. The last value can be + // "all other locations". Example: `["zone 1", "zone 2", "all other + // locations"]`. The referred postal code groups must match the delivery + // country of the service. + PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"` + Rows []*TransitTableTransitTimeRow `json:"rows,omitempty"` + // TransitTimeLabels: A list of transit time labels. The last value can be + // "all other labels". Example: `["food", "electronics", "all other + // labels"]`. + TransitTimeLabels []string `json:"transitTimeLabels,omitempty"` + // ForceSendFields is a list of field names (e.g. "PostalCodeGroupNames") 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. "PostalCodeGroupNames") 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:"-"` } -// Delete: Deletes a collection from your Merchant Center account. -// -// - collectionId: The collectionId of the collection. CollectionId is the same -// as the REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Delete(merchantId int64, collectionId string) *CollectionsDeleteCall { - c := &CollectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collectionId = collectionId - return c +func (s TransitTable) MarshalJSON() ([]byte, error) { + type NoMethod TransitTable + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CollectionsDeleteCall) Fields(s ...googleapi.Field) *CollectionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +type TransitTableTransitTimeRow struct { + Values []*TransitTableTransitTimeRowTransitTimeValue `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "Values") 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. "Values") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *CollectionsDeleteCall) Context(ctx context.Context) *CollectionsDeleteCall { - c.ctx_ = ctx - return c +func (s TransitTableTransitTimeRow) MarshalJSON() ([]byte, error) { + type NoMethod TransitTableTransitTimeRow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CollectionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type TransitTableTransitTimeRowTransitTimeValue struct { + // MaxTransitTimeInDays: Must be greater than or equal to + // `minTransitTimeInDays`. + MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"` + // MinTransitTimeInDays: Transit time range (min-max) in business days. 0 means + // same day delivery, 1 means next day delivery. + MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxTransitTimeInDays") 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. "MaxTransitTimeInDays") 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 (c *CollectionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s TransitTableTransitTimeRowTransitTimeValue) MarshalJSON() ([]byte, error) { + type NoMethod TransitTableTransitTimeRowTransitTimeValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.collections.delete" call. -func (c *CollectionsDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - return nil +// TriggerActionPayload: The payload for the triggered action. +type TriggerActionPayload struct { + // ActionContext: Required. The context from the selected action. The value is + // obtained from rendered issues and needs to be sent back to identify the + // action that is being triggered. + ActionContext string `json:"actionContext,omitempty"` + // ActionInput: Required. Input provided by the merchant. + ActionInput *ActionInput `json:"actionInput,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActionContext") 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. "ActionContext") 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:"-"` } -type CollectionsGetCall struct { - s *APIService - merchantId int64 - collectionId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s TriggerActionPayload) MarshalJSON() ([]byte, error) { + type NoMethod TriggerActionPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Get: Retrieves a collection from your Merchant Center account. -// -// - collectionId: The REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) Get(merchantId int64, collectionId string) *CollectionsGetCall { - c := &CollectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collectionId = collectionId - return c -} +// TriggerActionResponse: Response informing about the started action. +type TriggerActionResponse struct { + // Message: The message for merchant. + Message string `json:"message,omitempty"` -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CollectionsGetCall) Fields(s ...googleapi.Field) *CollectionsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Message") 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. "Message") 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:"-"` } -// 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 *CollectionsGetCall) IfNoneMatch(entityTag string) *CollectionsGetCall { - c.ifNoneMatch_ = entityTag - return c +func (s TriggerActionResponse) MarshalJSON() ([]byte, error) { + type NoMethod TriggerActionResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Context sets the context to be used in this call's Do method. -func (c *CollectionsGetCall) Context(ctx context.Context) *CollectionsGetCall { - c.ctx_ = ctx - return c +// UndeleteConversionSourceRequest: Request message for the +// UndeleteConversionSource method. +type UndeleteConversionSourceRequest struct { } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CollectionsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// UrlSettings: Specifications related to the `Checkout` URL. The `UriTemplate` +// is of the form `https://www.mystore.com/checkout?item_id={id}` where `{id}` +// will be automatically replaced with data from the merchant account with this +// attribute offer_id +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id) +type UrlSettings struct { + // CartUriTemplate: URL template when the placeholders are expanded will + // redirect the buyer to the cart page on the merchant website with the + // selected item in cart. + CartUriTemplate string `json:"cartUriTemplate,omitempty"` + // CheckoutUriTemplate: URL template when the placeholders are expanded will + // redirect the buyer to the merchant checkout page with the item in the cart. + CheckoutUriTemplate string `json:"checkoutUriTemplate,omitempty"` + // ForceSendFields is a list of field names (e.g. "CartUriTemplate") 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. "CartUriTemplate") 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 (c *CollectionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s UrlSettings) MarshalJSON() ([]byte, error) { + type NoMethod UrlSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.collections.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Collection.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 *CollectionsGetCall) Do(opts ...googleapi.CallOption) (*Collection, 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 := &Collection{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +// Value: The single value of a rate group or the value of a rate group table's +// cell. Exactly one of `noShipping`, `flatRate`, `pricePercentage`, +// `carrierRateName`, `subtableName` must be set. +type Value struct { + // CarrierRateName: The name of a carrier rate referring to a carrier rate + // defined in the same rate group. Can only be set if all other fields are not + // set. + CarrierRateName string `json:"carrierRateName,omitempty"` + // FlatRate: A flat rate. Can only be set if all other fields are not set. + FlatRate *Price `json:"flatRate,omitempty"` + // NoShipping: If true, then the product can't ship. Must be true when set, can + // only be set if all other fields are not set. + NoShipping bool `json:"noShipping,omitempty"` + // PricePercentage: A percentage of the price represented as a number in + // decimal notation (for example, "5.4"). Can only be set if all other fields + // are not set. + PricePercentage string `json:"pricePercentage,omitempty"` + // SubtableName: The name of a subtable. Can only be set in table cells (not + // for single values), and only if all other fields are not set. + SubtableName string `json:"subtableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CarrierRateName") 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. "CarrierRateName") 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:"-"` } -type CollectionsListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +func (s Value) MarshalJSON() ([]byte, error) { + type NoMethod Value + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// List: Lists the collections in your Merchant Center account. The response -// might contain fewer items than specified by page_size. Rely on -// next_page_token to determine if there are more items to be requested. -// -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionsService) List(merchantId int64) *CollectionsListCall { - c := &CollectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c +// VerifyPhoneNumberRequest: Request message for the VerifyPhoneNumber method. +type VerifyPhoneNumberRequest struct { + // PhoneVerificationMethod: Verification method used to receive verification + // code. + // + // Possible values: + // "PHONE_VERIFICATION_METHOD_UNSPECIFIED" - Unknown method. + // "SMS" - Receive verification code by SMS. + // "PHONE_CALL" - Receive verification code by phone call. + PhoneVerificationMethod string `json:"phoneVerificationMethod,omitempty"` + // VerificationCode: The verification code that was sent to the phone number + // for validation. + VerificationCode string `json:"verificationCode,omitempty"` + // VerificationId: The verification ID returned by `requestphoneverification`. + VerificationId string `json:"verificationId,omitempty"` + // ForceSendFields is a list of field names (e.g. "PhoneVerificationMethod") 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. "PhoneVerificationMethod") 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:"-"` } -// PageSize sets the optional parameter "pageSize": The maximum number of -// collections to return in the response, used for paging. Defaults to 50; -// values above 1000 will be coerced to 1000. -func (c *CollectionsListCall) PageSize(pageSize int64) *CollectionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +func (s VerifyPhoneNumberRequest) MarshalJSON() ([]byte, error) { + type NoMethod VerifyPhoneNumberRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PageToken sets the optional parameter "pageToken": Token (if provided) to -// retrieve the subsequent page. All other parameters must match the original -// call that provided the page token. -func (c *CollectionsListCall) PageToken(pageToken string) *CollectionsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +// VerifyPhoneNumberResponse: Response message for the VerifyPhoneNumber +// method. +type VerifyPhoneNumberResponse struct { + // VerifiedPhoneNumber: Verified phone number if verification is successful. + // This phone number can only be replaced by another verified phone number. + VerifiedPhoneNumber string `json:"verifiedPhoneNumber,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "VerifiedPhoneNumber") 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. "VerifiedPhoneNumber") 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:"-"` } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *CollectionsListCall) Fields(s ...googleapi.Field) *CollectionsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c +func (s VerifyPhoneNumberResponse) MarshalJSON() ([]byte, error) { + type NoMethod VerifyPhoneNumberResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 *CollectionsListCall) IfNoneMatch(entityTag string) *CollectionsListCall { - c.ifNoneMatch_ = entityTag - return c +// Warehouse: A fulfillment warehouse, which stores and handles inventory. +type Warehouse struct { + // BusinessDayConfig: Business days of the warehouse. If not set, will be + // Monday to Friday by default. + BusinessDayConfig *BusinessDayConfig `json:"businessDayConfig,omitempty"` + // CutoffTime: Required. The latest time of day that an order can be accepted + // and begin processing. Later orders will be processed in the next day. The + // time is based on the warehouse postal code. + CutoffTime *WarehouseCutoffTime `json:"cutoffTime,omitempty"` + // HandlingDays: Required. The number of days it takes for this warehouse to + // pack up and ship an item. This is on the warehouse level, but can be + // overridden on the offer level based on the attributes of an item. + HandlingDays int64 `json:"handlingDays,omitempty,string"` + // Name: Required. The name of the warehouse. Must be unique within account. + Name string `json:"name,omitempty"` + // ShippingAddress: Required. Shipping address of the warehouse. + ShippingAddress *Address `json:"shippingAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "BusinessDayConfig") 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. "BusinessDayConfig") 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:"-"` } -// Context sets the context to be used in this call's Do method. -func (c *CollectionsListCall) Context(ctx context.Context) *CollectionsListCall { - c.ctx_ = ctx - return c +func (s Warehouse) MarshalJSON() ([]byte, error) { + type NoMethod Warehouse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *CollectionsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +type WarehouseBasedDeliveryTime struct { + // Carrier: Required. Carrier, such as "UPS" or "Fedex". The list of + // supported carriers can be retrieved through the `listSupportedCarriers` + // method. + Carrier string `json:"carrier,omitempty"` + // CarrierService: Required. Carrier service, such as "ground" or "2 days". + // The list of supported services for a carrier can be retrieved through the + // `listSupportedCarriers` method. The name of the service must be in the + // eddSupportedServices list. + CarrierService string `json:"carrierService,omitempty"` + // OriginAdministrativeArea: Shipping origin's state. + OriginAdministrativeArea string `json:"originAdministrativeArea,omitempty"` + // OriginCity: Shipping origin's city. + OriginCity string `json:"originCity,omitempty"` + // OriginCountry: Shipping origin's country represented as a CLDR territory + // code (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). + OriginCountry string `json:"originCountry,omitempty"` + // OriginPostalCode: Shipping origin. + OriginPostalCode string `json:"originPostalCode,omitempty"` + // OriginStreetAddress: Shipping origin's street address. + OriginStreetAddress string `json:"originStreetAddress,omitempty"` + // WarehouseName: The name of the warehouse. Warehouse name need to be matched + // with name. If warehouseName is set, the below fields will be ignored. The + // warehouse info will be read from warehouse. + WarehouseName string `json:"warehouseName,omitempty"` + // ForceSendFields is a list of field names (e.g. "Carrier") 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. "Carrier") 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 (c *CollectionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +func (s WarehouseBasedDeliveryTime) MarshalJSON() ([]byte, error) { + type NoMethod WarehouseBasedDeliveryTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Do executes the "content.collections.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListCollectionsResponse.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 *CollectionsListCall) Do(opts ...googleapi.CallOption) (*ListCollectionsResponse, 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 := &ListCollectionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil +type WarehouseCutoffTime struct { + // Hour: Required. Hour (24-hour clock) of the cutoff time until which an order + // has to be placed to be processed in the same day by the warehouse. Hour is + // based on the timezone of warehouse. + Hour int64 `json:"hour,omitempty"` + // Minute: Required. Minute of the cutoff time until which an order has to be + // placed to be processed in the same day by the warehouse. Minute is based on + // the timezone of warehouse. + Minute int64 `json:"minute,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hour") 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. "Hour") 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:"-"` } -// 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 *CollectionsListCall) Pages(ctx context.Context, f func(*ListCollectionsResponse) 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) - } +func (s WarehouseCutoffTime) MarshalJSON() ([]byte, error) { + type NoMethod WarehouseCutoffTime + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type CollectionstatusesGetCall struct { +type Weight struct { + // Unit: Required. The weight unit. Acceptable values are: - "kg" - "lb" + Unit string `json:"unit,omitempty"` + // Value: Required. The weight represented as a number. The weight can have a + // maximum precision of four decimal places. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Unit") 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. "Unit") 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 Weight) MarshalJSON() ([]byte, error) { + type NoMethod Weight + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type AccountsAuthinfoCall struct { s *APIService - merchantId int64 - collectionId string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets the status of a collection from your Merchant Center account. -// -// - collectionId: The collectionId of the collection. CollectionId is the same -// as the REST ID of the collection. -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionstatusesService) Get(merchantId int64, collectionId string) *CollectionstatusesGetCall { - c := &CollectionstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.collectionId = collectionId +// Authinfo: Returns information about the authenticated user. +func (r *AccountsService) Authinfo() *AccountsAuthinfoCall { + c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)} 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 *CollectionstatusesGetCall) Fields(s ...googleapi.Field) *CollectionstatusesGetCall { +func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21383,27 +13163,27 @@ func (c *CollectionstatusesGetCall) Fields(s ...googleapi.Field) *Collectionstat // 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 *CollectionstatusesGetCall) IfNoneMatch(entityTag string) *CollectionstatusesGetCall { +func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CollectionstatusesGetCall) Context(ctx context.Context) *CollectionstatusesGetCall { +func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall { 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 *CollectionstatusesGetCall) Header() http.Header { +func (c *AccountsAuthinfoCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionstatusesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21411,27 +13191,23 @@ func (c *CollectionstatusesGetCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses/{collectionId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "collectionId": c.collectionId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collectionstatuses.get" call. +// Do executes the "content.accounts.authinfo" call. // Any non-2xx status code is an error. Response headers are in either -// *CollectionStatus.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 *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*CollectionStatus, error) { +// *AccountsAuthInfoResponse.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 *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21450,7 +13226,7 @@ func (c *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*Collectio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CollectionStatus{ + ret := &AccountsAuthInfoResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21463,100 +13239,88 @@ func (c *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*Collectio return ret, nil } -type CollectionstatusesListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsClaimwebsiteCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the statuses of the collections in your Merchant Center account. +// Claimwebsite: Claims the website of a Merchant Center sub-account. Merchant +// accounts with approved third-party CSSs aren't required to claim a website. // -// - merchantId: The ID of the account that contains the collection. This -// account cannot be a multi-client account. -func (r *CollectionstatusesService) List(merchantId int64) *CollectionstatusesListCall { - c := &CollectionstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account whose website is claimed. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall { + c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.accountId = accountId return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// collection statuses to return in the response, used for paging. Defaults to -// 50; values above 1000 will be coerced to 1000. -func (c *CollectionstatusesListCall) PageSize(pageSize int64) *CollectionstatusesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Token (if provided) to -// retrieve the subsequent page. All other parameters must match the original -// call that provided the page token. -func (c *CollectionstatusesListCall) PageToken(pageToken string) *CollectionstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Overwrite sets the optional parameter "overwrite": Only available to +// selected merchants, for example multi-client accounts (MCAs) and their +// sub-accounts. When set to `True`, this option removes any existing claim on +// the requested website and replaces it with a claim from the account that +// makes the request. +func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall { + c.urlParams_.Set("overwrite", fmt.Sprint(overwrite)) 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 *CollectionstatusesListCall) Fields(s ...googleapi.Field) *CollectionstatusesListCall { +func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall { 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 *CollectionstatusesListCall) IfNoneMatch(entityTag string) *CollectionstatusesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *CollectionstatusesListCall) Context(ctx context.Context) *CollectionstatusesListCall { +func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall { 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 *CollectionstatusesListCall) Header() http.Header { +func (c *AccountsClaimwebsiteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CollectionstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.collectionstatuses.list" call. +// Do executes the "content.accounts.claimwebsite" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCollectionStatusesResponse.ServerResponse.Header or (if a response was +// *AccountsClaimWebsiteResponse.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 *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListCollectionStatusesResponse, error) { +func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21575,7 +13339,7 @@ func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListColl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCollectionStatusesResponse{ + ret := &AccountsClaimWebsiteResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21588,98 +13352,71 @@ func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListColl 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 *CollectionstatusesListCall) Pages(ctx context.Context, f func(*ListCollectionStatusesResponse) 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 ConversionsourcesCreateCall struct { - s *APIService - merchantId int64 - conversionsource *ConversionSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCustombatchCall struct { + s *APIService + accountscustombatchrequest *AccountsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new conversion source. -// -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Create(merchantId int64, conversionsource *ConversionSource) *ConversionsourcesCreateCall { - c := &ConversionsourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.conversionsource = conversionsource +// Custombatch: Retrieves, inserts, updates, and deletes multiple Merchant +// Center (sub-)accounts in a single request. +func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall { + c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountscustombatchrequest = accountscustombatchrequest 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 *ConversionsourcesCreateCall) Fields(s ...googleapi.Field) *ConversionsourcesCreateCall { +func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesCreateCall) Context(ctx context.Context) *ConversionsourcesCreateCall { +func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall { 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 *ConversionsourcesCreateCall) Header() http.Header { +func (c *AccountsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.create" call. +// Do executes the "content.accounts.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.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 *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +// *AccountsCustomBatchResponse.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 *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21698,7 +13435,7 @@ func (c *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*Convers if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &AccountsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21711,57 +13448,63 @@ func (c *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*Convers return ret, nil } -type ConversionsourcesDeleteCall struct { - s *APIService - merchantId int64 - conversionSourceId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsDeleteCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Archives an existing conversion source. It will be recoverable for -// 30 days. This archiving behavior is not typical in the Content API and -// unique to this service. +// Delete: Deletes a Merchant Center sub-account. // -// - conversionSourceId: The ID of the conversion source to be deleted. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Delete(merchantId int64, conversionSourceId string) *ConversionsourcesDeleteCall { - c := &ConversionsourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. This must be a multi-client +// account, and accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall { + c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId + c.accountId = accountId + return c +} + +// Force sets the optional parameter "force": Option to delete sub-accounts +// with products. The default value is false. +func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) 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 *ConversionsourcesDeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesDeleteCall { +func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesDeleteCall) Context(ctx context.Context) *ConversionsourcesDeleteCall { +func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall { 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 *ConversionsourcesDeleteCall) Header() http.Header { +func (c *AccountsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -21769,14 +13512,14 @@ func (c *ConversionsourcesDeleteCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.delete" call. -func (c *ConversionsourcesDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.delete" call. +func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if err != nil { @@ -21789,31 +13532,46 @@ func (c *ConversionsourcesDeleteCall) Do(opts ...googleapi.CallOption) error { return nil } -type ConversionsourcesGetCall struct { - s *APIService - merchantId int64 - conversionSourceId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Fetches a conversion source. +// Get: Retrieves a Merchant Center account. // -// - conversionSourceId: The REST ID of the collection. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Get(merchantId int64, conversionSourceId string) *ConversionsourcesGetCall { - c := &ConversionsourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall { + c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId + c.accountId = accountId + return c +} + +// View sets the optional parameter "view": Controls which fields will be +// populated. Acceptable values are: "merchant" and "css". The default value is +// "merchant". +// +// Possible values: +// +// "MERCHANT" - Default. View is populated with Merchant Center fields. +// "CSS" - View is populated with Comparison Shopping Services fields. +func (c *AccountsGetCall) View(view string) *AccountsGetCall { + c.urlParams_.Set("view", view) 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 *ConversionsourcesGetCall) Fields(s ...googleapi.Field) *ConversionsourcesGetCall { +func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21821,27 +13579,27 @@ func (c *ConversionsourcesGetCall) Fields(s ...googleapi.Field) *Conversionsourc // 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 *ConversionsourcesGetCall) IfNoneMatch(entityTag string) *ConversionsourcesGetCall { +func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesGetCall) Context(ctx context.Context) *ConversionsourcesGetCall { +func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { 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 *ConversionsourcesGetCall) Header() http.Header { +func (c *AccountsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21849,7 +13607,7 @@ func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21857,19 +13615,18 @@ func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.get" call. +// Do executes the "content.accounts.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.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 *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +// *Account.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 *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21888,7 +13645,7 @@ func (c *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*Conversion if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21901,106 +13658,77 @@ func (c *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*Conversion return ret, nil } -type ConversionsourcesListCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsInsertCall struct { + s *APIService + merchantId uint64 + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of conversion sources the caller has access to. +// Insert: Creates a Merchant Center sub-account. // -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) List(merchantId int64) *ConversionsourcesListCall { - c := &ConversionsourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall { + c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// conversion sources to return in a page. If no `page_size` is specified, -// `100` is used as the default value. The maximum value is `200`. Values above -// `200` will be coerced to `200`. Regardless of pagination, at most `200` -// conversion sources are returned in total. -func (c *ConversionsourcesListCall) PageSize(pageSize int64) *ConversionsourcesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token. -func (c *ConversionsourcesListCall) PageToken(pageToken string) *ConversionsourcesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ShowDeleted sets the optional parameter "showDeleted": If true, also returns -// archived conversion sources. -func (c *ConversionsourcesListCall) ShowDeleted(showDeleted bool) *ConversionsourcesListCall { - c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) + c.account = account 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 *ConversionsourcesListCall) Fields(s ...googleapi.Field) *ConversionsourcesListCall { +func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall { 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 *ConversionsourcesListCall) IfNoneMatch(entityTag string) *ConversionsourcesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesListCall) Context(ctx context.Context) *ConversionsourcesListCall { +func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall { 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 *ConversionsourcesListCall) Header() http.Header { +func (c *AccountsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesListCall) 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 *AccountsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.list" call. +// Do executes the "content.accounts.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *ListConversionSourcesResponse.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 *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConversionSourcesResponse, error) { +// *Account.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 *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22015,126 +13743,101 @@ func (c *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConve if err != nil { return nil, err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ListConversionSourcesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - 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 *ConversionsourcesListCall) Pages(ctx context.Context, f func(*ListConversionSourcesResponse) 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) + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Account{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err } + return ret, nil } -type ConversionsourcesPatchCall struct { - s *APIService - merchantId int64 - conversionSourceId string - conversionsource *ConversionSource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsLinkCall struct { + s *APIService + merchantId uint64 + accountId uint64 + accountslinkrequest *AccountsLinkRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates information of an existing conversion source. +// Link: Performs an action on a link between two Merchant Center accounts, +// namely accountId and linkedAccountId. // -// - conversionSourceId: The ID of the conversion source to be updated. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Patch(merchantId int64, conversionSourceId string, conversionsource *ConversionSource) *ConversionsourcesPatchCall { - c := &ConversionsourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account that should be linked. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Link(merchantId uint64, accountId uint64, accountslinkrequest *AccountsLinkRequest) *AccountsLinkCall { + c := &AccountsLinkCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId - c.conversionsource = conversionsource - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. List of -// fields being updated. -func (c *ConversionsourcesPatchCall) UpdateMask(updateMask string) *ConversionsourcesPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.accountId = accountId + c.accountslinkrequest = accountslinkrequest 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 *ConversionsourcesPatchCall) Fields(s ...googleapi.Field) *ConversionsourcesPatchCall { +func (c *AccountsLinkCall) Fields(s ...googleapi.Field) *AccountsLinkCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesPatchCall) Context(ctx context.Context) *ConversionsourcesPatchCall { +func (c *AccountsLinkCall) Context(ctx context.Context) *AccountsLinkCall { 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 *ConversionsourcesPatchCall) Header() http.Header { +func (c *AccountsLinkCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLinkCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountslinkrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/link") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.patch" call. +// Do executes the "content.accounts.link" call. // Any non-2xx status code is an error. Response headers are in either -// *ConversionSource.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *AccountsLinkResponse.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 *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { +func (c *AccountsLinkCall) Do(opts ...googleapi.CallOption) (*AccountsLinkResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22153,7 +13856,7 @@ func (c *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*Conversi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ConversionSource{ + ret := &AccountsLinkResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22166,116 +13869,221 @@ func (c *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*Conversi return ret, nil } -type ConversionsourcesUndeleteCall struct { - s *APIService - merchantId int64 - conversionSourceId string - undeleteconversionsourcerequest *UndeleteConversionSourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Undelete: Re-enables an archived conversion source. +// List: Lists the sub-accounts in your Merchant Center account. // -// - conversionSourceId: The ID of the conversion source to be undeleted. -// - merchantId: The ID of the account that owns the new conversion source. -func (r *ConversionsourcesService) Undelete(merchantId int64, conversionSourceId string, undeleteconversionsourcerequest *UndeleteConversionSourceRequest) *ConversionsourcesUndeleteCall { - c := &ConversionsourcesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountsService) List(merchantId uint64) *AccountsListCall { + c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.conversionSourceId = conversionSourceId - c.undeleteconversionsourcerequest = undeleteconversionsourcerequest + return c +} + +// Label sets the optional parameter "label": If view is set to "css", only +// return accounts that are assigned label with given ID. +func (c *AccountsListCall) Label(label uint64) *AccountsListCall { + c.urlParams_.Set("label", fmt.Sprint(label)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// accounts to return in the response, used for paging. +func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// Name sets the optional parameter "name": If set, only the accounts with the +// given name (case sensitive) will be returned. +func (c *AccountsListCall) Name(name string) *AccountsListCall { + c.urlParams_.Set("name", name) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": Controls which fields will be +// populated. Acceptable values are: "merchant" and "css". The default value is +// "merchant". +// +// Possible values: +// +// "MERCHANT" - Default. View is populated with Merchant Center fields. +// "CSS" - View is populated with Comparison Shopping Services fields. +func (c *AccountsListCall) View(view string) *AccountsListCall { + c.urlParams_.Set("view", view) 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 *ConversionsourcesUndeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesUndeleteCall { +func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { 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 *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ConversionsourcesUndeleteCall) Context(ctx context.Context) *ConversionsourcesUndeleteCall { +func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { 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 *ConversionsourcesUndeleteCall) Header() http.Header { +func (c *AccountsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ConversionsourcesUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteconversionsourcerequest) - if err != nil { - return nil, err +func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}:undelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "conversionSourceId": c.conversionSourceId, + "merchantId": strconv.FormatUint(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.conversionsources.undelete" call. -func (c *ConversionsourcesUndeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountsListResponse.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 *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, 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 err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &AccountsListResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) 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 AccountsListlinksCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Listlinks: Returns the list of accounts linked to your Merchant Center +// account. +// +// - accountId: The ID of the account for which to list links. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Listlinks(merchantId uint64, accountId uint64) *AccountsListlinksCall { + c := &AccountsListlinksCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + return c } -type CssesGetCall struct { - s *APIService - cssGroupId int64 - cssDomainId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// MaxResults sets the optional parameter "maxResults": The maximum number of +// links to return in the response, used for pagination. The minimum allowed +// value is 5 results per page. If provided value is lower than 5, it will be +// automatically increased to 5. +func (c *AccountsListlinksCall) MaxResults(maxResults int64) *AccountsListlinksCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c } -// Get: Retrieves a single CSS domain by ID. -// -// - cssDomainId: The ID of the CSS domain to return. -// - cssGroupId: The ID of the managing account. If this parameter is not the -// same as cssDomainId (#cssDomainId), then this ID must be a CSS group ID -// and `cssDomainId` must be the ID of a CSS domain affiliated with this -// group. -func (r *CssesService) Get(cssGroupId int64, cssDomainId int64) *CssesGetCall { - c := &CssesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId - c.cssDomainId = cssDomainId +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountsListlinksCall) PageToken(pageToken string) *AccountsListlinksCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { +func (c *AccountsListlinksCall) Fields(s ...googleapi.Field) *AccountsListlinksCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22283,27 +14091,27 @@ func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { // 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 *CssesGetCall) IfNoneMatch(entityTag string) *CssesGetCall { +func (c *AccountsListlinksCall) IfNoneMatch(entityTag string) *AccountsListlinksCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *CssesGetCall) Context(ctx context.Context) *CssesGetCall { +func (c *AccountsListlinksCall) Context(ctx context.Context) *AccountsListlinksCall { 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 *CssesGetCall) Header() http.Header { +func (c *AccountsListlinksCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsListlinksCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22311,7 +14119,7 @@ func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/listlinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22319,18 +14127,19 @@ func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), - "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.get" call. +// Do executes the "content.accounts.listlinks" call. // Any non-2xx status code is an error. Response headers are in either -// *Css.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 *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { +// *AccountsListLinksResponse.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 *AccountsListlinksCall) Do(opts ...googleapi.CallOption) (*AccountsListLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22349,7 +14158,7 @@ func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Css{ + ret := &AccountsListLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22362,101 +14171,105 @@ func (c *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { return ret, nil } -type CssesListCall struct { - s *APIService - cssGroupId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists CSS domains affiliated with a CSS group. -// -// - cssGroupId: The CSS group ID of CSS domains to be listed. -func (r *CssesService) List(cssGroupId int64) *CssesListCall { - c := &CssesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId - return c +// 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 *AccountsListlinksCall) Pages(ctx context.Context, f func(*AccountsListLinksResponse) 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) + } } -// PageSize sets the optional parameter "pageSize": The maximum number of CSS -// domains to return. The service may return fewer than this value. If -// unspecified, at most 50 CSS domains will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *CssesListCall) PageSize(pageSize int64) *CssesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type AccountsRequestphoneverificationCall struct { + s *APIService + merchantId int64 + accountId int64 + requestphoneverificationrequest *RequestPhoneVerificationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListCsses` call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to `ListCsses` must -// match the call that provided the page token. -func (c *CssesListCall) PageToken(pageToken string) *CssesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Requestphoneverification: Request verification code to start phone +// verification. +// +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Requestphoneverification(merchantId int64, accountId int64, requestphoneverificationrequest *RequestPhoneVerificationRequest) *AccountsRequestphoneverificationCall { + c := &AccountsRequestphoneverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.requestphoneverificationrequest = requestphoneverificationrequest 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 *CssesListCall) Fields(s ...googleapi.Field) *CssesListCall { +func (c *AccountsRequestphoneverificationCall) Fields(s ...googleapi.Field) *AccountsRequestphoneverificationCall { 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 *CssesListCall) IfNoneMatch(entityTag string) *CssesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *CssesListCall) Context(ctx context.Context) *CssesListCall { +func (c *AccountsRequestphoneverificationCall) Context(ctx context.Context) *AccountsRequestphoneverificationCall { 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 *CssesListCall) Header() http.Header { +func (c *AccountsRequestphoneverificationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesListCall) 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 *AccountsRequestphoneverificationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.requestphoneverificationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/requestphoneverification") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.list" call. +// Do executes the "content.accounts.requestphoneverification" call. // Any non-2xx status code is an error. Response headers are in either -// *ListCssesResponse.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 *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, error) { +// *RequestPhoneVerificationResponse.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 *AccountsRequestphoneverificationCall) Do(opts ...googleapi.CallOption) (*RequestPhoneVerificationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22475,7 +14288,7 @@ func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListCssesResponse{ + ret := &RequestPhoneVerificationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22488,102 +14301,83 @@ func (c *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, er 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 *CssesListCall) Pages(ctx context.Context, f func(*ListCssesResponse) 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 CssesUpdatelabelsCall struct { - s *APIService - cssGroupId int64 - cssDomainId int64 - labelids *LabelIds - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updatelabels: Updates labels that are assigned to a CSS domain by its CSS -// group. +// Update: Updates a Merchant Center account. Any fields that are not provided +// are deleted from the resource. // -// - cssDomainId: The ID of the updated CSS domain. -// - cssGroupId: The CSS group ID of the updated CSS domain. -func (r *CssesService) Updatelabels(cssGroupId int64, cssDomainId int64, labelids *LabelIds) *CssesUpdatelabelsCall { - c := &CssesUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.cssGroupId = cssGroupId - c.cssDomainId = cssDomainId - c.labelids = labelids +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall { + c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.account = account 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 *CssesUpdatelabelsCall) Fields(s ...googleapi.Field) *CssesUpdatelabelsCall { +func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *CssesUpdatelabelsCall) Context(ctx context.Context) *CssesUpdatelabelsCall { +func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { 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 *CssesUpdatelabelsCall) Header() http.Header { +func (c *AccountsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *CssesUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.labelids) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}/updatelabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", 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{ - "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), - "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.csses.updatelabels" call. +// Do executes the "content.accounts.update" call. // Any non-2xx status code is an error. Response headers are in either -// *Css.ServerResponse.Header or (if a response was returned at all) in +// *Account.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 *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { +func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22602,7 +14396,7 @@ func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Css{ + ret := &Account{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22615,71 +14409,82 @@ func (c *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { return ret, nil } -type DatafeedsCustombatchCall struct { +type AccountsUpdatelabelsCall struct { s *APIService - datafeedscustombatchrequest *DatafeedsCustomBatchRequest + merchantId uint64 + accountId uint64 + accountsupdatelabelsrequest *AccountsUpdateLabelsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Custombatch: Deletes, fetches, gets, inserts and updates multiple datafeeds -// in a single request. -func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { - c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.datafeedscustombatchrequest = datafeedscustombatchrequest +// Updatelabels: Updates labels that are assigned to the Merchant Center +// account by CSS user. +// +// - accountId: The ID of the account whose labels are updated. +// - merchantId: The ID of the managing account. +func (r *AccountsService) Updatelabels(merchantId uint64, accountId uint64, accountsupdatelabelsrequest *AccountsUpdateLabelsRequest) *AccountsUpdatelabelsCall { + c := &AccountsUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.accountsupdatelabelsrequest = accountsupdatelabelsrequest 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 *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { +func (c *AccountsUpdatelabelsCall) Fields(s ...googleapi.Field) *AccountsUpdatelabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { +func (c *AccountsUpdatelabelsCall) Context(ctx context.Context) *AccountsUpdatelabelsCall { 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 *DatafeedsCustombatchCall) Header() http.Header { +func (c *AccountsUpdatelabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountsupdatelabelsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/updatelabels") 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{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.custombatch" call. +// Do executes the "content.accounts.updatelabels" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a response was +// *AccountsUpdateLabelsResponse.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 *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { +func (c *AccountsUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*AccountsUpdateLabelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22698,7 +14503,7 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsCustomBatchResponse{ + ret := &AccountsUpdateLabelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22711,137 +14516,171 @@ func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsC return ret, nil } -type DatafeedsDeleteCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsVerifyphonenumberCall struct { + s *APIService + merchantId int64 + accountId int64 + verifyphonenumberrequest *VerifyPhoneNumberRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a datafeed configuration from your Merchant Center account. +// Verifyphonenumber: Validates verification code to verify phone number for +// the account. If successful this will overwrite the value of +// `accounts.businessinformation.phoneNumber`. Only verified phone number will +// replace an existing verified phone number. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { - c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// accountId must be the ID of a sub-account of this account. +func (r *AccountsService) Verifyphonenumber(merchantId int64, accountId int64, verifyphonenumberrequest *VerifyPhoneNumberRequest) *AccountsVerifyphonenumberCall { + c := &AccountsVerifyphonenumberCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.datafeedId = datafeedId + c.accountId = accountId + c.verifyphonenumberrequest = verifyphonenumberrequest 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 *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { +func (c *AccountsVerifyphonenumberCall) Fields(s ...googleapi.Field) *AccountsVerifyphonenumberCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { +func (c *AccountsVerifyphonenumberCall) Context(ctx context.Context) *AccountsVerifyphonenumberCall { 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 *DatafeedsDeleteCall) Header() http.Header { +func (c *AccountsVerifyphonenumberCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *AccountsVerifyphonenumberCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifyphonenumberrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/verifyphonenumber") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.delete" call. -func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accounts.verifyphonenumber" call. +// Any non-2xx status code is an error. Response headers are in either +// *VerifyPhoneNumberResponse.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 *AccountsVerifyphonenumberCall) Do(opts ...googleapi.CallOption) (*VerifyPhoneNumberResponse, 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 err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &VerifyPhoneNumberResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -type DatafeedsFetchnowCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsCredentialsCreateCall struct { + s *APIService + accountId int64 + accountcredentials *AccountCredentials + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center account. -// If you need to call this method more than once per day, we recommend you use -// the Products service -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products) -// to update your product data. +// Create: Uploads credentials for the Merchant Center account. If credentials +// already exist for this Merchant Center account and purpose, this method +// updates them. // -// - datafeedId: The ID of the datafeed to be fetched. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { - c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId +// - accountId: The merchant id of the account these credentials belong to. +func (r *AccountsCredentialsService) Create(accountId int64, accountcredentials *AccountCredentials) *AccountsCredentialsCreateCall { + c := &AccountsCredentialsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.accountcredentials = accountcredentials 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 *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { +func (c *AccountsCredentialsCreateCall) Fields(s ...googleapi.Field) *AccountsCredentialsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { +func (c *AccountsCredentialsCreateCall) Context(ctx context.Context) *AccountsCredentialsCreateCall { 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 *DatafeedsFetchnowCall) Header() http.Header { +func (c *AccountsCredentialsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *AccountsCredentialsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountcredentials) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/credentials") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22849,19 +14688,18 @@ func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.fetchnow" call. +// Do executes the "content.accounts.credentials.create" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsFetchNowResponse.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 *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { +// *AccountCredentials.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 *AccountsCredentialsCreateCall) Do(opts ...googleapi.CallOption) (*AccountCredentials, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22880,7 +14718,7 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsFetchNowResponse{ + ret := &AccountCredentials{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22893,87 +14731,76 @@ func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetc return ret, nil } -type DatafeedsGetCall struct { +type AccountsLabelsCreateCall struct { s *APIService - merchantId uint64 - datafeedId uint64 + accountId int64 + accountlabel *AccountLabel urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves a datafeed configuration from your Merchant Center account. +// Create: Creates a new label, not assigned to any account. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { - c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId +// - accountId: The id of the account this label belongs to. +func (r *AccountsLabelsService) Create(accountId int64, accountlabel *AccountLabel) *AccountsLabelsCreateCall { + c := &AccountsLabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.accountlabel = accountlabel 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 *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { +func (c *AccountsLabelsCreateCall) Fields(s ...googleapi.Field) *AccountsLabelsCreateCall { 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 *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { +func (c *AccountsLabelsCreateCall) Context(ctx context.Context) *AccountsLabelsCreateCall { 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 *DatafeedsGetCall) Header() http.Header { +func (c *AccountsLabelsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsGetCall) 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 *AccountsLabelsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountlabel) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.get" call. +// Do executes the "content.accounts.labels.create" call. // Any non-2xx status code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *AccountLabel.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 *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +func (c *AccountsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22992,7 +14819,7 @@ func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Datafeed{ + ret := &AccountLabel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23005,139 +14832,115 @@ func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { return ret, nil } -type DatafeedsInsertCall struct { +type AccountsLabelsDeleteCall struct { s *APIService - merchantId uint64 - datafeed *Datafeed + accountId int64 + labelId int64 urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Registers a datafeed configuration with your Merchant Center -// account. +// Delete: Deletes a label and removes it from all accounts to which it was +// assigned. // -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { - c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeed = datafeed +// - accountId: The id of the account that owns the label. +// - labelId: The id of the label to delete. +func (r *AccountsLabelsService) Delete(accountId int64, labelId int64) *AccountsLabelsDeleteCall { + c := &AccountsLabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.labelId = labelId 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 *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { +func (c *AccountsLabelsDeleteCall) Fields(s ...googleapi.Field) *AccountsLabelsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { +func (c *AccountsLabelsDeleteCall) Context(ctx context.Context) *AccountsLabelsDeleteCall { 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 *DatafeedsInsertCall) Header() http.Header { +func (c *AccountsLabelsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *AccountsLabelsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "labelId": strconv.FormatInt(c.labelId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Datafeed.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 *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +// Do executes the "content.accounts.labels.delete" call. +func (c *AccountsLabelsDeleteCall) Do(opts ...googleapi.CallOption) 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 + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Datafeed{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type DatafeedsListCall struct { +type AccountsLabelsListCall struct { s *APIService - merchantId uint64 + accountId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the configurations for datafeeds in your Merchant Center -// account. +// List: Lists the labels assigned to an account. // -// - merchantId: The ID of the account that manages the datafeeds. This account -// cannot be a multi-client account. -func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { - c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId +// - accountId: The account id for whose labels are to be listed. +func (r *AccountsLabelsService) List(accountId int64) *AccountsLabelsListCall { + c := &AccountsLabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// products to return in the response, used for paging. -func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// PageSize sets the optional parameter "pageSize": The maximum number of +// labels to return. The service may return fewer than this value. If +// unspecified, at most 50 labels will be returned. The maximum value is 1000; +// values above 1000 will be coerced to 1000. +func (c *AccountsLabelsListCall) PageSize(pageSize int64) *AccountsLabelsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListAccountLabels` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListAccountLabels` must match the call that provided the page token. +func (c *AccountsLabelsListCall) PageToken(pageToken string) *AccountsLabelsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -23145,7 +14948,7 @@ func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { +func (c *AccountsLabelsListCall) Fields(s ...googleapi.Field) *AccountsLabelsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23153,27 +14956,27 @@ func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { // 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 *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { +func (c *AccountsLabelsListCall) IfNoneMatch(entityTag string) *AccountsLabelsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { +func (c *AccountsLabelsListCall) Context(ctx context.Context) *AccountsLabelsListCall { 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 *DatafeedsListCall) Header() http.Header { +func (c *AccountsLabelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLabelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23181,7 +14984,7 @@ func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23189,18 +14992,18 @@ func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.list" call. +// Do executes the "content.accounts.labels.list" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedsListResponse.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 *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { +// *ListAccountLabelsResponse.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 *AccountsLabelsListCall) Do(opts ...googleapi.CallOption) (*ListAccountLabelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23219,7 +15022,7 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedsListResponse{ + ret := &ListAccountLabelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23235,7 +15038,7 @@ func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResp // 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 *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { +func (c *AccountsLabelsListCall) Pages(ctx context.Context, f func(*ListAccountLabelsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23253,82 +15056,80 @@ func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResp } } -type DatafeedsUpdateCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - datafeed *Datafeed - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsLabelsPatchCall struct { + s *APIService + accountId int64 + labelId int64 + accountlabel *AccountLabel + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates a datafeed configuration of your Merchant Center account. -// Any fields that are not provided are deleted from the resource. +// Patch: Updates a label. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { - c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId - c.datafeed = datafeed +// - accountId: The id of the account this label belongs to. +// - labelId: The id of the label to update. +func (r *AccountsLabelsService) Patch(accountId int64, labelId int64, accountlabel *AccountLabel) *AccountsLabelsPatchCall { + c := &AccountsLabelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.labelId = labelId + c.accountlabel = accountlabel 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 *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { +func (c *AccountsLabelsPatchCall) Fields(s ...googleapi.Field) *AccountsLabelsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { +func (c *AccountsLabelsPatchCall) Context(ctx context.Context) *AccountsLabelsPatchCall { 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 *DatafeedsUpdateCall) Header() http.Header { +func (c *AccountsLabelsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsLabelsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountlabel) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/labels/{labelId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "labelId": strconv.FormatInt(c.labelId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeeds.update" call. +// Do executes the "content.accounts.labels.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Datafeed.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *AccountLabel.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 *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { +func (c *AccountsLabelsPatchCall) Do(opts ...googleapi.CallOption) (*AccountLabel, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23347,7 +15148,7 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Datafeed{ + ret := &AccountLabel{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23360,71 +15161,78 @@ func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error return ret, nil } -type DatafeedstatusesCustombatchCall struct { - s *APIService - datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierCreateCall struct { + s *APIService + accountId int64 + accountreturncarrier *AccountReturnCarrier + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Custombatch: Gets multiple Merchant Center datafeed statuses in a single -// request. -func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { - c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest +// Create: Links return carrier to a merchant account. +// +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +func (r *AccountsReturncarrierService) Create(accountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierCreateCall { + c := &AccountsReturncarrierCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.accountreturncarrier = accountreturncarrier 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 *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { +func (c *AccountsReturncarrierCreateCall) Fields(s ...googleapi.Field) *AccountsReturncarrierCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { +func (c *AccountsReturncarrierCreateCall) Context(ctx context.Context) *AccountsReturncarrierCreateCall { 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 *DatafeedstatusesCustombatchCall) Header() http.Header { +func (c *AccountsReturncarrierCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReturncarrierCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountreturncarrier) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") 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{ + "accountId": strconv.FormatInt(c.accountId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.custombatch" call. +// Do executes the "content.accounts.returncarrier.create" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedstatusesCustomBatchResponse.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 *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { +// *AccountReturnCarrier.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 *AccountsReturncarrierCreateCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23443,7 +15251,7 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedstatusesCustomBatchResponse{ + ret := &AccountReturnCarrier{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23456,185 +15264,107 @@ func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*Dat return ret, nil } -type DatafeedstatusesGetCall struct { - s *APIService - merchantId uint64 - datafeedId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierDeleteCall struct { + s *APIService + accountId int64 + carrierAccountId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the status of a datafeed from your Merchant Center account. +// Delete: Delete a return carrier in the merchant account. // -// - datafeedId: The ID of the datafeed. -// - merchantId: The ID of the account that manages the datafeed. This account -// cannot be a multi-client account. -func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { - c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.datafeedId = datafeedId - return c -} - -// Country sets the optional parameter "country": Deprecated. Use `feedLabel` -// instead. The country to get the datafeed status for. If this parameter is -// provided then `language` must also be provided. Note that this parameter is -// required for feeds targeting multiple countries and languages, since a feed -// may have a different status for each target. -func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { - c.urlParams_.Set("country", country) - return c -} - -// FeedLabel sets the optional parameter "feedLabel": The feed label to get the -// datafeed status for. If this parameter is provided then `language` must also -// be provided. Note that this parameter is required for feeds targeting -// multiple countries and languages, since a feed may have a different status -// for each target. -func (c *DatafeedstatusesGetCall) FeedLabel(feedLabel string) *DatafeedstatusesGetCall { - c.urlParams_.Set("feedLabel", feedLabel) - return c -} - -// Language sets the optional parameter "language": The language to get the -// datafeed status for. If this parameter is provided then `country` must also -// be provided. Note that this parameter is required for feeds targeting -// multiple countries and languages, since a feed may have a different status -// for each target. -func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { - c.urlParams_.Set("language", language) +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +// - carrierAccountId: The Google-provided unique carrier ID, used to update +// the resource. +func (r *AccountsReturncarrierService) Delete(accountId int64, carrierAccountId int64) *AccountsReturncarrierDeleteCall { + c := &AccountsReturncarrierDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.carrierAccountId = carrierAccountId 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 *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { +func (c *AccountsReturncarrierDeleteCall) Fields(s ...googleapi.Field) *AccountsReturncarrierDeleteCall { 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 *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { +func (c *AccountsReturncarrierDeleteCall) Context(ctx context.Context) *AccountsReturncarrierDeleteCall { 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 *DatafeedstatusesGetCall) Header() http.Header { +func (c *AccountsReturncarrierDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReturncarrierDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "datafeedId": strconv.FormatUint(c.datafeedId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DatafeedStatus.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 *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { +// Do executes the "content.accounts.returncarrier.delete" call. +func (c *AccountsReturncarrierDeleteCall) Do(opts ...googleapi.CallOption) 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 + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DatafeedStatus{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type DatafeedstatusesListCall struct { +type AccountsReturncarrierListCall struct { s *APIService - merchantId uint64 + accountId int64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the statuses of the datafeeds in your Merchant Center account. +// List: Lists available return carriers in the merchant account. // -// - merchantId: The ID of the account that manages the datafeeds. This account -// cannot be a multi-client account. -func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { - c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// products to return in the response, used for paging. -func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +func (r *AccountsReturncarrierService) List(accountId int64) *AccountsReturncarrierListCall { + c := &AccountsReturncarrierListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId 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 *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { +func (c *AccountsReturncarrierListCall) Fields(s ...googleapi.Field) *AccountsReturncarrierListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23642,27 +15372,27 @@ func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *Datafeedstatuse // 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 *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { +func (c *AccountsReturncarrierListCall) IfNoneMatch(entityTag string) *AccountsReturncarrierListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { +func (c *AccountsReturncarrierListCall) Context(ctx context.Context) *AccountsReturncarrierListCall { 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 *DatafeedstatusesListCall) Header() http.Header { +func (c *AccountsReturncarrierListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsReturncarrierListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23670,7 +15400,7 @@ func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23678,18 +15408,18 @@ func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.datafeedstatuses.list" call. +// Do executes the "content.accounts.returncarrier.list" call. // Any non-2xx status code is an error. Response headers are in either -// *DatafeedstatusesListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *ListAccountReturnCarrierResponse.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 *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { +func (c *AccountsReturncarrierListCall) Do(opts ...googleapi.CallOption) (*ListAccountReturnCarrierResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23708,7 +15438,7 @@ func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*Datafeedst if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DatafeedstatusesListResponse{ + ret := &ListAccountReturnCarrierResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23721,107 +15451,83 @@ func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*Datafeedst 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 *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) 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 FreelistingsprogramGetCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type AccountsReturncarrierPatchCall struct { + s *APIService + accountId int64 + carrierAccountId int64 + accountreturncarrier *AccountReturnCarrier + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves the status and review eligibility for the free listing -// program. Returns errors and warnings if they require action to resolve, will -// become disapprovals, or impact impressions. Use `accountstatuses` to view -// all issues for an account. +// Patch: Updates a return carrier in the merchant account. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramService) Get(merchantId int64) *FreelistingsprogramGetCall { - c := &FreelistingsprogramGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId +// - accountId: The Merchant Center Account Id under which the Return Carrier +// is to be linked. +// - carrierAccountId: The Google-provided unique carrier ID, used to update +// the resource. +func (r *AccountsReturncarrierService) Patch(accountId int64, carrierAccountId int64, accountreturncarrier *AccountReturnCarrier) *AccountsReturncarrierPatchCall { + c := &AccountsReturncarrierPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountId = accountId + c.carrierAccountId = carrierAccountId + c.accountreturncarrier = accountreturncarrier 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 *FreelistingsprogramGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramGetCall { - 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 *FreelistingsprogramGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramGetCall { - c.ifNoneMatch_ = entityTag +func (c *AccountsReturncarrierPatchCall) Fields(s ...googleapi.Field) *AccountsReturncarrierPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramGetCall) Context(ctx context.Context) *FreelistingsprogramGetCall { +func (c *AccountsReturncarrierPatchCall) Context(ctx context.Context) *AccountsReturncarrierPatchCall { 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 *FreelistingsprogramGetCall) Header() http.Header { +func (c *AccountsReturncarrierPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramGetCall) 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 *AccountsReturncarrierPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountreturncarrier) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{accountId}/returncarrier/{carrierAccountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "accountId": strconv.FormatInt(c.accountId, 10), + "carrierAccountId": strconv.FormatInt(c.carrierAccountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.get" call. +// Do executes the "content.accounts.returncarrier.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *FreeListingsProgramStatus.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 *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeListingsProgramStatus, error) { +// *AccountReturnCarrier.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 *AccountsReturncarrierPatchCall) Do(opts ...googleapi.CallOption) (*AccountReturnCarrier, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23840,7 +15546,7 @@ func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeList if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FreeListingsProgramStatus{ + ret := &AccountReturnCarrier{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23853,182 +15559,277 @@ func (c *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeList return ret, nil } -type FreelistingsprogramRequestreviewCall struct { - s *APIService - merchantId int64 - requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountstatusesCustombatchCall struct { + s *APIService + accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Requestreview: Requests a review of free listings in a specific region. This -// method deprecated. Use the `MerchantSupportService` to view product and -// account issues and request a review. -// -// - merchantId: The ID of the account. -func (r *FreelistingsprogramService) Requestreview(merchantId int64, requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest) *FreelistingsprogramRequestreviewCall { - c := &FreelistingsprogramRequestreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.requestreviewfreelistingsrequest = requestreviewfreelistingsrequest +// Custombatch: Retrieves multiple Merchant Center account statuses in a single +// request. +func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall { + c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accountstatusescustombatchrequest = accountstatusescustombatchrequest 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 *FreelistingsprogramRequestreviewCall) Fields(s ...googleapi.Field) *FreelistingsprogramRequestreviewCall { +func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramRequestreviewCall) Context(ctx context.Context) *FreelistingsprogramRequestreviewCall { +func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall { 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 *FreelistingsprogramRequestreviewCall) Header() http.Header { +func (c *AccountstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramRequestreviewCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.requestreviewfreelistingsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/requestreview") + urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.requestreview" call. -func (c *FreelistingsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accountstatuses.custombatch" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountstatusesCustomBatchResponse.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 *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, 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 err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &AccountstatusesCustomBatchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -type FreelistingsprogramCheckoutsettingsDeleteCall struct { - s *APIService - merchantId int64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccountstatusesGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes `Checkout` settings and unenrolls merchant from `Checkout` -// program. +// Get: Retrieves the status of a Merchant Center account. No itemLevelIssues +// are returned for multi-client accounts. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Delete(merchantId int64) *FreelistingsprogramCheckoutsettingsDeleteCall { - c := &FreelistingsprogramCheckoutsettingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall { + c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.accountId = accountId + return c +} + +// Destinations sets the optional parameter "destinations": If set, only issues +// for the specified destinations are returned, otherwise only issues for the +// Shopping destination. +func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) 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 *FreelistingsprogramCheckoutsettingsDeleteCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsDeleteCall { +func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall { 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 *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsDeleteCall { +func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall { 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 *FreelistingsprogramCheckoutsettingsDeleteCall) Header() http.Header { +func (c *AccountstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.checkoutsettings.delete" call. -func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "content.accountstatuses.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *AccountStatus.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 *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, 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 err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &AccountStatus{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -type FreelistingsprogramCheckoutsettingsGetCall struct { +type AccountstatusesListCall struct { s *APIService - merchantId int64 + merchantId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets Checkout settings for the given merchant. This includes -// information about review state, enrollment state and URL settings. +// List: Lists the statuses of the sub-accounts in your Merchant Center +// account. // -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Get(merchantId int64) *FreelistingsprogramCheckoutsettingsGetCall { - c := &FreelistingsprogramCheckoutsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall { + c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId return c } +// Destinations sets the optional parameter "destinations": If set, only issues +// for the specified destinations are returned, otherwise only issues for the +// Shopping destination. +func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall { + c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// account statuses to return in the response, used for paging. +func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// Name sets the optional parameter "name": If set, only the accounts with the +// given name (case sensitive) will be returned. +func (c *AccountstatusesListCall) Name(name string) *AccountstatusesListCall { + c.urlParams_.Set("name", name) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsGetCall { +func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24036,27 +15837,27 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) Fields(s ...googleapi.Field // 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 *FreelistingsprogramCheckoutsettingsGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramCheckoutsettingsGetCall { +func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsGetCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsGetCall { +func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall { 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 *FreelistingsprogramCheckoutsettingsGetCall) Header() http.Header { +func (c *AccountstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24064,7 +15865,7 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24072,18 +15873,18 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatUint(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.checkoutsettings.get" call. +// Do executes the "content.accountstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CheckoutSettings.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 *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { +// *AccountstatusesListResponse.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 *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24102,7 +15903,7 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CheckoutSettings{ + ret := &AccountstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24115,77 +15916,92 @@ func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type FreelistingsprogramCheckoutsettingsInsertCall struct { - s *APIService - merchantId int64 - insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest - 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 *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) 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) + } } -// Insert: Enrolls merchant in `Checkout` program. -// -// - merchantId: The ID of the account. -func (r *FreelistingsprogramCheckoutsettingsService) Insert(merchantId int64, insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest) *FreelistingsprogramCheckoutsettingsInsertCall { - c := &FreelistingsprogramCheckoutsettingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.insertcheckoutsettingsrequest = insertcheckoutsettingsrequest +type AccounttaxCustombatchCall struct { + s *APIService + accounttaxcustombatchrequest *AccounttaxCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Custombatch: Retrieves and updates tax settings of multiple accounts in a +// single request. +func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall { + c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.accounttaxcustombatchrequest = accounttaxcustombatchrequest 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 *FreelistingsprogramCheckoutsettingsInsertCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsInsertCall { +func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FreelistingsprogramCheckoutsettingsInsertCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsInsertCall { +func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall { 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 *FreelistingsprogramCheckoutsettingsInsertCall) Header() http.Header { +func (c *AccounttaxCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FreelistingsprogramCheckoutsettingsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertcheckoutsettingsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.freelistingsprogram.checkoutsettings.insert" call. +// Do executes the "content.accounttax.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *CheckoutSettings.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 *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { +// *AccounttaxCustomBatchResponse.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 *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24204,7 +16020,7 @@ func (c *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CheckoutSettings{ + ret := &AccounttaxCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24217,71 +16033,89 @@ func (c *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.Cal return ret, nil } -type LiasettingsCustombatchCall struct { - s *APIService - liasettingscustombatchrequest *LiasettingsCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type AccounttaxGetCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Retrieves and/or updates the LIA settings of multiple accounts -// in a single request. -func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { - c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.liasettingscustombatchrequest = liasettingscustombatchrequest +// Get: Retrieves the tax settings of the account. +// +// - accountId: The ID of the account for which to get/update account tax +// settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall { + c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId 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 *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { +func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall { 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 *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { +func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall { 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 *LiasettingsCustombatchCall) Header() http.Header { +func (c *AccounttaxGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest) - if err != nil { - return nil, err +func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.custombatch" call. +// Do executes the "content.accounttax.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsCustomBatchResponse.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 *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { +// *AccountTax.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 *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24300,7 +16134,7 @@ func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*Liasetti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsCustomBatchResponse{ + ret := &AccountTax{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24313,33 +16147,44 @@ func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*Liasetti return ret, nil } -type LiasettingsGetCall struct { +type AccounttaxListCall struct { s *APIService merchantId uint64 - accountId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves the LIA settings of the account. +// List: Lists the tax settings of the sub-accounts in your Merchant Center +// account. // -// - accountId: The ID of the account for which to get or update LIA settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { - c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall { + c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// tax settings to return in the response, used for paging. +func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { +func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24347,27 +16192,27 @@ func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { // 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 *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { +func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { +func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall { 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 *LiasettingsGetCall) Header() http.Header { +func (c *AccounttaxListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24375,7 +16220,7 @@ func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24384,17 +16229,17 @@ func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.get" call. +// Do executes the "content.accounttax.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LiaSettings.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 *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { +// *AccounttaxListResponse.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 *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24413,7 +16258,7 @@ func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiaSettings{ + ret := &AccounttaxListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24426,73 +16271,88 @@ func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, err return ret, nil } -type LiasettingsGetaccessiblegmbaccountsCall struct { - s *APIService - merchantId uint64 - accountId uint64 - 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 *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) 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) + } } -// Getaccessiblegmbaccounts: Retrieves the list of accessible Business -// Profiles. +type AccounttaxUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + accounttax *AccountTax + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the tax settings of the account. Any fields that are not +// provided are deleted from the resource. // -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. +// - accountId: The ID of the account for which to get/update account tax +// settings. // - merchantId: The ID of the managing account. If this parameter is not the // same as accountId, then this account must be a multi-client account and // `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { - c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall { + c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId c.accountId = accountId + c.accounttax = accounttax 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 *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { +func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall { 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 *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { +func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall { 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 *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { +func (c *AccounttaxUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsGetaccessiblegmbaccountsCall) 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 *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -24504,13 +16364,12 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. +// Do executes the "content.accounttax.update" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsGetAccessibleGmbAccountsResponse.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 *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { +// *AccountTax.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 *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24529,7 +16388,7 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsGetAccessibleGmbAccountsResponse{ + ret := &AccountTax{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24542,99 +16401,80 @@ func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOptio return ret, nil } -type LiasettingsListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type CollectionsCreateCall struct { + s *APIService + merchantId int64 + collection *Collection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the LIA settings of the sub-accounts in your Merchant Center -// account. +// Create: Uploads a collection to your Merchant Center account. If a +// collection with the same collectionId already exists, this method updates +// that entry. In each update, the collection is completely replaced by the +// fields in the body of the update request. // -// - merchantId: The ID of the managing account. This must be a multi-client -// account. -func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { - c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Create(merchantId int64, collection *Collection) *CollectionsCreateCall { + c := &CollectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// LIA settings to return in the response, used for paging. -func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.collection = collection 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 *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { +func (c *CollectionsCreateCall) Fields(s ...googleapi.Field) *CollectionsCreateCall { 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 *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { +func (c *CollectionsCreateCall) Context(ctx context.Context) *CollectionsCreateCall { 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 *LiasettingsListCall) Header() http.Header { +func (c *CollectionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsListCall) 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 *CollectionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.collection) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.list" call. +// Do executes the "content.collections.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsListResponse.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 *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { +// *Collection.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 *CollectionsCreateCall) Do(opts ...googleapi.CallOption) (*Collection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24653,7 +16493,7 @@ func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsList if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsListResponse{ + ret := &Collection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24666,203 +16506,165 @@ func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsList 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 *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) 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 LiasettingsListposdataprovidersCall struct { +type CollectionsDeleteCall struct { s *APIService + merchantId int64 + collectionId string urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Listposdataproviders: Retrieves the list of POS data providers that have -// active settings for the all eiligible countries. -func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { - c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Delete: Deletes a collection from your Merchant Center account. +// +// - collectionId: The collectionId of the collection. CollectionId is the same +// as the REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Delete(merchantId int64, collectionId string) *CollectionsDeleteCall { + c := &CollectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.collectionId = collectionId 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 *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { +func (c *CollectionsDeleteCall) Fields(s ...googleapi.Field) *CollectionsDeleteCall { 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 *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { +func (c *CollectionsDeleteCall) Context(ctx context.Context) *CollectionsDeleteCall { 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 *LiasettingsListposdataprovidersCall) Header() http.Header { +func (c *CollectionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.listposdataproviders" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiasettingsListPosDataProvidersResponse.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 *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { +// Do executes the "content.collections.delete" call. +func (c *CollectionsDeleteCall) Do(opts ...googleapi.CallOption) 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 + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &LiasettingsListPosDataProvidersResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type LiasettingsRequestgmbaccessCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CollectionsGetCall struct { + s *APIService + merchantId int64 + collectionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Requestgmbaccess: Requests access to a specified Business Profile. +// Get: Retrieves a collection from your Merchant Center account. // -// - accountId: The ID of the account for which Business Profile access is -// requested. -// - gmbEmail: The email of the Business Profile. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { - c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - collectionId: The REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) Get(merchantId int64, collectionId string) *CollectionsGetCall { + c := &CollectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("gmbEmail", gmbEmail) + c.collectionId = collectionId 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 *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { +func (c *CollectionsGetCall) Fields(s ...googleapi.Field) *CollectionsGetCall { 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 *CollectionsGetCall) IfNoneMatch(entityTag string) *CollectionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { +func (c *CollectionsGetCall) Context(ctx context.Context) *CollectionsGetCall { 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 *LiasettingsRequestgmbaccessCall) Header() http.Header { +func (c *CollectionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections/{collectionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.requestgmbaccess" call. +// Do executes the "content.collections.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsRequestGmbAccessResponse.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 *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) { +// *Collection.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 *CollectionsGetCall) Do(opts ...googleapi.CallOption) (*Collection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24881,7 +16683,7 @@ func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*Lia if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsRequestGmbAccessResponse{ + ret := &Collection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24894,83 +16696,102 @@ func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*Lia return ret, nil } -type LiasettingsRequestinventoryverificationCall struct { - s *APIService - merchantId uint64 - accountId uint64 - country string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CollectionsListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Requestinventoryverification: Requests inventory validation for the -// specified country. +// List: Lists the collections in your Merchant Center account. The response +// might contain fewer items than specified by page_size. Rely on +// next_page_token to determine if there are more items to be requested. // -// - accountId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - country: The country for which inventory validation is requested. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { - c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionsService) List(merchantId int64) *CollectionsListCall { + c := &CollectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.country = country + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// collections to return in the response, used for paging. Defaults to 50; +// values above 1000 will be coerced to 1000. +func (c *CollectionsListCall) PageSize(pageSize int64) *CollectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Token (if provided) to +// retrieve the subsequent page. All other parameters must match the original +// call that provided the page token. +func (c *CollectionsListCall) PageToken(pageToken string) *CollectionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { +func (c *CollectionsListCall) Fields(s ...googleapi.Field) *CollectionsListCall { 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 *CollectionsListCall) IfNoneMatch(entityTag string) *CollectionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { +func (c *CollectionsListCall) Context(ctx context.Context) *CollectionsListCall { 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 *LiasettingsRequestinventoryverificationCall) Header() http.Header { +func (c *CollectionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), - "country": c.country, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.requestinventoryverification" call. +// Do executes the "content.collections.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *ListCollectionsResponse.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 *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { +func (c *CollectionsListCall) Do(opts ...googleapi.CallOption) (*ListCollectionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24989,7 +16810,7 @@ func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsRequestInventoryVerificationResponse{ + ret := &ListCollectionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25002,87 +16823,110 @@ func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallO return ret, nil } -type LiasettingsSetinventoryverificationcontactCall struct { - s *APIService - merchantId uint64 - accountId uint64 - 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 *CollectionsListCall) Pages(ctx context.Context, f func(*ListCollectionsResponse) 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) + } } -// Setinventoryverificationcontact: Sets the inventory verification contract -// for the specified country. +type CollectionstatusesGetCall struct { + s *APIService + merchantId int64 + collectionId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the status of a collection from your Merchant Center account. // -// - accountId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - contactEmail: The email of the inventory verification contact. -// - contactName: The name of the inventory verification contact. -// - country: The country for which inventory verification is requested. -// - language: The language for which inventory verification is requested. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, country string, language string, contactName string, contactEmail string) *LiasettingsSetinventoryverificationcontactCall { - c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - collectionId: The collectionId of the collection. CollectionId is the same +// as the REST ID of the collection. +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionstatusesService) Get(merchantId int64, collectionId string) *CollectionstatusesGetCall { + c := &CollectionstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("country", country) - c.urlParams_.Set("language", language) - c.urlParams_.Set("contactName", contactName) - c.urlParams_.Set("contactEmail", contactEmail) + c.collectionId = collectionId 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 *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { +func (c *CollectionstatusesGetCall) Fields(s ...googleapi.Field) *CollectionstatusesGetCall { 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 *CollectionstatusesGetCall) IfNoneMatch(entityTag string) *CollectionstatusesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { +func (c *CollectionstatusesGetCall) Context(ctx context.Context) *CollectionstatusesGetCall { 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 *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { +func (c *CollectionstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionstatusesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses/{collectionId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "collectionId": c.collectionId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setinventoryverificationcontact" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiasettingsSetInventoryVerificationContactResponse.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 *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { +// Do executes the "content.collectionstatuses.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *CollectionStatus.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 *CollectionstatusesGetCall) Do(opts ...googleapi.CallOption) (*CollectionStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25101,7 +16945,7 @@ func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsSetInventoryVerificationContactResponse{ + ret := &CollectionStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25114,107 +16958,100 @@ func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.Ca return ret, nil } -type LiasettingsSetomnichannelexperienceCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CollectionstatusesListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Setomnichannelexperience: Sets the omnichannel experience for the specified -// country. Only supported for merchants whose POS data provider is trusted to -// enable the corresponding experience. For more context, see these help -// articles about LFP (https://support.google.com/merchants/answer/7676652) and -// how to get started (https://support.google.com/merchants/answer/7676578) -// with it. +// List: Lists the statuses of the collections in your Merchant Center account. // -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setomnichannelexperience(merchantId uint64, accountId uint64) *LiasettingsSetomnichannelexperienceCall { - c := &LiasettingsSetomnichannelexperienceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the collection. This +// account cannot be a multi-client account. +func (r *CollectionstatusesService) List(merchantId int64) *CollectionstatusesListCall { + c := &CollectionstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - return c -} - -// Country sets the optional parameter "country": The CLDR country code (for -// example, "US") for which the omnichannel experience is selected. -func (c *LiasettingsSetomnichannelexperienceCall) Country(country string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.Set("country", country) return c } -// LsfType sets the optional parameter "lsfType": The Local Store Front (LSF) -// type for this country. Acceptable values are: - "ghlsf" (Google-Hosted -// Local Store Front) - "mhlsfBasic" (Merchant-Hosted Local Store Front -// Basic) - "mhlsfFull" (Merchant-Hosted Local Store Front Full) More details -// about these types can be found here. -func (c *LiasettingsSetomnichannelexperienceCall) LsfType(lsfType string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.Set("lsfType", lsfType) +// PageSize sets the optional parameter "pageSize": The maximum number of +// collection statuses to return in the response, used for paging. Defaults to +// 50; values above 1000 will be coerced to 1000. +func (c *CollectionstatusesListCall) PageSize(pageSize int64) *CollectionstatusesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PickupTypes sets the optional parameter "pickupTypes": The Pickup types for -// this country. Acceptable values are: - "pickupToday" - "pickupLater" -func (c *LiasettingsSetomnichannelexperienceCall) PickupTypes(pickupTypes ...string) *LiasettingsSetomnichannelexperienceCall { - c.urlParams_.SetMulti("pickupTypes", append([]string{}, pickupTypes...)) +// PageToken sets the optional parameter "pageToken": Token (if provided) to +// retrieve the subsequent page. All other parameters must match the original +// call that provided the page token. +func (c *CollectionstatusesListCall) PageToken(pageToken string) *CollectionstatusesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LiasettingsSetomnichannelexperienceCall) Fields(s ...googleapi.Field) *LiasettingsSetomnichannelexperienceCall { +func (c *CollectionstatusesListCall) Fields(s ...googleapi.Field) *CollectionstatusesListCall { 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 *CollectionstatusesListCall) IfNoneMatch(entityTag string) *CollectionstatusesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetomnichannelexperienceCall) Context(ctx context.Context) *LiasettingsSetomnichannelexperienceCall { +func (c *CollectionstatusesListCall) Context(ctx context.Context) *CollectionstatusesListCall { 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 *LiasettingsSetomnichannelexperienceCall) Header() http.Header { +func (c *CollectionstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetomnichannelexperienceCall) doRequest(alt string) (*http.Response, error) { +func (c *CollectionstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setomnichannelexperience") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/collectionstatuses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setomnichannelexperience" call. +// Do executes the "content.collectionstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LiaOmnichannelExperience.ServerResponse.Header or (if a response was +// *ListCollectionStatusesResponse.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 *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOption) (*LiaOmnichannelExperience, error) { +func (c *CollectionstatusesListCall) Do(opts ...googleapi.CallOption) (*ListCollectionStatusesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25233,7 +17070,7 @@ func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiaOmnichannelExperience{ + ret := &ListCollectionStatusesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25246,74 +17083,79 @@ func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOptio return ret, nil } -type LiasettingsSetposdataproviderCall struct { - s *APIService - merchantId uint64 - accountId uint64 - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Setposdataprovider: Sets the POS data provider for the specified country. -// -// - accountId: The ID of the account for which to retrieve accessible Business -// Profiles. -// - country: The country for which the POS data provider is selected. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { - c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.accountId = accountId - c.urlParams_.Set("country", country) - return c +// 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 *CollectionstatusesListCall) Pages(ctx context.Context, f func(*ListCollectionStatusesResponse) 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) + } } -// PosDataProviderId sets the optional parameter "posDataProviderId": The ID of -// POS data provider. -func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { - c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) - return c +type ConversionsourcesCreateCall struct { + s *APIService + merchantId int64 + conversionsource *ConversionSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PosExternalAccountId sets the optional parameter "posExternalAccountId": The -// account ID by which this merchant is known to the POS data provider. -func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { - c.urlParams_.Set("posExternalAccountId", posExternalAccountId) +// Create: Creates a new conversion source. +// +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Create(merchantId int64, conversionsource *ConversionSource) *ConversionsourcesCreateCall { + c := &ConversionsourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionsource = conversionsource 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 *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { +func (c *ConversionsourcesCreateCall) Fields(s ...googleapi.Field) *ConversionsourcesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { +func (c *ConversionsourcesCreateCall) Context(ctx context.Context) *ConversionsourcesCreateCall { 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 *LiasettingsSetposdataproviderCall) Header() http.Header { +func (c *ConversionsourcesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ConversionsourcesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsource) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25321,19 +17163,18 @@ func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.setposdataprovider" call. +// Do executes the "content.conversionsources.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LiasettingsSetPosDataProviderResponse.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 *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) { +// *ConversionSource.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 *ConversionsourcesCreateCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25352,7 +17193,7 @@ func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*L if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LiasettingsSetPosDataProviderResponse{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25365,179 +17206,165 @@ func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*L return ret, nil } -type LiasettingsUpdateCall struct { - s *APIService - merchantId uint64 - accountId uint64 - liasettings *LiaSettings - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesDeleteCall struct { + s *APIService + merchantId int64 + conversionSourceId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the LIA settings of the account. Any fields that are not -// provided are deleted from the resource. +// Delete: Archives an existing conversion source. It will be recoverable for +// 30 days. This archiving behavior is not typical in the Content API and +// unique to this service. // -// - accountId: The ID of the account for which to get or update LIA settings. -// - merchantId: The ID of the managing account. If this parameter is not the -// same as accountId, then this account must be a multi-client account and -// `accountId` must be the ID of a sub-account of this account. -func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { - c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - conversionSourceId: The ID of the conversion source to be deleted. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Delete(merchantId int64, conversionSourceId string) *ConversionsourcesDeleteCall { + c := &ConversionsourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.accountId = accountId - c.liasettings = liasettings + c.conversionSourceId = conversionSourceId 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 *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { +func (c *ConversionsourcesDeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { +func (c *ConversionsourcesDeleteCall) Context(ctx context.Context) *ConversionsourcesDeleteCall { 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 *LiasettingsUpdateCall) Header() http.Header { +func (c *ConversionsourcesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ConversionsourcesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "accountId": strconv.FormatUint(c.accountId, 10), + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.liasettings.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiaSettings.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 *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { +// Do executes the "content.conversionsources.delete" call. +func (c *ConversionsourcesDeleteCall) Do(opts ...googleapi.CallOption) 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 + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &LiaSettings{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type LocalinventoryCustombatchCall struct { - s *APIService - localinventorycustombatchrequest *LocalinventoryCustomBatchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesGetCall struct { + s *APIService + merchantId int64 + conversionSourceId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Custombatch: Updates local inventory for multiple products or stores in a -// single request. -func (r *LocalinventoryService) Custombatch(localinventorycustombatchrequest *LocalinventoryCustomBatchRequest) *LocalinventoryCustombatchCall { - c := &LocalinventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.localinventorycustombatchrequest = localinventorycustombatchrequest +// Get: Fetches a conversion source. +// +// - conversionSourceId: The REST ID of the collection. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Get(merchantId int64, conversionSourceId string) *ConversionsourcesGetCall { + c := &ConversionsourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionSourceId = conversionSourceId 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 *LocalinventoryCustombatchCall) Fields(s ...googleapi.Field) *LocalinventoryCustombatchCall { +func (c *ConversionsourcesGetCall) Fields(s ...googleapi.Field) *ConversionsourcesGetCall { 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 *ConversionsourcesGetCall) IfNoneMatch(entityTag string) *ConversionsourcesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocalinventoryCustombatchCall) Context(ctx context.Context) *LocalinventoryCustombatchCall { +func (c *ConversionsourcesGetCall) Context(ctx context.Context) *ConversionsourcesGetCall { 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 *LocalinventoryCustombatchCall) Header() http.Header { +func (c *ConversionsourcesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocalinventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.localinventorycustombatchrequest) - if err != nil { - return nil, err +func (c *ConversionsourcesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "localinventory/batch") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.localinventory.custombatch" call. +// Do executes the "content.conversionsources.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LocalinventoryCustomBatchResponse.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 *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*LocalinventoryCustomBatchResponse, error) { +// *ConversionSource.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 *ConversionsourcesGetCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25556,7 +17383,7 @@ func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*Local if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LocalinventoryCustomBatchResponse{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25569,82 +17396,106 @@ func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*Local return ret, nil } -type LocalinventoryInsertCall struct { - s *APIService - merchantId uint64 - productId string - localinventory *LocalInventory - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesListCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Updates the local inventory of a product in your Merchant Center -// account. +// List: Retrieves the list of conversion sources the caller has access to. // -// - merchantId: The ID of the account that contains the product. This account -// cannot be a multi-client account. -// - productId: The REST ID of the product for which to update local inventory. -func (r *LocalinventoryService) Insert(merchantId uint64, productId string, localinventory *LocalInventory) *LocalinventoryInsertCall { - c := &LocalinventoryInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) List(merchantId int64) *ConversionsourcesListCall { + c := &ConversionsourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId - c.localinventory = localinventory + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// conversion sources to return in a page. If no `page_size` is specified, +// `100` is used as the default value. The maximum value is `200`. Values above +// `200` will be coerced to `200`. Regardless of pagination, at most `200` +// conversion sources are returned in total. +func (c *ConversionsourcesListCall) PageSize(pageSize int64) *ConversionsourcesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token. +func (c *ConversionsourcesListCall) PageToken(pageToken string) *ConversionsourcesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ShowDeleted sets the optional parameter "showDeleted": If true, also returns +// archived conversion sources. +func (c *ConversionsourcesListCall) ShowDeleted(showDeleted bool) *ConversionsourcesListCall { + c.urlParams_.Set("showDeleted", fmt.Sprint(showDeleted)) 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 *LocalinventoryInsertCall) Fields(s ...googleapi.Field) *LocalinventoryInsertCall { +func (c *ConversionsourcesListCall) Fields(s ...googleapi.Field) *ConversionsourcesListCall { 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 *ConversionsourcesListCall) IfNoneMatch(entityTag string) *ConversionsourcesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocalinventoryInsertCall) Context(ctx context.Context) *LocalinventoryInsertCall { +func (c *ConversionsourcesListCall) Context(ctx context.Context) *ConversionsourcesListCall { 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 *LocalinventoryInsertCall) Header() http.Header { +func (c *ConversionsourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocalinventoryInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.localinventory) - if err != nil { - return nil, err +func (c *ConversionsourcesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}/localinventory") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "productId": c.productId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.localinventory.insert" call. +// Do executes the "content.conversionsources.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LocalInventory.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 *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInventory, error) { +// *ListConversionSourcesResponse.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 *ConversionsourcesListCall) Do(opts ...googleapi.CallOption) (*ListConversionSourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25663,7 +17514,7 @@ func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInven if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LocalInventory{ + ret := &ListConversionSourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25676,96 +17527,109 @@ func (c *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInven return ret, nil } -type MerchantsupportRenderaccountissuesCall struct { - s *APIService - merchantId int64 - renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload - 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 *ConversionsourcesListCall) Pages(ctx context.Context, f func(*ListConversionSourcesResponse) 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) + } } -// Renderaccountissues: Provide a list of merchant's issues with a support -// content and available actions. This content and actions are meant to be -// rendered and shown in third-party applications. -// -// - merchantId: The ID of the account to fetch issues for. -func (r *MerchantsupportService) Renderaccountissues(merchantId int64, renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload) *MerchantsupportRenderaccountissuesCall { - c := &MerchantsupportRenderaccountissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.renderaccountissuesrequestpayload = renderaccountissuesrequestpayload - return c +type ConversionsourcesPatchCall struct { + s *APIService + merchantId int64 + conversionSourceId string + conversionsource *ConversionSource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 -// (https://tools.ietf.org/html/bcp47) language code used to localize support -// content. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportRenderaccountissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderaccountissuesCall { - c.urlParams_.Set("languageCode", languageCode) +// Patch: Updates information of an existing conversion source. +// +// - conversionSourceId: The ID of the conversion source to be updated. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Patch(merchantId int64, conversionSourceId string, conversionsource *ConversionSource) *ConversionsourcesPatchCall { + c := &ConversionsourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.conversionSourceId = conversionSourceId + c.conversionsource = conversionsource return c } -// TimeZone sets the optional parameter "timeZone": The IANA -// (https://www.iana.org/time-zones) timezone used to localize times in support -// content. For example 'America/Los_Angeles'. If not set, results will use as -// a default UTC. -func (c *MerchantsupportRenderaccountissuesCall) TimeZone(timeZone string) *MerchantsupportRenderaccountissuesCall { - c.urlParams_.Set("timeZone", timeZone) +// UpdateMask sets the optional parameter "updateMask": Required. List of +// fields being updated. +func (c *ConversionsourcesPatchCall) UpdateMask(updateMask string) *ConversionsourcesPatchCall { + 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 *MerchantsupportRenderaccountissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderaccountissuesCall { +func (c *ConversionsourcesPatchCall) Fields(s ...googleapi.Field) *ConversionsourcesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportRenderaccountissuesCall) Context(ctx context.Context) *MerchantsupportRenderaccountissuesCall { +func (c *ConversionsourcesPatchCall) Context(ctx context.Context) *ConversionsourcesPatchCall { 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 *MerchantsupportRenderaccountissuesCall) Header() http.Header { +func (c *ConversionsourcesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportRenderaccountissuesCall) doRequest(alt string) (*http.Response, error) { +func (c *ConversionsourcesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.renderaccountissuesrequestpayload) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsource) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderaccountissues") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.renderaccountissues" call. +// Do executes the "content.conversionsources.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *RenderAccountIssuesResponse.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 *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption) (*RenderAccountIssuesResponse, error) { +// *ConversionSource.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 *ConversionsourcesPatchCall) Do(opts ...googleapi.CallOption) (*ConversionSource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25784,7 +17648,7 @@ func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RenderAccountIssuesResponse{ + ret := &ConversionSource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25797,82 +17661,61 @@ func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption return ret, nil } -type MerchantsupportRenderproductissuesCall struct { - s *APIService - merchantId int64 - productId string - renderproductissuesrequestpayload *RenderProductIssuesRequestPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ConversionsourcesUndeleteCall struct { + s *APIService + merchantId int64 + conversionSourceId string + undeleteconversionsourcerequest *UndeleteConversionSourceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Renderproductissues: Provide a list of issues for merchant's product with a -// support content and available actions. This content and actions are meant to -// be rendered and shown in third-party applications. +// Undelete: Re-enables an archived conversion source. // -// - merchantId: The ID of the account that contains the product. -// - productId: The REST_ID -// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) -// of the product to fetch issues for. -func (r *MerchantsupportService) Renderproductissues(merchantId int64, productId string, renderproductissuesrequestpayload *RenderProductIssuesRequestPayload) *MerchantsupportRenderproductissuesCall { - c := &MerchantsupportRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - conversionSourceId: The ID of the conversion source to be undeleted. +// - merchantId: The ID of the account that owns the new conversion source. +func (r *ConversionsourcesService) Undelete(merchantId int64, conversionSourceId string, undeleteconversionsourcerequest *UndeleteConversionSourceRequest) *ConversionsourcesUndeleteCall { + c := &ConversionsourcesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.productId = productId - c.renderproductissuesrequestpayload = renderproductissuesrequestpayload - return c -} - -// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 -// (https://tools.ietf.org/html/bcp47) language code used to localize support -// content. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportRenderproductissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderproductissuesCall { - c.urlParams_.Set("languageCode", languageCode) - return c -} - -// TimeZone sets the optional parameter "timeZone": The IANA -// (https://www.iana.org/time-zones) timezone used to localize times in support -// content. For example 'America/Los_Angeles'. If not set, results will use as -// a default UTC. -func (c *MerchantsupportRenderproductissuesCall) TimeZone(timeZone string) *MerchantsupportRenderproductissuesCall { - c.urlParams_.Set("timeZone", timeZone) + c.conversionSourceId = conversionSourceId + c.undeleteconversionsourcerequest = undeleteconversionsourcerequest 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 *MerchantsupportRenderproductissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderproductissuesCall { +func (c *ConversionsourcesUndeleteCall) Fields(s ...googleapi.Field) *ConversionsourcesUndeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportRenderproductissuesCall) Context(ctx context.Context) *MerchantsupportRenderproductissuesCall { +func (c *ConversionsourcesUndeleteCall) Context(ctx context.Context) *ConversionsourcesUndeleteCall { 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 *MerchantsupportRenderproductissuesCall) Header() http.Header { +func (c *ConversionsourcesUndeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Response, error) { +func (c *ConversionsourcesUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.renderproductissuesrequestpayload) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeleteconversionsourcerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderproductissues/{productId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/conversionsources/{conversionSourceId}:undelete") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25880,136 +17723,109 @@ func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "productId": c.productId, + "merchantId": strconv.FormatInt(c.merchantId, 10), + "conversionSourceId": c.conversionSourceId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.renderproductissues" call. -// Any non-2xx status code is an error. Response headers are in either -// *RenderProductIssuesResponse.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 *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption) (*RenderProductIssuesResponse, error) { +// Do executes the "content.conversionsources.undelete" call. +func (c *ConversionsourcesUndeleteCall) Do(opts ...googleapi.CallOption) 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 + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &RenderProductIssuesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type MerchantsupportTriggeractionCall struct { - s *APIService - merchantId int64 - triggeractionpayload *TriggerActionPayload - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CssesGetCall struct { + s *APIService + cssGroupId int64 + cssDomainId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Triggeraction: Start an action. The action can be requested by merchants in -// third-party application. Before merchants can request the action, the -// third-party application needs to show them action specific content and -// display a user input form. The action can be successfully started only once -// all `required` inputs are provided. If any `required` input is missing, or -// invalid value was provided, the service will return 400 error. Validation -// errors will contain Ids for all problematic field together with translated, -// human readable error messages that can be shown to the user. +// Get: Retrieves a single CSS domain by ID. // -// - merchantId: The ID of the merchant's account. -func (r *MerchantsupportService) Triggeraction(merchantId int64, triggeractionpayload *TriggerActionPayload) *MerchantsupportTriggeractionCall { - c := &MerchantsupportTriggeractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.triggeractionpayload = triggeractionpayload - return c -} - -// LanguageCode sets the optional parameter "languageCode": Language code IETF -// BCP 47 syntax (https://tools.ietf.org/html/bcp47) used to localize the -// response. If not set, the result will be in default language `en-US`. -func (c *MerchantsupportTriggeractionCall) LanguageCode(languageCode string) *MerchantsupportTriggeractionCall { - c.urlParams_.Set("languageCode", languageCode) +// - cssDomainId: The ID of the CSS domain to return. +// - cssGroupId: The ID of the managing account. If this parameter is not the +// same as cssDomainId (#cssDomainId), then this ID must be a CSS group ID +// and `cssDomainId` must be the ID of a CSS domain affiliated with this +// group. +func (r *CssesService) Get(cssGroupId int64, cssDomainId int64) *CssesGetCall { + c := &CssesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId + c.cssDomainId = cssDomainId 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 *MerchantsupportTriggeractionCall) Fields(s ...googleapi.Field) *MerchantsupportTriggeractionCall { +func (c *CssesGetCall) Fields(s ...googleapi.Field) *CssesGetCall { 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 *CssesGetCall) IfNoneMatch(entityTag string) *CssesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *MerchantsupportTriggeractionCall) Context(ctx context.Context) *MerchantsupportTriggeractionCall { +func (c *CssesGetCall) Context(ctx context.Context) *CssesGetCall { 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 *MerchantsupportTriggeractionCall) Header() http.Header { +func (c *CssesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MerchantsupportTriggeractionCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.triggeractionpayload) - if err != nil { - return nil, err +func (c *CssesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/triggeraction") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatInt(c.merchantId, 10), + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.merchantsupport.triggeraction" call. +// Do executes the "content.csses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *TriggerActionResponse.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 *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*TriggerActionResponse, error) { +// *Css.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 *CssesGetCall) Do(opts ...googleapi.CallOption) (*Css, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26028,7 +17844,7 @@ func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*Tr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TriggerActionResponse{ + ret := &Css{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26041,83 +17857,101 @@ func (c *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*Tr return ret, nil } -type OrderinvoicesCreatechargeinvoiceCall struct { - s *APIService - merchantId uint64 - orderId string - orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type CssesListCall struct { + s *APIService + cssGroupId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists CSS domains affiliated with a CSS group. +// +// - cssGroupId: The CSS group ID of CSS domains to be listed. +func (r *CssesService) List(cssGroupId int64) *CssesListCall { + c := &CssesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of CSS +// domains to return. The service may return fewer than this value. If +// unspecified, at most 50 CSS domains will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *CssesListCall) PageSize(pageSize int64) *CssesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Createchargeinvoice: Creates a charge invoice for a shipment group, and -// triggers a charge capture for orderinvoice enabled orders. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrderinvoicesService) Createchargeinvoice(merchantId uint64, orderId string, orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest) *OrderinvoicesCreatechargeinvoiceCall { - c := &OrderinvoicesCreatechargeinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.orderinvoicescreatechargeinvoicerequest = orderinvoicescreatechargeinvoicerequest +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListCsses` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to `ListCsses` must +// match the call that provided the page token. +func (c *CssesListCall) PageToken(pageToken string) *CssesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrderinvoicesCreatechargeinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreatechargeinvoiceCall { +func (c *CssesListCall) Fields(s ...googleapi.Field) *CssesListCall { 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 *CssesListCall) IfNoneMatch(entityTag string) *CssesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrderinvoicesCreatechargeinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreatechargeinvoiceCall { +func (c *CssesListCall) Context(ctx context.Context) *CssesListCall { 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 *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header { +func (c *CssesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderinvoicesCreatechargeinvoiceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreatechargeinvoicerequest) - if err != nil { - return nil, err +func (c *CssesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createChargeInvoice") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderinvoices.createchargeinvoice" call. +// Do executes the "content.csses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderinvoicesCreateChargeInvoiceResponse.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 *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateChargeInvoiceResponse, error) { +// *ListCssesResponse.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 *CssesListCall) Do(opts ...googleapi.CallOption) (*ListCssesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26136,7 +17970,7 @@ func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderinvoicesCreateChargeInvoiceResponse{ + ret := &ListCssesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26149,66 +17983,83 @@ func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) return ret, nil } -type OrderinvoicesCreaterefundinvoiceCall struct { - s *APIService - merchantId uint64 - orderId string - orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest - 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 *CssesListCall) Pages(ctx context.Context, f func(*ListCssesResponse) 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 CssesUpdatelabelsCall struct { + s *APIService + cssGroupId int64 + cssDomainId int64 + labelids *LabelIds + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Createrefundinvoice: Creates a refund invoice for one or more shipment -// groups, and triggers a refund for orderinvoice enabled orders. This can only -// be used for line items that have previously been charged using -// `createChargeInvoice`. All amounts (except for the summary) are incremental -// with respect to the previous invoice. +// Updatelabels: Updates labels that are assigned to a CSS domain by its CSS +// group. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrderinvoicesService) Createrefundinvoice(merchantId uint64, orderId string, orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest) *OrderinvoicesCreaterefundinvoiceCall { - c := &OrderinvoicesCreaterefundinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.orderinvoicescreaterefundinvoicerequest = orderinvoicescreaterefundinvoicerequest +// - cssDomainId: The ID of the updated CSS domain. +// - cssGroupId: The CSS group ID of the updated CSS domain. +func (r *CssesService) Updatelabels(cssGroupId int64, cssDomainId int64, labelids *LabelIds) *CssesUpdatelabelsCall { + c := &CssesUpdatelabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cssGroupId = cssGroupId + c.cssDomainId = cssDomainId + c.labelids = labelids 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 *OrderinvoicesCreaterefundinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreaterefundinvoiceCall { +func (c *CssesUpdatelabelsCall) Fields(s ...googleapi.Field) *CssesUpdatelabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrderinvoicesCreaterefundinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreaterefundinvoiceCall { +func (c *CssesUpdatelabelsCall) Context(ctx context.Context) *CssesUpdatelabelsCall { 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 *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header { +func (c *CssesUpdatelabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Response, error) { +func (c *CssesUpdatelabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreaterefundinvoicerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.labelids) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createRefundInvoice") + urls := googleapi.ResolveRelative(c.s.BasePath, "{cssGroupId}/csses/{cssDomainId}/updatelabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26216,19 +18067,18 @@ func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "cssGroupId": strconv.FormatInt(c.cssGroupId, 10), + "cssDomainId": strconv.FormatInt(c.cssDomainId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderinvoices.createrefundinvoice" call. +// Do executes the "content.csses.updatelabels" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderinvoicesCreateRefundInvoiceResponse.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 *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateRefundInvoiceResponse, error) { +// *Css.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 *CssesUpdatelabelsCall) Do(opts ...googleapi.CallOption) (*Css, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26247,7 +18097,7 @@ func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderinvoicesCreateRefundInvoiceResponse{ + ret := &Css{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26260,114 +18110,71 @@ func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) return ret, nil } -type OrderreportsListdisbursementsCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Listdisbursements: Retrieves a report for disbursements from your Merchant -// Center account. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrderreportsService) Listdisbursements(merchantId uint64) *OrderreportsListdisbursementsCall { - c := &OrderreportsListdisbursementsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - return c -} - -// DisbursementEndDate sets the optional parameter "disbursementEndDate": The -// last date which disbursements occurred. In ISO 8601 format. Default: current -// date. -func (c *OrderreportsListdisbursementsCall) DisbursementEndDate(disbursementEndDate string) *OrderreportsListdisbursementsCall { - c.urlParams_.Set("disbursementEndDate", disbursementEndDate) - return c -} - -// DisbursementStartDate sets the optional parameter "disbursementStartDate": -// The first date which disbursements occurred. In ISO 8601 format. -func (c *OrderreportsListdisbursementsCall) DisbursementStartDate(disbursementStartDate string) *OrderreportsListdisbursementsCall { - c.urlParams_.Set("disbursementStartDate", disbursementStartDate) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// disbursements to return in the response, used for paging. -func (c *OrderreportsListdisbursementsCall) MaxResults(maxResults int64) *OrderreportsListdisbursementsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c +type DatafeedsCustombatchCall struct { + s *APIService + datafeedscustombatchrequest *DatafeedsCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *OrderreportsListdisbursementsCall) PageToken(pageToken string) *OrderreportsListdisbursementsCall { - c.urlParams_.Set("pageToken", pageToken) +// Custombatch: Deletes, fetches, gets, inserts and updates multiple datafeeds +// in a single request. +func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall { + c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.datafeedscustombatchrequest = datafeedscustombatchrequest 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 *OrderreportsListdisbursementsCall) Fields(s ...googleapi.Field) *OrderreportsListdisbursementsCall { +func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall { 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 *OrderreportsListdisbursementsCall) IfNoneMatch(entityTag string) *OrderreportsListdisbursementsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrderreportsListdisbursementsCall) Context(ctx context.Context) *OrderreportsListdisbursementsCall { +func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall { 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 *OrderreportsListdisbursementsCall) Header() http.Header { +func (c *DatafeedsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreportsListdisbursementsCall) 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 *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements") + urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreports.listdisbursements" call. +// Do executes the "content.datafeeds.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderreportsListDisbursementsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *DatafeedsCustomBatchResponse.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 *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListDisbursementsResponse, error) { +func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26386,7 +18193,7 @@ func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreportsListDisbursementsResponse{ + ret := &DatafeedsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26399,248 +18206,137 @@ func (c *OrderreportsListdisbursementsCall) Do(opts ...googleapi.CallOption) (*O 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 *OrderreportsListdisbursementsCall) Pages(ctx context.Context, f func(*OrderreportsListDisbursementsResponse) 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 OrderreportsListtransactionsCall struct { - s *APIService - merchantId uint64 - disbursementId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatafeedsDeleteCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Listtransactions: Retrieves a list of transactions for a disbursement from -// your Merchant Center account. +// Delete: Deletes a datafeed configuration from your Merchant Center account. // -// - disbursementId: The Google-provided ID of the disbursement (found in -// Wallet). -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrderreportsService) Listtransactions(merchantId uint64, disbursementId string) *OrderreportsListtransactionsCall { - c := &OrderreportsListtransactionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall { + c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.disbursementId = disbursementId - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// disbursements to return in the response, used for paging. -func (c *OrderreportsListtransactionsCall) MaxResults(maxResults int64) *OrderreportsListtransactionsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *OrderreportsListtransactionsCall) PageToken(pageToken string) *OrderreportsListtransactionsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// TransactionEndDate sets the optional parameter "transactionEndDate": The -// last date in which transaction occurred. In ISO 8601 format. Default: -// current date. -func (c *OrderreportsListtransactionsCall) TransactionEndDate(transactionEndDate string) *OrderreportsListtransactionsCall { - c.urlParams_.Set("transactionEndDate", transactionEndDate) - return c -} - -// TransactionStartDate sets the optional parameter "transactionStartDate": The -// first date in which transaction occurred. In ISO 8601 format. -func (c *OrderreportsListtransactionsCall) TransactionStartDate(transactionStartDate string) *OrderreportsListtransactionsCall { - c.urlParams_.Set("transactionStartDate", transactionStartDate) + c.datafeedId = datafeedId 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 *OrderreportsListtransactionsCall) Fields(s ...googleapi.Field) *OrderreportsListtransactionsCall { +func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall { 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 *OrderreportsListtransactionsCall) IfNoneMatch(entityTag string) *OrderreportsListtransactionsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrderreportsListtransactionsCall) Context(ctx context.Context) *OrderreportsListtransactionsCall { +func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall { 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 *OrderreportsListtransactionsCall) Header() http.Header { +func (c *DatafeedsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreportsListtransactionsCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreports/disbursements/{disbursementId}/transactions") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "disbursementId": c.disbursementId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreports.listtransactions" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrderreportsListTransactionsResponse.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 *OrderreportsListtransactionsCall) Do(opts ...googleapi.CallOption) (*OrderreportsListTransactionsResponse, error) { +// Do executes the "content.datafeeds.delete" call. +func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) 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 + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OrderreportsListTransactionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - 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 *OrderreportsListtransactionsCall) Pages(ctx context.Context, f func(*OrderreportsListTransactionsResponse) 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) + return gensupport.WrapError(err) } + return nil } -type OrderreturnsAcknowledgeCall struct { - s *APIService - merchantId uint64 - returnId string - orderreturnsacknowledgerequest *OrderreturnsAcknowledgeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsFetchnowCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Acknowledge: Acks an order return in your Merchant Center account. +// Fetchnow: Invokes a fetch for the datafeed in your Merchant Center account. +// If you need to call this method more than once per day, we recommend you use +// the Products service +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products) +// to update your product data. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - returnId: The ID of the return. -func (r *OrderreturnsService) Acknowledge(merchantId uint64, returnId string, orderreturnsacknowledgerequest *OrderreturnsAcknowledgeRequest) *OrderreturnsAcknowledgeCall { - c := &OrderreturnsAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed to be fetched. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall { + c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnId = returnId - c.orderreturnsacknowledgerequest = orderreturnsacknowledgerequest + c.datafeedId = datafeedId 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 *OrderreturnsAcknowledgeCall) Fields(s ...googleapi.Field) *OrderreturnsAcknowledgeCall { +func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsAcknowledgeCall) Context(ctx context.Context) *OrderreturnsAcknowledgeCall { +func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall { 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 *OrderreturnsAcknowledgeCall) Header() http.Header { +func (c *DatafeedsFetchnowCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsAcknowledgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderreturnsacknowledgerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}/acknowledge") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26649,18 +18345,18 @@ func (c *OrderreturnsAcknowledgeCall) doRequest(alt string) (*http.Response, err req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnId": c.returnId, + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.acknowledge" call. +// Do executes the "content.datafeeds.fetchnow" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderreturnsAcknowledgeResponse.ServerResponse.Header or (if a response was +// *DatafeedsFetchNowResponse.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 *OrderreturnsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrderreturnsAcknowledgeResponse, error) { +func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26679,7 +18375,7 @@ func (c *OrderreturnsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*Orderre if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreturnsAcknowledgeResponse{ + ret := &DatafeedsFetchNowResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26692,78 +18388,87 @@ func (c *OrderreturnsAcknowledgeCall) Do(opts ...googleapi.CallOption) (*Orderre return ret, nil } -type OrderreturnsCreateorderreturnCall struct { - s *APIService - merchantId uint64 - orderreturnscreateorderreturnrequest *OrderreturnsCreateOrderReturnRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsGetCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Createorderreturn: Create return in your Merchant Center account. +// Get: Retrieves a datafeed configuration from your Merchant Center account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrderreturnsService) Createorderreturn(merchantId uint64, orderreturnscreateorderreturnrequest *OrderreturnsCreateOrderReturnRequest) *OrderreturnsCreateorderreturnCall { - c := &OrderreturnsCreateorderreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall { + c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderreturnscreateorderreturnrequest = orderreturnscreateorderreturnrequest + c.datafeedId = datafeedId 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 *OrderreturnsCreateorderreturnCall) Fields(s ...googleapi.Field) *OrderreturnsCreateorderreturnCall { +func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall { 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 *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsCreateorderreturnCall) Context(ctx context.Context) *OrderreturnsCreateorderreturnCall { +func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall { 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 *OrderreturnsCreateorderreturnCall) Header() http.Header { +func (c *DatafeedsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsCreateorderreturnCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderreturnscreateorderreturnrequest) - if err != nil { - return nil, err +func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/createOrderReturn") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.createorderreturn" call. +// Do executes the "content.datafeeds.get" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderreturnsCreateOrderReturnResponse.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 *OrderreturnsCreateorderreturnCall) Do(opts ...googleapi.CallOption) (*OrderreturnsCreateOrderReturnResponse, error) { +// *Datafeed.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 *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26782,7 +18487,7 @@ func (c *OrderreturnsCreateorderreturnCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreturnsCreateOrderReturnResponse{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26795,88 +18500,78 @@ func (c *OrderreturnsCreateorderreturnCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type OrderreturnsGetCall struct { - s *APIService - merchantId uint64 - returnId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type DatafeedsInsertCall struct { + s *APIService + merchantId uint64 + datafeed *Datafeed + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves an order return from your Merchant Center account. +// Insert: Registers a datafeed configuration with your Merchant Center +// account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - returnId: Merchant order return ID generated by Google. -func (r *OrderreturnsService) Get(merchantId uint64, returnId string) *OrderreturnsGetCall { - c := &OrderreturnsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall { + c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnId = returnId + c.datafeed = datafeed 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 *OrderreturnsGetCall) Fields(s ...googleapi.Field) *OrderreturnsGetCall { +func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall { 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 *OrderreturnsGetCall) IfNoneMatch(entityTag string) *OrderreturnsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsGetCall) Context(ctx context.Context) *OrderreturnsGetCall { +func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall { 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 *OrderreturnsGetCall) Header() http.Header { +func (c *DatafeedsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsGetCall) 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 *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnId": c.returnId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.get" call. +// Do executes the "content.datafeeds.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *MerchantOrderReturn.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 *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderReturn, error) { +// *Datafeed.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 *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26895,7 +18590,7 @@ func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderRe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &MerchantOrderReturn{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26908,7 +18603,7 @@ func (c *OrderreturnsGetCall) Do(opts ...googleapi.CallOption) (*MerchantOrderRe return ret, nil } -type OrderreturnsListCall struct { +type DatafeedsListCall struct { s *APIService merchantId uint64 urlParams_ gensupport.URLParams @@ -26917,147 +18612,35 @@ type OrderreturnsListCall struct { header_ http.Header } -// List: Lists order returns in your Merchant Center account. +// List: Lists the configurations for datafeeds in your Merchant Center +// account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrderreturnsService) List(merchantId uint64) *OrderreturnsListCall { - c := &OrderreturnsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeeds. This account +// cannot be a multi-client account. +func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall { + c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId return c } -// Acknowledged sets the optional parameter "acknowledged": Obtains order -// returns that match the acknowledgement status. When set to true, obtains -// order returns that have been acknowledged. When false, obtains order returns -// that have not been acknowledged. When not provided, obtains order returns -// regardless of their acknowledgement status. We recommend using this filter -// set to `false`, in conjunction with the `acknowledge` call, such that only -// un-acknowledged order returns are returned. -func (c *OrderreturnsListCall) Acknowledged(acknowledged bool) *OrderreturnsListCall { - c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) - return c -} - -// CreatedEndDate sets the optional parameter "createdEndDate": Obtains order -// returns created before this date (inclusively), in ISO 8601 format. -func (c *OrderreturnsListCall) CreatedEndDate(createdEndDate string) *OrderreturnsListCall { - c.urlParams_.Set("createdEndDate", createdEndDate) - return c -} - -// CreatedStartDate sets the optional parameter "createdStartDate": Obtains -// order returns created after this date (inclusively), in ISO 8601 format. -func (c *OrderreturnsListCall) CreatedStartDate(createdStartDate string) *OrderreturnsListCall { - c.urlParams_.Set("createdStartDate", createdStartDate) - return c -} - -// GoogleOrderIds sets the optional parameter "googleOrderIds": Obtains order -// returns with the specified order ids. If this parameter is provided, -// createdStartDate, createdEndDate, shipmentType, shipmentStatus, -// shipmentState and acknowledged parameters must be not set. Note: if -// googleOrderId and shipmentTrackingNumber parameters are provided, the -// obtained results will include all order returns that either match the -// specified order id or the specified tracking number. -func (c *OrderreturnsListCall) GoogleOrderIds(googleOrderIds ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("googleOrderIds", append([]string{}, googleOrderIds...)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum number of -// order returns to return in the response, used for paging. The default value -// is 25 returns per page, and the maximum allowed value is 250 returns per -// page. -func (c *OrderreturnsListCall) MaxResults(maxResults int64) *OrderreturnsListCall { +// products to return in the response, used for paging. +func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// OrderBy sets the optional parameter "orderBy": Return the results in the -// specified order. -// -// Possible values: -// -// "RETURN_CREATION_TIME_DESC" - Return results in descending order. -// "RETURN_CREATION_TIME_ASC" - Return results in ascending order. -func (c *OrderreturnsListCall) OrderBy(orderBy string) *OrderreturnsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageToken sets the optional parameter "pageToken": The token returned by the // previous request. -func (c *OrderreturnsListCall) PageToken(pageToken string) *OrderreturnsListCall { +func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ShipmentStates sets the optional parameter "shipmentStates": Obtains order -// returns that match any shipment state provided in this parameter. When this -// parameter is not provided, order returns are obtained regardless of their -// shipment states. -// -// Possible values: -// -// "NEW" - Return shipments with `new` state only. -// "SHIPPED" - Return shipments with `shipped` state only. -// "COMPLETED" - Return shipments with `completed` state only. -// "UNDELIVERABLE" - Return shipments with `undeliverable` state only. -// "PENDING" - Return shipments with `pending` state only. -func (c *OrderreturnsListCall) ShipmentStates(shipmentStates ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("shipmentStates", append([]string{}, shipmentStates...)) - return c -} - -// ShipmentStatus sets the optional parameter "shipmentStatus": Obtains order -// returns that match any shipment status provided in this parameter. When this -// parameter is not provided, order returns are obtained regardless of their -// shipment statuses. -// -// Possible values: -// -// "NEW" - Return shipments with `new` status only. -// "IN_PROGRESS" - Return shipments with `inProgress` status only. -// "PROCESSED" - Return shipments with `processed` status only. -func (c *OrderreturnsListCall) ShipmentStatus(shipmentStatus ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("shipmentStatus", append([]string{}, shipmentStatus...)) - return c -} - -// ShipmentTrackingNumbers sets the optional parameter -// "shipmentTrackingNumbers": Obtains order returns with the specified tracking -// numbers. If this parameter is provided, createdStartDate, createdEndDate, -// shipmentType, shipmentStatus, shipmentState and acknowledged parameters must -// be not set. Note: if googleOrderId and shipmentTrackingNumber parameters are -// provided, the obtained results will include all order returns that either -// match the specified order id or the specified tracking number. -func (c *OrderreturnsListCall) ShipmentTrackingNumbers(shipmentTrackingNumbers ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("shipmentTrackingNumbers", append([]string{}, shipmentTrackingNumbers...)) - return c -} - -// ShipmentTypes sets the optional parameter "shipmentTypes": Obtains order -// returns that match any shipment type provided in this parameter. When this -// parameter is not provided, order returns are obtained regardless of their -// shipment types. -// -// Possible values: -// -// "BY_MAIL" - Return shipments with type `byMail` only. -// "RETURNLESS" - Return shipments with type `returnless` only. -// "CONTACT_CUSTOMER_SUPPORT" - Return shipments with type -// -// `contactCustomerSupport` only. -func (c *OrderreturnsListCall) ShipmentTypes(shipmentTypes ...string) *OrderreturnsListCall { - c.urlParams_.SetMulti("shipmentTypes", append([]string{}, shipmentTypes...)) - 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 *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCall { +func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27065,27 +18648,27 @@ func (c *OrderreturnsListCall) Fields(s ...googleapi.Field) *OrderreturnsListCal // 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 *OrderreturnsListCall) IfNoneMatch(entityTag string) *OrderreturnsListCall { +func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsListCall) Context(ctx context.Context) *OrderreturnsListCall { +func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall { 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 *OrderreturnsListCall) Header() http.Header { +func (c *DatafeedsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27093,7 +18676,7 @@ func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27106,13 +18689,13 @@ func (c *OrderreturnsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrderreturnsListResponse.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 *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsListResponse, error) { +// Do executes the "content.datafeeds.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *DatafeedsListResponse.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 *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27131,7 +18714,7 @@ func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsLi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreturnsListResponse{ + ret := &DatafeedsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27147,7 +18730,7 @@ func (c *OrderreturnsListCall) Do(opts ...googleapi.CallOption) (*OrderreturnsLi // 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 *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsListResponse) error) error { +func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -27165,82 +18748,82 @@ func (c *OrderreturnsListCall) Pages(ctx context.Context, f func(*OrderreturnsLi } } -type OrderreturnsProcessCall struct { - s *APIService - merchantId uint64 - returnId string - orderreturnsprocessrequest *OrderreturnsProcessRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedsUpdateCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + datafeed *Datafeed + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Process: Processes return in your Merchant Center account. +// Update: Updates a datafeed configuration of your Merchant Center account. +// Any fields that are not provided are deleted from the resource. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - returnId: The ID of the return. -func (r *OrderreturnsService) Process(merchantId uint64, returnId string, orderreturnsprocessrequest *OrderreturnsProcessRequest) *OrderreturnsProcessCall { - c := &OrderreturnsProcessCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall { + c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.returnId = returnId - c.orderreturnsprocessrequest = orderreturnsprocessrequest + c.datafeedId = datafeedId + c.datafeed = datafeed 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 *OrderreturnsProcessCall) Fields(s ...googleapi.Field) *OrderreturnsProcessCall { +func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsProcessCall) Context(ctx context.Context) *OrderreturnsProcessCall { +func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall { 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 *OrderreturnsProcessCall) Header() http.Header { +func (c *DatafeedsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsProcessCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderreturnsprocessrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}/process") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", 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{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "returnId": c.returnId, + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.process" call. +// Do executes the "content.datafeeds.update" call. // Any non-2xx status code is an error. Response headers are in either -// *OrderreturnsProcessResponse.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 *OrderreturnsProcessCall) Do(opts ...googleapi.CallOption) (*OrderreturnsProcessResponse, error) { +// *Datafeed.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 *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27259,7 +18842,7 @@ func (c *OrderreturnsProcessCall) Do(opts ...googleapi.CallOption) (*Orderreturn if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrderreturnsProcessResponse{ + ret := &Datafeed{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27272,85 +18855,71 @@ func (c *OrderreturnsProcessCall) Do(opts ...googleapi.CallOption) (*Orderreturn return ret, nil } -type OrderreturnsLabelsCreateCall struct { - s *APIService - merchantId int64 - returnId string - returnshippinglabel *ReturnShippingLabel - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedstatusesCustombatchCall struct { + s *APIService + datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Links a return shipping label to a return id. You can only create -// one return label per return id. Since the label is sent to the buyer, the -// linked return label cannot be updated or deleted. If you try to create -// multiple return shipping labels for a single return id, every create request -// except the first will fail. -// -// - merchantId: The merchant the Return Shipping Label belongs to. -// - returnId: Provide the Google-generated merchant order return ID. -func (r *OrderreturnsLabelsService) Create(merchantId int64, returnId string, returnshippinglabel *ReturnShippingLabel) *OrderreturnsLabelsCreateCall { - c := &OrderreturnsLabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.returnId = returnId - c.returnshippinglabel = returnshippinglabel +// Custombatch: Gets multiple Merchant Center datafeed statuses in a single +// request. +func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall { + c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest 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 *OrderreturnsLabelsCreateCall) Fields(s ...googleapi.Field) *OrderreturnsLabelsCreateCall { +func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrderreturnsLabelsCreateCall) Context(ctx context.Context) *OrderreturnsLabelsCreateCall { +func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall { 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 *OrderreturnsLabelsCreateCall) Header() http.Header { +func (c *DatafeedstatusesCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrderreturnsLabelsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.returnshippinglabel) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderreturns/{returnId}/labels") + urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch") 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "returnId": c.returnId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orderreturns.labels.create" call. +// Do executes the "content.datafeedstatuses.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *ReturnShippingLabel.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 *OrderreturnsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*ReturnShippingLabel, error) { +// *DatafeedstatusesCustomBatchResponse.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 *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27369,7 +18938,7 @@ func (c *OrderreturnsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*Return if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ReturnShippingLabel{ + ret := &DatafeedstatusesCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27382,82 +18951,117 @@ func (c *OrderreturnsLabelsCreateCall) Do(opts ...googleapi.CallOption) (*Return return ret, nil } -type OrdersAcknowledgeCall struct { - s *APIService - merchantId uint64 - orderId string - ordersacknowledgerequest *OrdersAcknowledgeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedstatusesGetCall struct { + s *APIService + merchantId uint64 + datafeedId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Acknowledge: Marks an order as acknowledged. +// Get: Retrieves the status of a datafeed from your Merchant Center account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall { - c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - datafeedId: The ID of the datafeed. +// - merchantId: The ID of the account that manages the datafeed. This account +// cannot be a multi-client account. +func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall { + c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersacknowledgerequest = ordersacknowledgerequest + c.datafeedId = datafeedId + return c +} + +// Country sets the optional parameter "country": Deprecated. Use `feedLabel` +// instead. The country to get the datafeed status for. If this parameter is +// provided then `language` must also be provided. Note that this parameter is +// required for feeds targeting multiple countries and languages, since a feed +// may have a different status for each target. +func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { + c.urlParams_.Set("country", country) + return c +} + +// FeedLabel sets the optional parameter "feedLabel": The feed label to get the +// datafeed status for. If this parameter is provided then `language` must also +// be provided. Note that this parameter is required for feeds targeting +// multiple countries and languages, since a feed may have a different status +// for each target. +func (c *DatafeedstatusesGetCall) FeedLabel(feedLabel string) *DatafeedstatusesGetCall { + c.urlParams_.Set("feedLabel", feedLabel) + return c +} + +// Language sets the optional parameter "language": The language to get the +// datafeed status for. If this parameter is provided then `country` must also +// be provided. Note that this parameter is required for feeds targeting +// multiple countries and languages, since a feed may have a different status +// for each target. +func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { + c.urlParams_.Set("language", language) 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 *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall { +func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall { 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 *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall { +func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall { 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 *OrdersAcknowledgeCall) Header() http.Header { +func (c *DatafeedstatusesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest) - if err != nil { - return nil, err +func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "datafeedId": strconv.FormatUint(c.datafeedId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.acknowledge" call. +// Do executes the "content.datafeedstatuses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersAcknowledgeResponse.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 *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) { +// *DatafeedStatus.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 *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27476,7 +19080,7 @@ func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersAcknowledgeResponse{ + ret := &DatafeedStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27489,77 +19093,98 @@ func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowl return ret, nil } -type OrdersAdvancetestorderCall struct { - s *APIService - merchantId uint64 - orderId string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type DatafeedstatusesListCall struct { + s *APIService + merchantId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Advancetestorder: Sandbox only. Moves a test order from state "inProgress" -// to state "pendingShipment". +// List: Lists the statuses of the datafeeds in your Merchant Center account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the test order to modify. -func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall { - c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that manages the datafeeds. This account +// cannot be a multi-client account. +func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall { + c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// products to return in the response, used for paging. +func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall { +func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall { 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 *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall { +func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall { 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 *OrdersAdvancetestorderCall) Header() http.Header { +func (c *DatafeedstatusesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) { +func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.advancetestorder" call. +// Do executes the "content.datafeedstatuses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a response was +// *DatafeedstatusesListResponse.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 *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) { +func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27578,7 +19203,7 @@ func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAd if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersAdvanceTestOrderResponse{ + ret := &DatafeedstatusesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27591,82 +19216,107 @@ func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAd return ret, nil } -type OrdersCancelCall struct { - s *APIService - merchantId uint64 - orderId string - orderscancelrequest *OrdersCancelRequest - 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 *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) 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 FreelistingsprogramGetCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels all line items in an order, making a full refund. +// Get: Retrieves the status and review eligibility for the free listing +// program. Returns errors and warnings if they require action to resolve, will +// become disapprovals, or impact impressions. Use `accountstatuses` to view +// all issues for an account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order to cancel. -func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall { - c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramService) Get(merchantId int64) *FreelistingsprogramGetCall { + c := &FreelistingsprogramGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.orderscancelrequest = orderscancelrequest 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 *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall { +func (c *FreelistingsprogramGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramGetCall { 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 *FreelistingsprogramGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall { +func (c *FreelistingsprogramGetCall) Context(ctx context.Context) *FreelistingsprogramGetCall { 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 *OrdersCancelCall) Header() http.Header { +func (c *FreelistingsprogramGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest) - if err != nil { - return nil, err +func (c *FreelistingsprogramGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.cancel" call. +// Do executes the "content.freelistingsprogram.get" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersCancelResponse.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 *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) { +// *FreeListingsProgramStatus.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 *FreelistingsprogramGetCall) Do(opts ...googleapi.CallOption) (*FreeListingsProgramStatus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27685,7 +19335,7 @@ func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelRespon if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersCancelResponse{ + ret := &FreeListingsProgramStatus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27698,62 +19348,60 @@ func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelRespon return ret, nil } -type OrdersCancellineitemCall struct { - s *APIService - merchantId uint64 - orderId string - orderscancellineitemrequest *OrdersCancelLineItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramRequestreviewCall struct { + s *APIService + merchantId int64 + requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancellineitem: Cancels a line item, making a full refund. +// Requestreview: Requests a review of free listings in a specific region. This +// method deprecated. Use the `MerchantSupportService` to view product and +// account issues and request a review. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall { - c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramService) Requestreview(merchantId int64, requestreviewfreelistingsrequest *RequestReviewFreeListingsRequest) *FreelistingsprogramRequestreviewCall { + c := &FreelistingsprogramRequestreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.orderscancellineitemrequest = orderscancellineitemrequest + c.requestreviewfreelistingsrequest = requestreviewfreelistingsrequest 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 *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall { +func (c *FreelistingsprogramRequestreviewCall) Fields(s ...googleapi.Field) *FreelistingsprogramRequestreviewCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall { +func (c *FreelistingsprogramRequestreviewCall) Context(ctx context.Context) *FreelistingsprogramRequestreviewCall { 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 *OrdersCancellineitemCall) Header() http.Header { +func (c *FreelistingsprogramRequestreviewCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) { +func (c *FreelistingsprogramRequestreviewCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.requestreviewfreelistingsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/requestreview") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27761,245 +19409,176 @@ func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.cancellineitem" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrdersCancelLineItemResponse.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 *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) { +// Do executes the "content.freelistingsprogram.requestreview" call. +func (c *FreelistingsprogramRequestreviewCall) Do(opts ...googleapi.CallOption) 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 + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OrdersCancelLineItemResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type OrdersCanceltestorderbycustomerCall struct { - s *APIService - merchantId uint64 - orderId string - orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramCheckoutsettingsDeleteCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Canceltestorderbycustomer: Sandbox only. Cancels a test order for -// customer-initiated cancellation. +// Delete: Deletes `Checkout` settings and unenrolls merchant from `Checkout` +// program. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the test order to cancel. -func (r *OrdersService) Canceltestorderbycustomer(merchantId uint64, orderId string, orderscanceltestorderbycustomerrequest *OrdersCancelTestOrderByCustomerRequest) *OrdersCanceltestorderbycustomerCall { - c := &OrdersCanceltestorderbycustomerCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Delete(merchantId int64) *FreelistingsprogramCheckoutsettingsDeleteCall { + c := &FreelistingsprogramCheckoutsettingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.orderscanceltestorderbycustomerrequest = orderscanceltestorderbycustomerrequest 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 *OrdersCanceltestorderbycustomerCall) Fields(s ...googleapi.Field) *OrdersCanceltestorderbycustomerCall { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersCanceltestorderbycustomerCall) Context(ctx context.Context) *OrdersCanceltestorderbycustomerCall { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsDeleteCall { 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 *OrdersCanceltestorderbycustomerCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCanceltestorderbycustomerCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscanceltestorderbycustomerrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/cancelByCustomer") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.canceltestorderbycustomer" call. -// Any non-2xx status code is an error. Response headers are in either -// *OrdersCancelTestOrderByCustomerResponse.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 *OrdersCanceltestorderbycustomerCall) Do(opts ...googleapi.CallOption) (*OrdersCancelTestOrderByCustomerResponse, error) { +// Do executes the "content.freelistingsprogram.checkoutsettings.delete" call. +func (c *FreelistingsprogramCheckoutsettingsDeleteCall) Do(opts ...googleapi.CallOption) 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 + return err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &OrdersCancelTestOrderByCustomerResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err + return gensupport.WrapError(err) } - return ret, nil + return nil } -type OrdersCaptureOrderCall struct { - s *APIService - merchantId int64 - orderId string - captureorderrequest *CaptureOrderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramCheckoutsettingsGetCall struct { + s *APIService + merchantId int64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// CaptureOrder: Capture funds from the customer for the current order total. -// This method should be called after the merchant verifies that they are able -// and ready to start shipping the order. This method blocks until a response -// is received from the payment processsor. If this method succeeds, the -// merchant is guaranteed to receive funds for the order after shipment. If the -// request fails, it can be retried or the order may be cancelled. This method -// cannot be called after the entire order is already shipped. A rejected error -// code is returned when the payment service provider has declined the charge. -// This indicates a problem between the PSP and either the merchant's or -// customer's account. Sometimes this error will be resolved by the customer. -// We recommend retrying these errors once per day or cancelling the order with -// reason `failedToCaptureFunds` if the items cannot be held. +// Get: Gets Checkout settings for the given merchant. This includes +// information about review state, enrollment state and URL settings. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the Order. -func (r *OrdersService) CaptureOrder(merchantId int64, orderId string, captureorderrequest *CaptureOrderRequest) *OrdersCaptureOrderCall { - c := &OrdersCaptureOrderCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Get(merchantId int64) *FreelistingsprogramCheckoutsettingsGetCall { + c := &FreelistingsprogramCheckoutsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.captureorderrequest = captureorderrequest 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 *OrdersCaptureOrderCall) Fields(s ...googleapi.Field) *OrdersCaptureOrderCall { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsGetCall { 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 *FreelistingsprogramCheckoutsettingsGetCall) IfNoneMatch(entityTag string) *FreelistingsprogramCheckoutsettingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersCaptureOrderCall) Context(ctx context.Context) *OrdersCaptureOrderCall { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsGetCall { 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 *OrdersCaptureOrderCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCaptureOrderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.captureorderrequest) - if err != nil { - return nil, err +func (c *FreelistingsprogramCheckoutsettingsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/captureOrder") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatInt(c.merchantId, 10), - "orderId": c.orderId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.captureOrder" call. +// Do executes the "content.freelistingsprogram.checkoutsettings.get" call. // Any non-2xx status code is an error. Response headers are in either -// *CaptureOrderResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *CheckoutSettings.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 *OrdersCaptureOrderCall) Do(opts ...googleapi.CallOption) (*CaptureOrderResponse, error) { +func (c *FreelistingsprogramCheckoutsettingsGetCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28018,7 +19597,7 @@ func (c *OrdersCaptureOrderCall) Do(opts ...googleapi.CallOption) (*CaptureOrder if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CaptureOrderResponse{ + ret := &CheckoutSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28031,59 +19610,58 @@ func (c *OrdersCaptureOrderCall) Do(opts ...googleapi.CallOption) (*CaptureOrder return ret, nil } -type OrdersCreatetestorderCall struct { - s *APIService - merchantId uint64 - orderscreatetestorderrequest *OrdersCreateTestOrderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FreelistingsprogramCheckoutsettingsInsertCall struct { + s *APIService + merchantId int64 + insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Createtestorder: Sandbox only. Creates a test order. +// Insert: Enrolls merchant in `Checkout` program. // -// - merchantId: The ID of the account that should manage the order. This -// cannot be a multi-client account. -func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall { - c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account. +func (r *FreelistingsprogramCheckoutsettingsService) Insert(merchantId int64, insertcheckoutsettingsrequest *InsertCheckoutSettingsRequest) *FreelistingsprogramCheckoutsettingsInsertCall { + c := &FreelistingsprogramCheckoutsettingsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderscreatetestorderrequest = orderscreatetestorderrequest + c.insertcheckoutsettingsrequest = insertcheckoutsettingsrequest 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 *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Fields(s ...googleapi.Field) *FreelistingsprogramCheckoutsettingsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Context(ctx context.Context) *FreelistingsprogramCheckoutsettingsInsertCall { 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 *OrdersCreatetestorderCall) Header() http.Header { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) { +func (c *FreelistingsprogramCheckoutsettingsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertcheckoutsettingsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/freelistingsprogram/checkoutsettings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28091,18 +19669,18 @@ func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.createtestorder" call. +// Do executes the "content.freelistingsprogram.checkoutsettings.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersCreateTestOrderResponse.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 *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) { +// *CheckoutSettings.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 *FreelistingsprogramCheckoutsettingsInsertCall) Do(opts ...googleapi.CallOption) (*CheckoutSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28121,7 +19699,7 @@ func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCre if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersCreateTestOrderResponse{ + ret := &CheckoutSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28134,82 +19712,71 @@ func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCre return ret, nil } -type OrdersCreatetestreturnCall struct { +type LiasettingsCustombatchCall struct { s *APIService - merchantId uint64 - orderId string - orderscreatetestreturnrequest *OrdersCreateTestReturnRequest + liasettingscustombatchrequest *LiasettingsCustomBatchRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Createtestreturn: Sandbox only. Creates a test return. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Createtestreturn(merchantId uint64, orderId string, orderscreatetestreturnrequest *OrdersCreateTestReturnRequest) *OrdersCreatetestreturnCall { - c := &OrdersCreatetestreturnCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.orderscreatetestreturnrequest = orderscreatetestreturnrequest +// Custombatch: Retrieves and/or updates the LIA settings of multiple accounts +// in a single request. +func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall { + c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.liasettingscustombatchrequest = liasettingscustombatchrequest 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 *OrdersCreatetestreturnCall) Fields(s ...googleapi.Field) *OrdersCreatetestreturnCall { +func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersCreatetestreturnCall) Context(ctx context.Context) *OrdersCreatetestreturnCall { +func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall { 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 *OrdersCreatetestreturnCall) Header() http.Header { +func (c *LiasettingsCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersCreatetestreturnCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestreturnrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/testreturn") + urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.createtestreturn" call. +// Do executes the "content.liasettings.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersCreateTestReturnResponse.ServerResponse.Header or (if a response was +// *LiasettingsCustomBatchResponse.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 *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestReturnResponse, error) { +func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28228,7 +19795,7 @@ func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersCreateTestReturnResponse{ + ret := &LiasettingsCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28241,32 +19808,33 @@ func (c *OrdersCreatetestreturnCall) Do(opts ...googleapi.CallOption) (*OrdersCr return ret, nil } -type OrdersGetCall struct { +type LiasettingsGetCall struct { s *APIService merchantId uint64 - orderId string + accountId uint64 urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Retrieves an order from your Merchant Center account. +// Get: Retrieves the LIA settings of the account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall { - c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to get or update LIA settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall { + c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId + c.accountId = accountId 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 *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { +func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28274,27 +19842,27 @@ func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall { // 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 *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall { +func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall { +func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall { 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 *OrdersGetCall) Header() http.Header { +func (c *LiasettingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28302,7 +19870,7 @@ func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28311,17 +19879,17 @@ func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.get" call. +// Do executes the "content.liasettings.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Order.ServerResponse.Header or (if a response was returned at all) in +// *LiaSettings.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 *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { +func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28340,7 +19908,7 @@ func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Order{ + ret := &LiaSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28353,32 +19921,35 @@ func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) { return ret, nil } -type OrdersGetbymerchantorderidCall struct { - s *APIService - merchantId uint64 - merchantOrderId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LiasettingsGetaccessiblegmbaccountsCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Getbymerchantorderid: Retrieves an order using merchant order ID. +// Getaccessiblegmbaccounts: Retrieves the list of accessible Business +// Profiles. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - merchantOrderId: The merchant order ID to be looked for. -func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall { - c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall { + c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.merchantOrderId = merchantOrderId + c.accountId = accountId 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 *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28386,27 +19957,27 @@ func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGet // 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 *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall { +func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall { 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 *OrdersGetbymerchantorderidCall) Header() http.Header { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28414,7 +19985,7 @@ func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28422,19 +19993,19 @@ func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "merchantOrderId": c.merchantOrderId, + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.getbymerchantorderid" call. +// Do executes the "content.liasettings.getaccessiblegmbaccounts" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsGetAccessibleGmbAccountsResponse.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 *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) { +func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28453,7 +20024,7 @@ func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersGetByMerchantOrderIdResponse{ + ret := &LiasettingsGetAccessibleGmbAccountsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28466,40 +20037,44 @@ func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*Orde return ret, nil } -type OrdersGettestordertemplateCall struct { +type LiasettingsListCall struct { s *APIService merchantId uint64 - templateName string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Gettestordertemplate: Sandbox only. Retrieves an order template that can be -// used to quickly create a new order in sandbox. +// List: Lists the LIA settings of the sub-accounts in your Merchant Center +// account. // -// - merchantId: The ID of the account that should manage the order. This -// cannot be a multi-client account. -// - templateName: The name of the template to retrieve. -func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall { - c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the managing account. This must be a multi-client +// account. +func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall { + c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.templateName = templateName return c } -// Country sets the optional parameter "country": The country of the template -// to retrieve. Defaults to "US". -func (c *OrdersGettestordertemplateCall) Country(country string) *OrdersGettestordertemplateCall { - c.urlParams_.Set("country", country) +// MaxResults sets the optional parameter "maxResults": The maximum number of +// LIA settings to return in the response, used for paging. +func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token returned by the +// previous request. +func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall { +func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28507,27 +20082,27 @@ func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGet // 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 *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall { +func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall { +func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall { 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 *OrdersGettestordertemplateCall) Header() http.Header { +func (c *LiasettingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28535,7 +20110,7 @@ func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28543,19 +20118,18 @@ func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "templateName": c.templateName, + "merchantId": strconv.FormatUint(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.gettestordertemplate" call. +// Do executes the "content.liasettings.list" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsListResponse.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 *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) { +func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28574,7 +20148,7 @@ func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersGetTestOrderTemplateResponse{ + ret := &LiasettingsListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28587,90 +20161,98 @@ func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*Orde return ret, nil } -type OrdersInstorerefundlineitemCall struct { - s *APIService - merchantId uint64 - orderId string - ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest - 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 *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) 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) + } } -// Instorerefundlineitem: Deprecated. Notifies that item return and refund was -// handled directly by merchant outside of Google payments processing (for -// example, cash refund done in store). Note: We recommend calling the -// returnrefundlineitem method to refund in-store returns. We will issue the -// refund directly to the customer. This helps to prevent possible differences -// arising between merchant and Google transaction records. We also recommend -// having the point of sale system communicate with Google to ensure that -// customers do not receive a double refund by first refunding through Google -// then through an in-store return. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall { - c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest +type LiasettingsListposdataprovidersCall struct { + s *APIService + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Listposdataproviders: Retrieves the list of POS data providers that have +// active settings for the all eiligible countries. +func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall { + c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 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 *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall { +func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall { 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 *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall { +func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall { 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 *OrdersInstorerefundlineitemCall) Header() http.Header { +func (c *LiasettingsListposdataprovidersCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest) - if err != nil { - return nil, err +func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem") + urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.instorerefundlineitem" call. +// Do executes the "content.liasettings.listposdataproviders" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsListPosDataProvidersResponse.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 *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) { +func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28689,7 +20271,7 @@ func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*Ord if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersInStoreRefundLineItemResponse{ + ret := &LiasettingsListPosDataProvidersResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28702,163 +20284,188 @@ func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*Ord return ret, nil } -type OrdersListCall struct { - s *APIService - merchantId uint64 - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LiasettingsRequestgmbaccessCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the orders in your Merchant Center account. +// Requestgmbaccess: Requests access to a specified Business Profile. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -func (r *OrdersService) List(merchantId uint64) *OrdersListCall { - c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which Business Profile access is +// requested. +// - gmbEmail: The email of the Business Profile. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64, gmbEmail string) *LiasettingsRequestgmbaccessCall { + c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId + c.accountId = accountId + c.urlParams_.Set("gmbEmail", gmbEmail) return c } -// Acknowledged sets the optional parameter "acknowledged": Obtains orders that -// match the acknowledgement status. When set to true, obtains orders that have -// been acknowledged. When false, obtains orders that have not been -// acknowledged. We recommend using this filter set to `false`, in conjunction -// with the `acknowledge` call, such that only un-acknowledged orders are -// returned. -func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall { - c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// orders to return in the response, used for paging. The default value is 25 -// orders per page, and the maximum allowed value is 250 orders per page. -func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Context sets the context to be used in this call's Do method. +func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall { + c.ctx_ = ctx return c } -// OrderBy sets the optional parameter "orderBy": Order results by placement -// date in descending or ascending order. Acceptable values are: - -// placedDateAsc - placedDateDesc -func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall { - 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 *LiasettingsRequestgmbaccessCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// PageToken sets the optional parameter "pageToken": The token returned by the -// previous request. -func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess") + 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{ + "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains orders -// placed before this date (exclusively), in ISO 8601 format. -func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall { - c.urlParams_.Set("placedDateEnd", placedDateEnd) - return c +// Do executes the "content.liasettings.requestgmbaccess" call. +// Any non-2xx status code is an error. Response headers are in either +// *LiasettingsRequestGmbAccessResponse.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 *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, 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 := &LiasettingsRequestGmbAccessResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -// PlacedDateStart sets the optional parameter "placedDateStart": Obtains -// orders placed after this date (inclusively), in ISO 8601 format. -func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall { - c.urlParams_.Set("placedDateStart", placedDateStart) - return c +type LiasettingsRequestinventoryverificationCall struct { + s *APIService + merchantId uint64 + accountId uint64 + country string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Statuses sets the optional parameter "statuses": Obtains orders that match -// any of the specified statuses. Note that `active` is a shortcut for -// `pendingShipment` and `partiallyShipped`, and `completed` is a shortcut for -// `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`, -// `returned`, and `canceled`. -// -// Possible values: -// -// "ACTIVE" - Return orders with status `active`. The `active` status -// -// includes `pendingShipment` and `partiallyShipped` orders. -// -// "COMPLETED" - Return orders with status `completed`. The `completed` -// -// status includes `shipped`, `partiallyDelivered`, `delivered`, -// `partiallyReturned`, `returned`, and `canceled` orders. +// Requestinventoryverification: Requests inventory validation for the +// specified country. // -// "CANCELED" - Return orders with status `canceled`. -// "IN_PROGRESS" - Return orders with status `inProgress`. -// "PENDING_SHIPMENT" - Return orders with status `pendingShipment`. -// "PARTIALLY_SHIPPED" - Return orders with status `partiallyShipped`. -// "SHIPPED" - Return orders with status `shipped`. -// "PARTIALLY_DELIVERED" - Return orders with status `partiallyDelivered`. -// "DELIVERED" - Return orders with status `delivered`. -// "PARTIALLY_RETURNED" - Return orders with status `partiallyReturned`. -// "RETURNED" - Return orders with status `returned`. -func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall { - c.urlParams_.SetMulti("statuses", append([]string{}, statuses...)) +// - accountId: The ID of the account that manages the order. This cannot be a +// multi-client account. +// - country: The country for which inventory validation is requested. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall { + c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.merchantId = merchantId + c.accountId = accountId + c.country = country 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 *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall { +func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall { 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 *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall { +func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall { 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 *OrdersListCall) Header() http.Header { +func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ "merchantId": strconv.FormatUint(c.merchantId, 10), + "accountId": strconv.FormatUint(c.accountId, 10), + "country": c.country, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.list" call. +// Do executes the "content.liasettings.requestinventoryverification" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersListResponse.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 *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) { +// *LiasettingsRequestInventoryVerificationResponse.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 *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28877,7 +20484,7 @@ func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersListResponse{ + ret := &LiasettingsRequestInventoryVerificationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28890,83 +20497,67 @@ func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, 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 *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) 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 OrdersRefunditemCall struct { - s *APIService - merchantId uint64 - orderId string - ordersrefunditemrequest *OrdersRefundItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetinventoryverificationcontactCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Refunditem: Issues a partial or total refund for items and shipment. +// Setinventoryverificationcontact: Sets the inventory verification contract +// for the specified country. // -// - merchantId: The ID of the account that manages the order. This cannot be a +// - accountId: The ID of the account that manages the order. This cannot be a // multi-client account. -// - orderId: The ID of the order to refund. -func (r *OrdersService) Refunditem(merchantId uint64, orderId string, ordersrefunditemrequest *OrdersRefundItemRequest) *OrdersRefunditemCall { - c := &OrdersRefunditemCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - contactEmail: The email of the inventory verification contact. +// - contactName: The name of the inventory verification contact. +// - country: The country for which inventory verification is requested. +// - language: The language for which inventory verification is requested. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64, country string, language string, contactName string, contactEmail string) *LiasettingsSetinventoryverificationcontactCall { + c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersrefunditemrequest = ordersrefunditemrequest + c.accountId = accountId + c.urlParams_.Set("country", country) + c.urlParams_.Set("language", language) + c.urlParams_.Set("contactName", contactName) + c.urlParams_.Set("contactEmail", contactEmail) 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 *OrdersRefunditemCall) Fields(s ...googleapi.Field) *OrdersRefunditemCall { +func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersRefunditemCall) Context(ctx context.Context) *OrdersRefunditemCall { +func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall { 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 *OrdersRefunditemCall) Header() http.Header { +func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersRefunditemCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefunditemrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refunditem") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28975,18 +20566,18 @@ func (c *OrdersRefunditemCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.refunditem" call. +// Do executes the "content.liasettings.setinventoryverificationcontact" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersRefundItemResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsSetInventoryVerificationContactResponse.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 *OrdersRefunditemCall) Do(opts ...googleapi.CallOption) (*OrdersRefundItemResponse, error) { +func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29005,7 +20596,7 @@ func (c *OrdersRefunditemCall) Do(opts ...googleapi.CallOption) (*OrdersRefundIt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersRefundItemResponse{ + ret := &LiasettingsSetInventoryVerificationContactResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29018,62 +20609,87 @@ func (c *OrdersRefunditemCall) Do(opts ...googleapi.CallOption) (*OrdersRefundIt return ret, nil } -type OrdersRefundorderCall struct { - s *APIService - merchantId uint64 - orderId string - ordersrefundorderrequest *OrdersRefundOrderRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetomnichannelexperienceCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Refundorder: Issues a partial or total refund for an order. +// Setomnichannelexperience: Sets the omnichannel experience for the specified +// country. Only supported for merchants whose POS data provider is trusted to +// enable the corresponding experience. For more context, see these help +// articles about LFP (https://support.google.com/merchants/answer/7676652) and +// how to get started (https://support.google.com/merchants/answer/7676578) +// with it. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order to refund. -func (r *OrdersService) Refundorder(merchantId uint64, orderId string, ordersrefundorderrequest *OrdersRefundOrderRequest) *OrdersRefundorderCall { - c := &OrdersRefundorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setomnichannelexperience(merchantId uint64, accountId uint64) *LiasettingsSetomnichannelexperienceCall { + c := &LiasettingsSetomnichannelexperienceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersrefundorderrequest = ordersrefundorderrequest + c.accountId = accountId + return c +} + +// Country sets the optional parameter "country": The CLDR country code (for +// example, "US") for which the omnichannel experience is selected. +func (c *LiasettingsSetomnichannelexperienceCall) Country(country string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.Set("country", country) + return c +} + +// LsfType sets the optional parameter "lsfType": The Local Store Front (LSF) +// type for this country. Acceptable values are: - "ghlsf" (Google-Hosted +// Local Store Front) - "mhlsfBasic" (Merchant-Hosted Local Store Front +// Basic) - "mhlsfFull" (Merchant-Hosted Local Store Front Full) More details +// about these types can be found here. +func (c *LiasettingsSetomnichannelexperienceCall) LsfType(lsfType string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.Set("lsfType", lsfType) + return c +} + +// PickupTypes sets the optional parameter "pickupTypes": The Pickup types for +// this country. Acceptable values are: - "pickupToday" - "pickupLater" +func (c *LiasettingsSetomnichannelexperienceCall) PickupTypes(pickupTypes ...string) *LiasettingsSetomnichannelexperienceCall { + c.urlParams_.SetMulti("pickupTypes", append([]string{}, pickupTypes...)) 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 *OrdersRefundorderCall) Fields(s ...googleapi.Field) *OrdersRefundorderCall { +func (c *LiasettingsSetomnichannelexperienceCall) Fields(s ...googleapi.Field) *LiasettingsSetomnichannelexperienceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersRefundorderCall) Context(ctx context.Context) *OrdersRefundorderCall { +func (c *LiasettingsSetomnichannelexperienceCall) Context(ctx context.Context) *LiasettingsSetomnichannelexperienceCall { 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 *OrdersRefundorderCall) Header() http.Header { +func (c *LiasettingsSetomnichannelexperienceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersRefundorderCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *LiasettingsSetomnichannelexperienceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundorderrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refundorder") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setomnichannelexperience") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29082,18 +20698,18 @@ func (c *OrdersRefundorderCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.refundorder" call. +// Do executes the "content.liasettings.setomnichannelexperience" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersRefundOrderResponse.ServerResponse.Header or (if a response was +// *LiaOmnichannelExperience.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 *OrdersRefundorderCall) Do(opts ...googleapi.CallOption) (*OrdersRefundOrderResponse, error) { +func (c *LiasettingsSetomnichannelexperienceCall) Do(opts ...googleapi.CallOption) (*LiaOmnichannelExperience, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29112,7 +20728,7 @@ func (c *OrdersRefundorderCall) Do(opts ...googleapi.CallOption) (*OrdersRefundO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersRefundOrderResponse{ + ret := &LiaOmnichannelExperience{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29125,62 +20741,74 @@ func (c *OrdersRefundorderCall) Do(opts ...googleapi.CallOption) (*OrdersRefundO return ret, nil } -type OrdersRejectreturnlineitemCall struct { - s *APIService - merchantId uint64 - orderId string - ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsSetposdataproviderCall struct { + s *APIService + merchantId uint64 + accountId uint64 + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Rejectreturnlineitem: Rejects return on an line item. +// Setposdataprovider: Sets the POS data provider for the specified country. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall { - c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to retrieve accessible Business +// Profiles. +// - country: The country for which the POS data provider is selected. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64, country string) *LiasettingsSetposdataproviderCall { + c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest + c.accountId = accountId + c.urlParams_.Set("country", country) + return c +} + +// PosDataProviderId sets the optional parameter "posDataProviderId": The ID of +// POS data provider. +func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall { + c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId)) + return c +} + +// PosExternalAccountId sets the optional parameter "posExternalAccountId": The +// account ID by which this merchant is known to the POS data provider. +func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall { + c.urlParams_.Set("posExternalAccountId", posExternalAccountId) 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 *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall { +func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall { +func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall { 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 *OrdersRejectreturnlineitemCall) Header() http.Header { +func (c *LiasettingsSetposdataproviderCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29189,18 +20817,18 @@ func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.rejectreturnlineitem" call. +// Do executes the "content.liasettings.setposdataprovider" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersRejectReturnLineItemResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *LiasettingsSetPosDataProviderResponse.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 *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) { +func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29219,7 +20847,7 @@ func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersRejectReturnLineItemResponse{ + ret := &LiasettingsSetPosDataProviderResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29232,87 +20860,83 @@ func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*Orde return ret, nil } -type OrdersReturnrefundlineitemCall struct { - s *APIService - merchantId uint64 - orderId string - ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LiasettingsUpdateCall struct { + s *APIService + merchantId uint64 + accountId uint64 + liasettings *LiaSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Returnrefundlineitem: Returns and refunds a line item. Note that this method -// can only be called on fully shipped orders. The Orderreturns API is the -// preferred way to handle returns after you receive a return from a customer. -// You can use Orderreturns.list or Orderreturns.get to search for the return, -// and then use Orderreturns.processreturn to issue the refund. If the return -// cannot be found, then we recommend using this API to issue a refund. +// Update: Updates the LIA settings of the account. Any fields that are not +// provided are deleted from the resource. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall { - c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - accountId: The ID of the account for which to get or update LIA settings. +// - merchantId: The ID of the managing account. If this parameter is not the +// same as accountId, then this account must be a multi-client account and +// `accountId` must be the ID of a sub-account of this account. +func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall { + c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest + c.accountId = accountId + c.liasettings = liasettings 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 *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall { +func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall { +func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall { 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 *OrdersReturnrefundlineitemCall) Header() http.Header { +func (c *LiasettingsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) { +func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", 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{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "accountId": strconv.FormatUint(c.accountId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.returnrefundlineitem" call. +// Do executes the "content.liasettings.update" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersReturnRefundLineItemResponse.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 *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) { +// *LiaSettings.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 *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29331,7 +20955,7 @@ func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*Orde if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersReturnRefundLineItemResponse{ + ret := &LiaSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29344,86 +20968,71 @@ func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*Orde return ret, nil } -type OrdersSetlineitemmetadataCall struct { +type LocalinventoryCustombatchCall struct { s *APIService - merchantId uint64 - orderId string - orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest + localinventorycustombatchrequest *LocalinventoryCustomBatchRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Setlineitemmetadata: Sets (or overrides if it already exists) merchant -// provided annotations in the form of key-value pairs. A common use case would -// be to supply us with additional structured information about a line item -// that cannot be provided through other methods. Submitted key-value pairs can -// be retrieved as part of the orders resource. -// -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall { - c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.orderId = orderId - c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest +// Custombatch: Updates local inventory for multiple products or stores in a +// single request. +func (r *LocalinventoryService) Custombatch(localinventorycustombatchrequest *LocalinventoryCustomBatchRequest) *LocalinventoryCustombatchCall { + c := &LocalinventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.localinventorycustombatchrequest = localinventorycustombatchrequest 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 *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall { +func (c *LocalinventoryCustombatchCall) Fields(s ...googleapi.Field) *LocalinventoryCustombatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall { +func (c *LocalinventoryCustombatchCall) Context(ctx context.Context) *LocalinventoryCustombatchCall { 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 *OrdersSetlineitemmetadataCall) Header() http.Header { +func (c *LocalinventoryCustombatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) { +func (c *LocalinventoryCustombatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.localinventorycustombatchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata") + urls := googleapi.ResolveRelative(c.s.BasePath, "localinventory/batch") 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{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.setlineitemmetadata" call. +// Do executes the "content.localinventory.custombatch" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersSetLineItemMetadataResponse.ServerResponse.Header or (if a response +// *LocalinventoryCustomBatchResponse.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 *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) { +func (c *LocalinventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*LocalinventoryCustomBatchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29442,7 +21051,7 @@ func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*Order if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersSetLineItemMetadataResponse{ + ret := &LocalinventoryCustomBatchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29455,62 +21064,63 @@ func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*Order return ret, nil } -type OrdersShiplineitemsCall struct { - s *APIService - merchantId uint64 - orderId string - ordersshiplineitemsrequest *OrdersShipLineItemsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocalinventoryInsertCall struct { + s *APIService + merchantId uint64 + productId string + localinventory *LocalInventory + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Shiplineitems: Marks line item(s) as shipped. +// Insert: Updates the local inventory of a product in your Merchant Center +// account. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall { - c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. This account +// cannot be a multi-client account. +// - productId: The REST ID of the product for which to update local inventory. +func (r *LocalinventoryService) Insert(merchantId uint64, productId string, localinventory *LocalInventory) *LocalinventoryInsertCall { + c := &LocalinventoryInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersshiplineitemsrequest = ordersshiplineitemsrequest + c.productId = productId + c.localinventory = localinventory 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 *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall { +func (c *LocalinventoryInsertCall) Fields(s ...googleapi.Field) *LocalinventoryInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall { +func (c *LocalinventoryInsertCall) Context(ctx context.Context) *LocalinventoryInsertCall { 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 *OrdersShiplineitemsCall) Header() http.Header { +func (c *LocalinventoryInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) { +func (c *LocalinventoryInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.localinventory) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}/localinventory") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29519,18 +21129,17 @@ func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "productId": c.productId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.shiplineitems" call. +// Do executes the "content.localinventory.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersShipLineItemsResponse.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 *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) { +// *LocalInventory.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 *LocalinventoryInsertCall) Do(opts ...googleapi.CallOption) (*LocalInventory, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29549,7 +21158,7 @@ func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipL if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersShipLineItemsResponse{ + ret := &LocalInventory{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29562,63 +21171,77 @@ func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipL return ret, nil } -type OrdersUpdatelineitemshippingdetailsCall struct { - s *APIService - merchantId uint64 - orderId string - ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MerchantsupportRenderaccountissuesCall struct { + s *APIService + merchantId int64 + renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updatelineitemshippingdetails: Updates ship by and delivery by dates for a -// line item. +// Renderaccountissues: Provide a list of merchant's issues with a support +// content and available actions. This content and actions are meant to be +// rendered and shown in third-party applications. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall { - c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account to fetch issues for. +func (r *MerchantsupportService) Renderaccountissues(merchantId int64, renderaccountissuesrequestpayload *RenderAccountIssuesRequestPayload) *MerchantsupportRenderaccountissuesCall { + c := &MerchantsupportRenderaccountissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest + c.renderaccountissuesrequestpayload = renderaccountissuesrequestpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 +// (https://tools.ietf.org/html/bcp47) language code used to localize support +// content. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportRenderaccountissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in support +// content. For example 'America/Los_Angeles'. If not set, results will use as +// a default UTC. +func (c *MerchantsupportRenderaccountissuesCall) TimeZone(timeZone string) *MerchantsupportRenderaccountissuesCall { + c.urlParams_.Set("timeZone", timeZone) 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 *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall { +func (c *MerchantsupportRenderaccountissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderaccountissuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall { +func (c *MerchantsupportRenderaccountissuesCall) Context(ctx context.Context) *MerchantsupportRenderaccountissuesCall { 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 *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header { +func (c *MerchantsupportRenderaccountissuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) { +func (c *MerchantsupportRenderaccountissuesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renderaccountissuesrequestpayload) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderaccountissues") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29626,19 +21249,18 @@ func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.updatelineitemshippingdetails" call. +// Do executes the "content.merchantsupport.renderaccountissues" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *RenderAccountIssuesResponse.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 *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) { +func (c *MerchantsupportRenderaccountissuesCall) Do(opts ...googleapi.CallOption) (*RenderAccountIssuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29657,7 +21279,7 @@ func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersUpdateLineItemShippingDetailsResponse{ + ret := &RenderAccountIssuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29670,62 +21292,82 @@ func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOptio return ret, nil } -type OrdersUpdatemerchantorderidCall struct { - s *APIService - merchantId uint64 - orderId string - ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MerchantsupportRenderproductissuesCall struct { + s *APIService + merchantId int64 + productId string + renderproductissuesrequestpayload *RenderProductIssuesRequestPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updatemerchantorderid: Updates the merchant order ID for a given order. +// Renderproductissues: Provide a list of issues for merchant's product with a +// support content and available actions. This content and actions are meant to +// be rendered and shown in third-party applications. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall { - c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the account that contains the product. +// - productId: The REST_ID +// (https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) +// of the product to fetch issues for. +func (r *MerchantsupportService) Renderproductissues(merchantId int64, productId string, renderproductissuesrequestpayload *RenderProductIssuesRequestPayload) *MerchantsupportRenderproductissuesCall { + c := &MerchantsupportRenderproductissuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest + c.productId = productId + c.renderproductissuesrequestpayload = renderproductissuesrequestpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 +// (https://tools.ietf.org/html/bcp47) language code used to localize support +// content. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportRenderproductissuesCall) LanguageCode(languageCode string) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("languageCode", languageCode) + return c +} + +// TimeZone sets the optional parameter "timeZone": The IANA +// (https://www.iana.org/time-zones) timezone used to localize times in support +// content. For example 'America/Los_Angeles'. If not set, results will use as +// a default UTC. +func (c *MerchantsupportRenderproductissuesCall) TimeZone(timeZone string) *MerchantsupportRenderproductissuesCall { + c.urlParams_.Set("timeZone", timeZone) 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 *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall { +func (c *MerchantsupportRenderproductissuesCall) Fields(s ...googleapi.Field) *MerchantsupportRenderproductissuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall { +func (c *MerchantsupportRenderproductissuesCall) Context(ctx context.Context) *MerchantsupportRenderproductissuesCall { 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 *OrdersUpdatemerchantorderidCall) Header() http.Header { +func (c *MerchantsupportRenderproductissuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) { +func (c *MerchantsupportRenderproductissuesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.renderproductissuesrequestpayload) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/renderproductissues/{productId}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29733,19 +21375,19 @@ func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), + "productId": c.productId, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.updatemerchantorderid" call. +// Do executes the "content.merchantsupport.renderproductissues" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *RenderProductIssuesResponse.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 *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) { +func (c *MerchantsupportRenderproductissuesCall) Do(opts ...googleapi.CallOption) (*RenderProductIssuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29764,7 +21406,7 @@ func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*Ord if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersUpdateMerchantOrderIdResponse{ + ret := &RenderProductIssuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29777,62 +21419,73 @@ func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*Ord return ret, nil } -type OrdersUpdateshipmentCall struct { - s *APIService - merchantId uint64 - orderId string - ordersupdateshipmentrequest *OrdersUpdateShipmentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MerchantsupportTriggeractionCall struct { + s *APIService + merchantId int64 + triggeractionpayload *TriggerActionPayload + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Updateshipment: Updates a shipment's status, carrier, and/or tracking ID. +// Triggeraction: Start an action. The action can be requested by merchants in +// third-party application. Before merchants can request the action, the +// third-party application needs to show them action specific content and +// display a user input form. The action can be successfully started only once +// all `required` inputs are provided. If any `required` input is missing, or +// invalid value was provided, the service will return 400 error. Validation +// errors will contain Ids for all problematic field together with translated, +// human readable error messages that can be shown to the user. // -// - merchantId: The ID of the account that manages the order. This cannot be a -// multi-client account. -// - orderId: The ID of the order. -func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall { - c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - merchantId: The ID of the merchant's account. +func (r *MerchantsupportService) Triggeraction(merchantId int64, triggeractionpayload *TriggerActionPayload) *MerchantsupportTriggeractionCall { + c := &MerchantsupportTriggeractionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.merchantId = merchantId - c.orderId = orderId - c.ordersupdateshipmentrequest = ordersupdateshipmentrequest + c.triggeractionpayload = triggeractionpayload + return c +} + +// LanguageCode sets the optional parameter "languageCode": Language code IETF +// BCP 47 syntax (https://tools.ietf.org/html/bcp47) used to localize the +// response. If not set, the result will be in default language `en-US`. +func (c *MerchantsupportTriggeractionCall) LanguageCode(languageCode string) *MerchantsupportTriggeractionCall { + c.urlParams_.Set("languageCode", languageCode) 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 *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall { +func (c *MerchantsupportTriggeractionCall) Fields(s ...googleapi.Field) *MerchantsupportTriggeractionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall { +func (c *MerchantsupportTriggeractionCall) Context(ctx context.Context) *MerchantsupportTriggeractionCall { 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 *OrdersUpdateshipmentCall) Header() http.Header { +func (c *MerchantsupportTriggeractionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) { +func (c *MerchantsupportTriggeractionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.triggeractionpayload) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment") + urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/merchantsupport/triggeraction") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29840,19 +21493,18 @@ func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "merchantId": strconv.FormatUint(c.merchantId, 10), - "orderId": c.orderId, + "merchantId": strconv.FormatInt(c.merchantId, 10), }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "content.orders.updateshipment" call. +// Do executes the "content.merchantsupport.triggeraction" call. // Any non-2xx status code is an error. Response headers are in either -// *OrdersUpdateShipmentResponse.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 *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) { +// *TriggerActionResponse.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 *MerchantsupportTriggeractionCall) Do(opts ...googleapi.CallOption) (*TriggerActionResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29871,7 +21523,7 @@ func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpda if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &OrdersUpdateShipmentResponse{ + ret := &TriggerActionResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, diff --git a/customsearch/v1/customsearch-api.json b/customsearch/v1/customsearch-api.json index 84291cf3bc3..9b212f8be43 100644 --- a/customsearch/v1/customsearch-api.json +++ b/customsearch/v1/customsearch-api.json @@ -124,6 +124,11 @@ "location": "query", "type": "string" }, + "enableAlternateSearchHandler": { + "description": "Optional. Enables routing of Programmable Search Engine requests to an alternate search handler.", + "location": "query", + "type": "boolean" + }, "exactTerms": { "description": "Identifies a phrase that all documents in the search results must contain.", "location": "query", @@ -426,6 +431,11 @@ "location": "query", "type": "string" }, + "enableAlternateSearchHandler": { + "description": "Optional. Enables routing of Programmable Search Engine requests to an alternate search handler.", + "location": "query", + "type": "boolean" + }, "exactTerms": { "description": "Identifies a phrase that all documents in the search results must contain.", "location": "query", @@ -702,7 +712,7 @@ } } }, - "revision": "20240417", + "revision": "20240821", "rootUrl": "https://customsearch.googleapis.com/", "schemas": { "Promotion": { diff --git a/customsearch/v1/customsearch-gen.go b/customsearch/v1/customsearch-gen.go index eecdd11797d..ab1c23ce769 100644 --- a/customsearch/v1/customsearch-gen.go +++ b/customsearch/v1/customsearch-gen.go @@ -1118,6 +1118,14 @@ func (c *CseListCall) DateRestrict(dateRestrict string) *CseListCall { return c } +// EnableAlternateSearchHandler sets the optional parameter +// "enableAlternateSearchHandler": Enables routing of Programmable Search +// Engine requests to an alternate search handler. +func (c *CseListCall) EnableAlternateSearchHandler(enableAlternateSearchHandler bool) *CseListCall { + c.urlParams_.Set("enableAlternateSearchHandler", fmt.Sprint(enableAlternateSearchHandler)) + return c +} + // ExactTerms sets the optional parameter "exactTerms": Identifies a phrase // that all documents in the search results must contain. func (c *CseListCall) ExactTerms(exactTerms string) *CseListCall { @@ -1583,6 +1591,14 @@ func (c *CseSiterestrictListCall) DateRestrict(dateRestrict string) *CseSiterest return c } +// EnableAlternateSearchHandler sets the optional parameter +// "enableAlternateSearchHandler": Enables routing of Programmable Search +// Engine requests to an alternate search handler. +func (c *CseSiterestrictListCall) EnableAlternateSearchHandler(enableAlternateSearchHandler bool) *CseSiterestrictListCall { + c.urlParams_.Set("enableAlternateSearchHandler", fmt.Sprint(enableAlternateSearchHandler)) + return c +} + // ExactTerms sets the optional parameter "exactTerms": Identifies a phrase // that all documents in the search results must contain. func (c *CseSiterestrictListCall) ExactTerms(exactTerms string) *CseSiterestrictListCall { diff --git a/dataflow/v1b3/dataflow-api.json b/dataflow/v1b3/dataflow-api.json index 44dd2943209..081758ab888 100644 --- a/dataflow/v1b3/dataflow-api.json +++ b/dataflow/v1b3/dataflow-api.json @@ -84,6 +84,11 @@ "endpointUrl": "https://dataflow.us-west2.rep.googleapis.com/", "location": "us-west2" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://dataflow.us-west3.rep.googleapis.com/", + "location": "us-west3" + }, { "description": "Regional Endpoint", "endpointUrl": "https://dataflow.us-west4.rep.googleapis.com/", @@ -1852,7 +1857,7 @@ "templates": { "methods": { "create": { - "description": "Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API.", + "description": "Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API. To create a job, we recommend using `projects.locations.templates.create` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.create` is not recommended, because your job will always start in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates", "httpMethod": "POST", "id": "dataflow.projects.locations.templates.create", @@ -1887,7 +1892,7 @@ ] }, "get": { - "description": "Get the template associated with a template.", + "description": "Get the template associated with a template. To get the template, we recommend using `projects.locations.templates.get` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.get` is not recommended, because only templates that are running in `us-central1` are retrieved.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get", "httpMethod": "GET", "id": "dataflow.projects.locations.templates.get", @@ -1935,7 +1940,7 @@ ] }, "launch": { - "description": "Launch a template.", + "description": "Launches a template. To launch a template, we recommend using `projects.locations.templates.launch` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.launch` is not recommended, because jobs launched from the template will always start in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:launch", "httpMethod": "POST", "id": "dataflow.projects.locations.templates.launch", @@ -2072,7 +2077,7 @@ "templates": { "methods": { "create": { - "description": "Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API.", + "description": "Creates a Cloud Dataflow job from a template. Do not enter confidential information when you supply string values using the API. To create a job, we recommend using `projects.locations.templates.create` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.create` is not recommended, because your job will always start in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/templates", "httpMethod": "POST", "id": "dataflow.projects.templates.create", @@ -2100,7 +2105,7 @@ ] }, "get": { - "description": "Get the template associated with a template.", + "description": "Get the template associated with a template. To get the template, we recommend using `projects.locations.templates.get` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.get` is not recommended, because only templates that are running in `us-central1` are retrieved.", "flatPath": "v1b3/projects/{projectId}/templates:get", "httpMethod": "GET", "id": "dataflow.projects.templates.get", @@ -2146,7 +2151,7 @@ ] }, "launch": { - "description": "Launch a template.", + "description": "Launches a template. To launch a template, we recommend using `projects.locations.templates.launch` with a [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using `projects.templates.launch` is not recommended, because jobs launched from the template will always start in `us-central1`.", "flatPath": "v1b3/projects/{projectId}/templates:launch", "httpMethod": "POST", "id": "dataflow.projects.templates.launch", @@ -2203,7 +2208,7 @@ } } }, - "revision": "20240709", + "revision": "20240817", "rootUrl": "https://dataflow.googleapis.com/", "schemas": { "ApproximateProgress": { @@ -4413,6 +4418,11 @@ "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the WorkItem's job.", "type": "string" }, + "projectNumber": { + "description": "Optional. The project number of the project this worker belongs to.", + "format": "int64", + "type": "string" + }, "requestedLeaseDuration": { "description": "The initial lease period.", "format": "google-duration", @@ -5375,6 +5385,11 @@ "description": "The [regional endpoint] (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that contains the WorkItem's job.", "type": "string" }, + "projectNumber": { + "description": "Optional. The project number of the project which owns the WorkItem's job.", + "format": "int64", + "type": "string" + }, "unifiedWorkerRequest": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -6746,6 +6761,16 @@ "description": "Map from user step names to state families.", "type": "object" }, + "userWorkerRunnerV1Settings": { + "description": "Binary encoded proto to control runtime behavior of the java runner v1 user worker.", + "format": "byte", + "type": "string" + }, + "userWorkerRunnerV2Settings": { + "description": "Binary encoded proto to control runtime behavior of the runner v2 user worker.", + "format": "byte", + "type": "string" + }, "windmillServiceEndpoint": { "description": "If present, the worker must use this endpoint to communicate with Windmill Service dispatchers, otherwise the worker must continue to use whatever endpoint it had been using.", "type": "string" diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go index bb50268af7d..4026cccb544 100644 --- a/dataflow/v1b3/dataflow-gen.go +++ b/dataflow/v1b3/dataflow-gen.go @@ -3164,6 +3164,9 @@ type LeaseWorkItemRequest struct { // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that // contains the WorkItem's job. Location string `json:"location,omitempty"` + // ProjectNumber: Optional. The project number of the project this worker + // belongs to. + ProjectNumber int64 `json:"projectNumber,omitempty,string"` // RequestedLeaseDuration: The initial lease period. RequestedLeaseDuration string `json:"requestedLeaseDuration,omitempty"` // UnifiedWorkerRequest: Untranslated bag-of-bytes WorkRequest from @@ -4320,6 +4323,9 @@ type ReportWorkItemStatusRequest struct { // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that // contains the WorkItem's job. Location string `json:"location,omitempty"` + // ProjectNumber: Optional. The project number of the project which owns the + // WorkItem's job. + ProjectNumber int64 `json:"projectNumber,omitempty,string"` // UnifiedWorkerRequest: Untranslated bag-of-bytes WorkProgressUpdateRequest // from UnifiedWorker. UnifiedWorkerRequest googleapi.RawMessage `json:"unifiedWorkerRequest,omitempty"` @@ -6007,6 +6013,12 @@ type StreamingConfigTask struct { StreamingComputationConfigs []*StreamingComputationConfig `json:"streamingComputationConfigs,omitempty"` // UserStepToStateFamilyNameMap: Map from user step names to state families. UserStepToStateFamilyNameMap map[string]string `json:"userStepToStateFamilyNameMap,omitempty"` + // UserWorkerRunnerV1Settings: Binary encoded proto to control runtime behavior + // of the java runner v1 user worker. + UserWorkerRunnerV1Settings string `json:"userWorkerRunnerV1Settings,omitempty"` + // UserWorkerRunnerV2Settings: Binary encoded proto to control runtime behavior + // of the runner v2 user worker. + UserWorkerRunnerV2Settings string `json:"userWorkerRunnerV2Settings,omitempty"` // WindmillServiceEndpoint: If present, the worker must use this endpoint to // communicate with Windmill Service dispatchers, otherwise the worker must // continue to use whatever endpoint it had been using. @@ -11837,7 +11849,12 @@ type ProjectsLocationsTemplatesCreateCall struct { } // Create: Creates a Cloud Dataflow job from a template. Do not enter -// confidential information when you supply string values using the API. +// confidential information when you supply string values using the API. To +// create a job, we recommend using `projects.locations.templates.create` with +// a [regional endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using +// `projects.templates.create` is not recommended, because your job will always +// start in `us-central1`. // // - location: The [regional endpoint] // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to @@ -11944,7 +11961,12 @@ type ProjectsLocationsTemplatesGetCall struct { header_ http.Header } -// Get: Get the template associated with a template. +// Get: Get the template associated with a template. To get the template, we +// recommend using `projects.locations.templates.get` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using +// `projects.templates.get` is not recommended, because only templates that are +// running in `us-central1` are retrieved. // // - location: The [regional endpoint] // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to @@ -12079,7 +12101,11 @@ type ProjectsLocationsTemplatesLaunchCall struct { header_ http.Header } -// Launch: Launch a template. +// Launch: Launches a template. To launch a template, we recommend using +// `projects.locations.templates.launch` with a [regional endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using +// `projects.templates.launch` is not recommended, because jobs launched from +// the template will always start in `us-central1`. // // - location: The [regional endpoint] // (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) to @@ -12460,7 +12486,12 @@ type ProjectsTemplatesCreateCall struct { } // Create: Creates a Cloud Dataflow job from a template. Do not enter -// confidential information when you supply string values using the API. +// confidential information when you supply string values using the API. To +// create a job, we recommend using `projects.locations.templates.create` with +// a [regional endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using +// `projects.templates.create` is not recommended, because your job will always +// start in `us-central1`. // // - projectId: The ID of the Cloud Platform project that the job belongs to. func (r *ProjectsTemplatesService) Create(projectId string, createjobfromtemplaterequest *CreateJobFromTemplateRequest) *ProjectsTemplatesCreateCall { @@ -12561,7 +12592,12 @@ type ProjectsTemplatesGetCall struct { header_ http.Header } -// Get: Get the template associated with a template. +// Get: Get the template associated with a template. To get the template, we +// recommend using `projects.locations.templates.get` with a [regional +// endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using +// `projects.templates.get` is not recommended, because only templates that are +// running in `us-central1` are retrieved. // // - projectId: The ID of the Cloud Platform project that the job belongs to. func (r *ProjectsTemplatesService) Get(projectId string) *ProjectsTemplatesGetCall { @@ -12698,7 +12734,11 @@ type ProjectsTemplatesLaunchCall struct { header_ http.Header } -// Launch: Launch a template. +// Launch: Launches a template. To launch a template, we recommend using +// `projects.locations.templates.launch` with a [regional endpoint] +// (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using +// `projects.templates.launch` is not recommended, because jobs launched from +// the template will always start in `us-central1`. // // - projectId: The ID of the Cloud Platform project that the job belongs to. func (r *ProjectsTemplatesService) Launch(projectId string, launchtemplateparameters *LaunchTemplateParameters) *ProjectsTemplatesLaunchCall { diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 29ebed027b3..017c9097240 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -1760,6 +1760,99 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "objects": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects/{objectsId}:getIamPolicy", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.objects.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+/objects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects/{objectsId}:setIamPolicy", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.objects.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+/objects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects/{objectsId}:testIamPermissions", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.objects.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+/objects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } }, "operations": { @@ -2125,7 +2218,7 @@ } } }, - "revision": "20240721", + "revision": "20240812", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -2532,6 +2625,7 @@ "MYSQL_8_0_35", "MYSQL_8_0_36", "MYSQL_8_0_37", + "MYSQL_8_4", "POSTGRES_9_6", "POSTGRES_11", "POSTGRES_10", @@ -2558,6 +2652,7 @@ "The database major version is MySQL 8.0 and the minor version is 35.", "The database major version is MySQL 8.0 and the minor version is 36.", "The database major version is MySQL 8.0 and the minor version is 37.", + "MySQL 8.4.", "PostgreSQL 9.6.", "PostgreSQL 11.", "PostgreSQL 10.", @@ -4820,6 +4915,43 @@ }, "type": "object" }, + "OracleAsmConfig": { + "description": "Configuration for Oracle Automatic Storage Management (ASM) connection.", + "id": "OracleAsmConfig", + "properties": { + "asmService": { + "description": "Required. ASM service name for the Oracle ASM connection.", + "type": "string" + }, + "hostname": { + "description": "Required. Hostname for the Oracle ASM connection.", + "type": "string" + }, + "password": { + "description": "Required. Input only. Password for the Oracle ASM connection.", + "type": "string" + }, + "passwordSet": { + "description": "Output only. Indicates whether a new password is included in the request.", + "readOnly": true, + "type": "boolean" + }, + "port": { + "description": "Required. Port for the Oracle ASM connection.", + "format": "int32", + "type": "integer" + }, + "ssl": { + "$ref": "SslConfig", + "description": "Optional. SSL configuration for the Oracle connection." + }, + "username": { + "description": "Required. Username for the Oracle ASM connection.", + "type": "string" + } + }, + "type": "object" + }, "OracleConnectionProfile": { "description": "Specifies connection parameters required specifically for Oracle databases.", "id": "OracleConnectionProfile", @@ -4836,6 +4968,10 @@ "description": "Required. The IP or hostname of the source Oracle database.", "type": "string" }, + "oracleAsmConfig": { + "$ref": "OracleAsmConfig", + "description": "Optional. Configuration for Oracle ASM connection." + }, "password": { "description": "Required. Input only. The password for the user that Database Migration Service will be using to connect to the database. This field is not returned on request, and the value is encrypted when stored in Database Migration Service.", "type": "string" diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index e7fc7e27f38..4e711297e3d 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -222,11 +222,23 @@ type ProjectsLocationsConversionWorkspacesMappingRulesService struct { func NewProjectsLocationsMigrationJobsService(s *Service) *ProjectsLocationsMigrationJobsService { rs := &ProjectsLocationsMigrationJobsService{s: s} + rs.Objects = NewProjectsLocationsMigrationJobsObjectsService(s) return rs } type ProjectsLocationsMigrationJobsService struct { s *Service + + Objects *ProjectsLocationsMigrationJobsObjectsService +} + +func NewProjectsLocationsMigrationJobsObjectsService(s *Service) *ProjectsLocationsMigrationJobsObjectsService { + rs := &ProjectsLocationsMigrationJobsObjectsService{s: s} + return rs +} + +type ProjectsLocationsMigrationJobsObjectsService struct { + s *Service } func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { @@ -790,6 +802,7 @@ type CloudSqlSettings struct { // version is 36. // "MYSQL_8_0_37" - The database major version is MySQL 8.0 and the minor // version is 37. + // "MYSQL_8_4" - MySQL 8.4. // "POSTGRES_9_6" - PostgreSQL 9.6. // "POSTGRES_11" - PostgreSQL 11. // "POSTGRES_10" - PostgreSQL 10. @@ -3158,6 +3171,42 @@ func (s Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// OracleAsmConfig: Configuration for Oracle Automatic Storage Management (ASM) +// connection. +type OracleAsmConfig struct { + // AsmService: Required. ASM service name for the Oracle ASM connection. + AsmService string `json:"asmService,omitempty"` + // Hostname: Required. Hostname for the Oracle ASM connection. + Hostname string `json:"hostname,omitempty"` + // Password: Required. Input only. Password for the Oracle ASM connection. + Password string `json:"password,omitempty"` + // PasswordSet: Output only. Indicates whether a new password is included in + // the request. + PasswordSet bool `json:"passwordSet,omitempty"` + // Port: Required. Port for the Oracle ASM connection. + Port int64 `json:"port,omitempty"` + // Ssl: Optional. SSL configuration for the Oracle connection. + Ssl *SslConfig `json:"ssl,omitempty"` + // Username: Required. Username for the Oracle ASM connection. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "AsmService") 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. "AsmService") 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 OracleAsmConfig) MarshalJSON() ([]byte, error) { + type NoMethod OracleAsmConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // OracleConnectionProfile: Specifies connection parameters required // specifically for Oracle databases. type OracleConnectionProfile struct { @@ -3167,6 +3216,8 @@ type OracleConnectionProfile struct { ForwardSshConnectivity *ForwardSshTunnelConnectivity `json:"forwardSshConnectivity,omitempty"` // Host: Required. The IP or hostname of the source Oracle database. Host string `json:"host,omitempty"` + // OracleAsmConfig: Optional. Configuration for Oracle ASM connection. + OracleAsmConfig *OracleAsmConfig `json:"oracleAsmConfig,omitempty"` // Password: Required. Input only. The password for the user that Database // Migration Service will be using to connect to the database. This field is // not returned on request, and the value is encrypted when stored in Database @@ -10856,6 +10907,347 @@ func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOpti return ret, nil } +type ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsMigrationJobsObjectsService) GetIamPolicy(resource string) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { + c := &ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy. Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected. Requests for policies with any +// conditional role bindings must specify version 3. Policies with no +// conditional role bindings may specify any valid value or leave the field +// unset. The policy in the response might use the policy version that you +// specified, or it might use a lower policy version. For example, if you +// specify version 3, but the policy has no conditional role bindings, the +// response uses version 1. To learn which resources support conditions in +// their IAM policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { + 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 *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { + 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 *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.migrationJobs.objects.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 *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsMigrationJobsObjectsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall { + c := &ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + 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 *ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall { + 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 *ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.migrationJobs.objects.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 *ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsMigrationJobsObjectsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall { + c := &ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + 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 *ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall { + 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 *ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.migrationJobs.objects.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.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 *ProjectsLocationsMigrationJobsObjectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsOperationsCancelCall struct { s *Service name string diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index e89d993714e..5d121278879 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -199,6 +199,129 @@ ] } } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "dataplex.organizations.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "dataplex.organizations.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "dataplex.organizations.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listOperations": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "dataplex.organizations.locations.operations.listOperations", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -2396,6 +2519,97 @@ } } }, + "entryLinkTypes": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryLinkTypes/{entryLinkTypesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.entryLinkTypes.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryLinkTypes/{entryLinkTypesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.entryLinkTypes.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entryLinkTypes/{entryLinkTypesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.entryLinkTypes.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/entryLinkTypes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "entryTypes": { "methods": { "create": { @@ -2742,17 +2956,201 @@ "required": true, "type": "string" } - }, - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1TestIamPermissionsRequest" - }, - "response": { - "$ref": "GoogleIamV1TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "categories": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/categories/{categoriesId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.glossaries.categories.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/categories/{categoriesId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.categories.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/categories/{categoriesId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.categories.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/categories/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "terms": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/terms/{termsId}:getIamPolicy", + "httpMethod": "GET", + "id": "dataplex.projects.locations.glossaries.terms.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset.The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/terms/{termsId}:setIamPolicy", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.terms.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/terms/{termsId}:testIamPermissions", + "httpMethod": "POST", + "id": "dataplex.projects.locations.glossaries.terms.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/terms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -5599,9 +5997,397 @@ } } }, - "revision": "20240802", + "revision": "20240820", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { + "CloudReliabilityZicyWs3DataplaneProtosAssetLocation": { + "description": "Provides the mapping of a cloud asset to a direct physical location or to a proxy that defines the location on its behalf.", + "id": "CloudReliabilityZicyWs3DataplaneProtosAssetLocation", + "properties": { + "ccfeRmsPath": { + "description": "Spanner path of the CCFE RMS database. It is only applicable for CCFE tenants that use CCFE RMS for storing resource metadata.", + "type": "string" + }, + "expected": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations", + "description": "Defines the customer expectation around ZI/ZS for this asset and ZI/ZS state of the region at the time of asset creation." + }, + "extraParameters": { + "description": "Defines extra parameters required for specific asset types.", + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosExtraParameter" + }, + "type": "array" + }, + "locationData": { + "description": "Contains all kinds of physical location definitions for this asset.", + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosLocationData" + }, + "type": "array" + }, + "parentAsset": { + "description": "Defines parents assets if any in order to allow later generation of child_asset_location data via child assets.", + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosCloudAsset" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations": { + "id": "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations", + "properties": { + "requirementOverride": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride", + "description": "Explicit overrides for ZI and ZS requirements to be used for resources that should be excluded from ZI/ZS verification logic." + }, + "ziOrgPolicy": { + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "ziRegionPolicy": { + "enum": [ + "ZI_REGION_POLICY_UNSPECIFIED", + "ZI_REGION_POLICY_UNKNOWN", + "ZI_REGION_POLICY_NOT_SET", + "ZI_REGION_POLICY_FAIL_OPEN", + "ZI_REGION_POLICY_FAIL_CLOSED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "ziRegionState": { + "enum": [ + "ZI_REGION_UNSPECIFIED", + "ZI_REGION_UNKNOWN", + "ZI_REGION_NOT_ENABLED", + "ZI_REGION_ENABLED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zoneIsolation": { + "deprecated": true, + "description": "Deprecated: use zi_org_policy, zi_region_policy and zi_region_state instead for setting ZI expectations as per go/zicy-publish-physical-location.", + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "zoneSeparation": { + "deprecated": true, + "description": "Deprecated: use zs_org_policy, and zs_region_stateinstead for setting Zs expectations as per go/zicy-publish-physical-location.", + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zsOrgPolicy": { + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + }, + "zsRegionState": { + "enum": [ + "ZS_REGION_UNSPECIFIED", + "ZS_REGION_UNKNOWN", + "ZS_REGION_NOT_ENABLED", + "ZS_REGION_ENABLED" + ], + "enumDescriptions": [ + "", + "To be used if tracking of the asset ZS-bit is not available", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride": { + "id": "CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride", + "properties": { + "ziOverride": { + "enum": [ + "ZI_UNSPECIFIED", + "ZI_UNKNOWN", + "ZI_NOT_REQUIRED", + "ZI_PREFERRED", + "ZI_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "", + "" + ], + "type": "string" + }, + "zsOverride": { + "enum": [ + "ZS_UNSPECIFIED", + "ZS_UNKNOWN", + "ZS_NOT_REQUIRED", + "ZS_REQUIRED" + ], + "enumDescriptions": [ + "", + "To be used if tracking is not available", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation": { + "description": "Policy ID that identified data placement in Blobstore as per go/blobstore-user-guide#data-metadata-placement-and-failure-domains", + "id": "CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation", + "properties": { + "policyId": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosCloudAsset": { + "id": "CloudReliabilityZicyWs3DataplaneProtosCloudAsset", + "properties": { + "assetName": { + "type": "string" + }, + "assetType": { + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition": { + "id": "CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition", + "properties": { + "childAsset": { + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosCloudAsset" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment": { + "id": "CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment", + "properties": { + "location": { + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosLocationAssignment" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosExtraParameter": { + "description": "Defines parameters that should only be used for specific asset types.", + "id": "CloudReliabilityZicyWs3DataplaneProtosExtraParameter", + "properties": { + "regionalMigDistributionPolicy": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy", + "description": "Details about zones used by regional compute.googleapis.com/InstanceGroupManager to create instances." + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosLocationAssignment": { + "id": "CloudReliabilityZicyWs3DataplaneProtosLocationAssignment", + "properties": { + "location": { + "type": "string" + }, + "locationType": { + "enum": [ + "UNSPECIFIED", + "CLUSTER", + "POP", + "CLOUD_ZONE", + "CLOUD_REGION", + "MULTI_REGION_GEO", + "MULTI_REGION_JURISDICTION", + "GLOBAL", + "OTHER" + ], + "enumDescriptions": [ + "", + "1-10: Physical failure domains.", + "", + "11-20: Logical failure domains.", + "", + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosLocationData": { + "id": "CloudReliabilityZicyWs3DataplaneProtosLocationData", + "properties": { + "blobstoreLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation" + }, + "childAssetLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition" + }, + "directLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment" + }, + "gcpProjectProxy": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy" + }, + "placerLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosPlacerLocation" + }, + "spannerLocation": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosSpannerLocation" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosPlacerLocation": { + "description": "Message describing that the location of the customer resource is tied to placer allocations", + "id": "CloudReliabilityZicyWs3DataplaneProtosPlacerLocation", + "properties": { + "placerConfig": { + "description": "Directory with a config related to it in placer (e.g. \"/placer/prod/home/my-root/my-dir\")", + "type": "string" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy": { + "description": "To be used for specifying the intended distribution of regional compute.googleapis.com/InstanceGroupManager instances", + "id": "CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy", + "properties": { + "targetShape": { + "description": "The shape in which the group converges around distribution of resources. Instance of proto2 enum", + "format": "int32", + "type": "integer" + }, + "zones": { + "description": "Cloud zones used by regional MIG to create instances.", + "items": { + "$ref": "CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosSpannerLocation": { + "id": "CloudReliabilityZicyWs3DataplaneProtosSpannerLocation", + "properties": { + "backupName": { + "description": "Set of backups used by the resource with name in the same format as what is available at http://table/spanner_automon.backup_metadata", + "items": { + "type": "string" + }, + "type": "array" + }, + "dbName": { + "description": "Set of databases used by the resource in format /span//", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy": { + "id": "CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy", + "properties": { + "projectNumbers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration": { + "id": "CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration", + "properties": { + "zone": { + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } ", "id": "Empty", diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index 07eb76e2755..eccf899e4a8 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -172,6 +172,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} rs.EncryptionConfigs = NewOrganizationsLocationsEncryptionConfigsService(s) + rs.Operations = NewOrganizationsLocationsOperationsService(s) return rs } @@ -179,6 +180,8 @@ type OrganizationsLocationsService struct { s *Service EncryptionConfigs *OrganizationsLocationsEncryptionConfigsService + + Operations *OrganizationsLocationsOperationsService } func NewOrganizationsLocationsEncryptionConfigsService(s *Service) *OrganizationsLocationsEncryptionConfigsService { @@ -190,6 +193,15 @@ type OrganizationsLocationsEncryptionConfigsService struct { s *Service } +func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService { + rs := &OrganizationsLocationsOperationsService{s: s} + return rs +} + +type OrganizationsLocationsOperationsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -209,6 +221,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.DataScans = NewProjectsLocationsDataScansService(s) rs.DataTaxonomies = NewProjectsLocationsDataTaxonomiesService(s) rs.EntryGroups = NewProjectsLocationsEntryGroupsService(s) + rs.EntryLinkTypes = NewProjectsLocationsEntryLinkTypesService(s) rs.EntryTypes = NewProjectsLocationsEntryTypesService(s) rs.Glossaries = NewProjectsLocationsGlossariesService(s) rs.GovernanceRules = NewProjectsLocationsGovernanceRulesService(s) @@ -231,6 +244,8 @@ type ProjectsLocationsService struct { EntryGroups *ProjectsLocationsEntryGroupsService + EntryLinkTypes *ProjectsLocationsEntryLinkTypesService + EntryTypes *ProjectsLocationsEntryTypesService Glossaries *ProjectsLocationsGlossariesService @@ -325,6 +340,15 @@ type ProjectsLocationsEntryGroupsEntriesService struct { s *Service } +func NewProjectsLocationsEntryLinkTypesService(s *Service) *ProjectsLocationsEntryLinkTypesService { + rs := &ProjectsLocationsEntryLinkTypesService{s: s} + return rs +} + +type ProjectsLocationsEntryLinkTypesService struct { + s *Service +} + func NewProjectsLocationsEntryTypesService(s *Service) *ProjectsLocationsEntryTypesService { rs := &ProjectsLocationsEntryTypesService{s: s} return rs @@ -336,11 +360,35 @@ type ProjectsLocationsEntryTypesService struct { func NewProjectsLocationsGlossariesService(s *Service) *ProjectsLocationsGlossariesService { rs := &ProjectsLocationsGlossariesService{s: s} + rs.Categories = NewProjectsLocationsGlossariesCategoriesService(s) + rs.Terms = NewProjectsLocationsGlossariesTermsService(s) return rs } type ProjectsLocationsGlossariesService struct { s *Service + + Categories *ProjectsLocationsGlossariesCategoriesService + + Terms *ProjectsLocationsGlossariesTermsService +} + +func NewProjectsLocationsGlossariesCategoriesService(s *Service) *ProjectsLocationsGlossariesCategoriesService { + rs := &ProjectsLocationsGlossariesCategoriesService{s: s} + return rs +} + +type ProjectsLocationsGlossariesCategoriesService struct { + s *Service +} + +func NewProjectsLocationsGlossariesTermsService(s *Service) *ProjectsLocationsGlossariesTermsService { + rs := &ProjectsLocationsGlossariesTermsService{s: s} + return rs +} + +type ProjectsLocationsGlossariesTermsService struct { + s *Service } func NewProjectsLocationsGovernanceRulesService(s *Service) *ProjectsLocationsGovernanceRulesService { @@ -535,6 +583,428 @@ type ProjectsLocationsOperationsService struct { s *Service } +// CloudReliabilityZicyWs3DataplaneProtosAssetLocation: Provides the mapping of +// a cloud asset to a direct physical location or to a proxy that defines the +// location on its behalf. +type CloudReliabilityZicyWs3DataplaneProtosAssetLocation struct { + // CcfeRmsPath: Spanner path of the CCFE RMS database. It is only applicable + // for CCFE tenants that use CCFE RMS for storing resource metadata. + CcfeRmsPath string `json:"ccfeRmsPath,omitempty"` + // Expected: Defines the customer expectation around ZI/ZS for this asset and + // ZI/ZS state of the region at the time of asset creation. + Expected *CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations `json:"expected,omitempty"` + // ExtraParameters: Defines extra parameters required for specific asset types. + ExtraParameters []*CloudReliabilityZicyWs3DataplaneProtosExtraParameter `json:"extraParameters,omitempty"` + // LocationData: Contains all kinds of physical location definitions for this + // asset. + LocationData []*CloudReliabilityZicyWs3DataplaneProtosLocationData `json:"locationData,omitempty"` + // ParentAsset: Defines parents assets if any in order to allow later + // generation of child_asset_location data via child assets. + ParentAsset []*CloudReliabilityZicyWs3DataplaneProtosCloudAsset `json:"parentAsset,omitempty"` + // ForceSendFields is a list of field names (e.g. "CcfeRmsPath") 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. "CcfeRmsPath") 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 CloudReliabilityZicyWs3DataplaneProtosAssetLocation) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosAssetLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations struct { + // RequirementOverride: Explicit overrides for ZI and ZS requirements to be + // used for resources that should be excluded from ZI/ZS verification logic. + RequirementOverride *CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride `json:"requirementOverride,omitempty"` + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZiOrgPolicy string `json:"ziOrgPolicy,omitempty"` + // Possible values: + // "ZI_REGION_POLICY_UNSPECIFIED" + // "ZI_REGION_POLICY_UNKNOWN" - To be used if tracking is not available + // "ZI_REGION_POLICY_NOT_SET" + // "ZI_REGION_POLICY_FAIL_OPEN" + // "ZI_REGION_POLICY_FAIL_CLOSED" + ZiRegionPolicy string `json:"ziRegionPolicy,omitempty"` + // Possible values: + // "ZI_REGION_UNSPECIFIED" + // "ZI_REGION_UNKNOWN" - To be used if tracking is not available + // "ZI_REGION_NOT_ENABLED" + // "ZI_REGION_ENABLED" + ZiRegionState string `json:"ziRegionState,omitempty"` + // ZoneIsolation: Deprecated: use zi_org_policy, zi_region_policy and + // zi_region_state instead for setting ZI expectations as per + // go/zicy-publish-physical-location. + // + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZoneIsolation string `json:"zoneIsolation,omitempty"` + // ZoneSeparation: Deprecated: use zs_org_policy, and zs_region_stateinstead + // for setting Zs expectations as per go/zicy-publish-physical-location. + // + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZoneSeparation string `json:"zoneSeparation,omitempty"` + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZsOrgPolicy string `json:"zsOrgPolicy,omitempty"` + // Possible values: + // "ZS_REGION_UNSPECIFIED" + // "ZS_REGION_UNKNOWN" - To be used if tracking of the asset ZS-bit is not + // available + // "ZS_REGION_NOT_ENABLED" + // "ZS_REGION_ENABLED" + ZsRegionState string `json:"zsRegionState,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequirementOverride") 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. "RequirementOverride") 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 CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectations + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride struct { + // Possible values: + // "ZI_UNSPECIFIED" + // "ZI_UNKNOWN" - To be used if tracking is not available + // "ZI_NOT_REQUIRED" + // "ZI_PREFERRED" + // "ZI_REQUIRED" + ZiOverride string `json:"ziOverride,omitempty"` + // Possible values: + // "ZS_UNSPECIFIED" + // "ZS_UNKNOWN" - To be used if tracking is not available + // "ZS_NOT_REQUIRED" + // "ZS_REQUIRED" + ZsOverride string `json:"zsOverride,omitempty"` + // ForceSendFields is a list of field names (e.g. "ZiOverride") 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. "ZiOverride") 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 CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosAssetLocationIsolationExpectationsRequirementOverride + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation: Policy ID that +// identified data placement in Blobstore as per +// go/blobstore-user-guide#data-metadata-placement-and-failure-domains +type CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation struct { + PolicyId []string `json:"policyId,omitempty"` + // ForceSendFields is a list of field names (e.g. "PolicyId") 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. "PolicyId") 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 CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosCloudAsset struct { + AssetName string `json:"assetName,omitempty"` + AssetType string `json:"assetType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssetName") 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. "AssetName") 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 CloudReliabilityZicyWs3DataplaneProtosCloudAsset) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosCloudAsset + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition struct { + ChildAsset []*CloudReliabilityZicyWs3DataplaneProtosCloudAsset `json:"childAsset,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChildAsset") 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. "ChildAsset") 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 CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment struct { + Location []*CloudReliabilityZicyWs3DataplaneProtosLocationAssignment `json:"location,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") 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. "Location") 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 CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudReliabilityZicyWs3DataplaneProtosExtraParameter: Defines parameters +// that should only be used for specific asset types. +type CloudReliabilityZicyWs3DataplaneProtosExtraParameter struct { + // RegionalMigDistributionPolicy: Details about zones used by regional + // compute.googleapis.com/InstanceGroupManager to create instances. + RegionalMigDistributionPolicy *CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy `json:"regionalMigDistributionPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RegionalMigDistributionPolicy") 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. "RegionalMigDistributionPolicy") + // 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 CloudReliabilityZicyWs3DataplaneProtosExtraParameter) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosExtraParameter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosLocationAssignment struct { + Location string `json:"location,omitempty"` + // Possible values: + // "UNSPECIFIED" + // "CLUSTER" - 1-10: Physical failure domains. + // "POP" + // "CLOUD_ZONE" - 11-20: Logical failure domains. + // "CLOUD_REGION" + // "MULTI_REGION_GEO" + // "MULTI_REGION_JURISDICTION" + // "GLOBAL" + // "OTHER" + LocationType string `json:"locationType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") 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. "Location") 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 CloudReliabilityZicyWs3DataplaneProtosLocationAssignment) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosLocationAssignment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosLocationData struct { + BlobstoreLocation *CloudReliabilityZicyWs3DataplaneProtosBlobstoreLocation `json:"blobstoreLocation,omitempty"` + ChildAssetLocation *CloudReliabilityZicyWs3DataplaneProtosCloudAssetComposition `json:"childAssetLocation,omitempty"` + DirectLocation *CloudReliabilityZicyWs3DataplaneProtosDirectLocationAssignment `json:"directLocation,omitempty"` + GcpProjectProxy *CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy `json:"gcpProjectProxy,omitempty"` + PlacerLocation *CloudReliabilityZicyWs3DataplaneProtosPlacerLocation `json:"placerLocation,omitempty"` + SpannerLocation *CloudReliabilityZicyWs3DataplaneProtosSpannerLocation `json:"spannerLocation,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlobstoreLocation") 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. "BlobstoreLocation") 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 CloudReliabilityZicyWs3DataplaneProtosLocationData) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosLocationData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudReliabilityZicyWs3DataplaneProtosPlacerLocation: Message describing +// that the location of the customer resource is tied to placer allocations +type CloudReliabilityZicyWs3DataplaneProtosPlacerLocation struct { + // PlacerConfig: Directory with a config related to it in placer (e.g. + // "/placer/prod/home/my-root/my-dir") + PlacerConfig string `json:"placerConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PlacerConfig") 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. "PlacerConfig") 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 CloudReliabilityZicyWs3DataplaneProtosPlacerLocation) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosPlacerLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy: To be +// used for specifying the intended distribution of regional +// compute.googleapis.com/InstanceGroupManager instances +type CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy struct { + // TargetShape: The shape in which the group converges around distribution of + // resources. Instance of proto2 enum + TargetShape int64 `json:"targetShape,omitempty"` + // Zones: Cloud zones used by regional MIG to create instances. + Zones []*CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration `json:"zones,omitempty"` + // ForceSendFields is a list of field names (e.g. "TargetShape") 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. "TargetShape") 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 CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosRegionalMigDistributionPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosSpannerLocation struct { + // BackupName: Set of backups used by the resource with name in the same format + // as what is available at http://table/spanner_automon.backup_metadata + BackupName []string `json:"backupName,omitempty"` + // DbName: Set of databases used by the resource in format /span// + DbName []string `json:"dbName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupName") 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. "BackupName") 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 CloudReliabilityZicyWs3DataplaneProtosSpannerLocation) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosSpannerLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy struct { + ProjectNumbers []string `json:"projectNumbers,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectNumbers") 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. "ProjectNumbers") 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 CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosTenantProjectProxy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration struct { + Zone string `json:"zone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Zone") 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. "Zone") 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 CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod CloudReliabilityZicyWs3DataplaneProtosZoneConfiguration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use it as // the request or the response type of an API method. For instance: service Foo @@ -8244,66 +8714,68 @@ func (c *OrganizationsLocationsEncryptionConfigsTestIamPermissionsCall) Do(opts return ret, nil } -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *OrganizationsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *OrganizationsLocationsOperationsCancelCall { + c := &OrganizationsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest 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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall { 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall { 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 *ProjectsLocationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) 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 *OrganizationsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -8314,13 +8786,12 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.get" call. +// Do executes the "dataplex.organizations.locations.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { +// *Empty.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 *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8339,7 +8810,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationLocation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8352,90 +8823,57 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type ProjectsLocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists information about the supported locations for this service. +// Delete: Deletes a long-running operation. This method indicates that the +// client is no longer interested in the operation result. It does not cancel +// the operation. If the server doesn't support this method, it returns +// google.rpc.Code.UNIMPLEMENTED. // -// - name: The resource that owns the locations collection, if applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *OrganizationsLocationsOperationsService) Delete(name string) *OrganizationsLocationsOperationsDeleteCall { + c := &OrganizationsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": A filter to narrow down results -// to a preferred subset. The filtering language accepts strings like -// "displayName=tokyo", and is documented in more detail in AIP-160 -// (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token received -// from the next_page_token field in the response. Send that page token to -// receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsDeleteCall { 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsOperationsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsOperationsDeleteCall { 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 *ProjectsLocationsListCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -8446,13 +8884,12 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.list" call. +// Do executes the "dataplex.organizations.locations.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { +// *Empty.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 *OrganizationsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8471,7 +8908,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8484,28 +8921,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) 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 ProjectsLocationsLookupEntryCall struct { +type OrganizationsLocationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -8514,68 +8930,21 @@ type ProjectsLocationsLookupEntryCall struct { header_ http.Header } -// LookupEntry: Looks up a single Entry by name using the permission on the -// source system. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: The project to which the request should be attributed in the -// following form: projects/{project}/locations/{location}. -func (r *ProjectsLocationsService) LookupEntry(name string) *ProjectsLocationsLookupEntryCall { - c := &ProjectsLocationsLookupEntryCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { + c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects -// returned to the provided aspect types. It only works for CUSTOM view. -func (c *ProjectsLocationsLookupEntryCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) - return c -} - -// Entry sets the optional parameter "entry": Required. The resource name of -// the Entry: -// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{en -// try}. -func (c *ProjectsLocationsLookupEntryCall) Entry(entry string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.Set("entry", entry) - return c -} - -// Paths sets the optional parameter "paths": Limits the aspects returned to -// those associated with the provided paths within the Entry. It only works for -// CUSTOM view. -func (c *ProjectsLocationsLookupEntryCall) Paths(paths ...string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - return c -} - -// View sets the optional parameter "view": View to control which parts of an -// entry the service should return. -// -// Possible values: -// -// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. -// "BASIC" - Returns entry only, without aspects. -// "FULL" - Returns all required aspects as well as the keys of all -// -// non-required aspects. -// -// "CUSTOM" - Returns aspects matching custom fields in GetEntryRequest. If -// -// the number of aspects exceeds 100, the first 100 will be returned. -// -// "ALL" - Returns all aspects. If the number of aspects exceeds 100, the -// -// first 100 will be returned. -func (c *ProjectsLocationsLookupEntryCall) View(view string) *ProjectsLocationsLookupEntryCall { - c.urlParams_.Set("view", view) - 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 *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupEntryCall { +func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8583,27 +8952,27 @@ func (c *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *Project // 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 *ProjectsLocationsLookupEntryCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupEntryCall { +func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsLookupEntryCall) Context(ctx context.Context) *ProjectsLocationsLookupEntryCall { +func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { 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 *ProjectsLocationsLookupEntryCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -8611,7 +8980,7 @@ func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lookupEntry") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8624,13 +8993,13 @@ func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.lookupEntry" call. +// Do executes the "dataplex.organizations.locations.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8649,7 +9018,7 @@ func (c *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8662,93 +9031,88 @@ func (c *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsSearchEntriesCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsListOperationsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SearchEntries: Searches for Entries matching the given query and scope. +// ListOperations: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// UNIMPLEMENTED. // -// - name: The project to which the request should be attributed in the -// following form: projects/{project}/locations/{location}. -func (r *ProjectsLocationsService) SearchEntries(name string) *ProjectsLocationsSearchEntriesCall { - c := &ProjectsLocationsSearchEntriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsOperationsService) ListOperations(name string) *OrganizationsLocationsOperationsListOperationsCall { + c := &OrganizationsLocationsOperationsListOperationsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// OrderBy sets the optional parameter "orderBy": Specifies the ordering of -// results. -func (c *ProjectsLocationsSearchEntriesCall) OrderBy(orderBy string) *ProjectsLocationsSearchEntriesCall { - c.urlParams_.Set("orderBy", orderBy) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *OrganizationsLocationsOperationsListOperationsCall) Filter(filter string) *OrganizationsLocationsOperationsListOperationsCall { + c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Number of results in the -// search page. If <=0, then defaults to 10. Max limit for page_size is 1000. -// Throws an invalid argument for page_size > 1000. -func (c *ProjectsLocationsSearchEntriesCall) PageSize(pageSize int64) *ProjectsLocationsSearchEntriesCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *OrganizationsLocationsOperationsListOperationsCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListOperationsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous SearchEntries call. Provide this to retrieve the subsequent page. -func (c *ProjectsLocationsSearchEntriesCall) PageToken(pageToken string) *ProjectsLocationsSearchEntriesCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *OrganizationsLocationsOperationsListOperationsCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListOperationsCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Query sets the optional parameter "query": Required. The query against which -// entries in scope should be matched. -func (c *ProjectsLocationsSearchEntriesCall) Query(query string) *ProjectsLocationsSearchEntriesCall { - c.urlParams_.Set("query", query) - return c -} - -// Scope sets the optional parameter "scope": The scope under which the search -// should be operating. It must either be organizations/ or projects/. If it is -// unspecified, it defaults to the organization where the project provided in -// name is located. -func (c *ProjectsLocationsSearchEntriesCall) Scope(scope string) *ProjectsLocationsSearchEntriesCall { - c.urlParams_.Set("scope", scope) - 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 *ProjectsLocationsSearchEntriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchEntriesCall { +func (c *OrganizationsLocationsOperationsListOperationsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListOperationsCall { 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 *OrganizationsLocationsOperationsListOperationsCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListOperationsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSearchEntriesCall) Context(ctx context.Context) *ProjectsLocationsSearchEntriesCall { +func (c *OrganizationsLocationsOperationsListOperationsCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListOperationsCall { 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 *ProjectsLocationsSearchEntriesCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsListOperationsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsListOperationsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:searchEntries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -8759,13 +9123,13 @@ func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.searchEntries" call. +// Do executes the "dataplex.organizations.locations.operations.listOperations" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1SearchEntriesResponse.ServerResponse.Header or (if a +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1SearchEntriesResponse, error) { +func (c *OrganizationsLocationsOperationsListOperationsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8784,7 +9148,7 @@ func (c *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1SearchEntriesResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8800,7 +9164,7 @@ func (c *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (* // 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 *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1SearchEntriesResponse) error) error { +func (c *OrganizationsLocationsOperationsListOperationsCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -8818,94 +9182,83 @@ func (c *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(* } } -type ProjectsLocationsAspectTypesCreateCall struct { - s *Service - parent string - googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an AspectType. +// Get: Gets information about a location. // -// - parent: The resource name of the AspectType, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsAspectTypesService) Create(parent string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesCreateCall { - c := &ProjectsLocationsAspectTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype - return c -} - -// AspectTypeId sets the optional parameter "aspectTypeId": Required. -// AspectType identifier. -func (c *ProjectsLocationsAspectTypesCreateCall) AspectTypeId(aspectTypeId string) *ProjectsLocationsAspectTypesCreateCall { - c.urlParams_.Set("aspectTypeId", aspectTypeId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsAspectTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsAspectTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesCreateCall { +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesCreateCall { +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 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 *ProjectsLocationsAspectTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1aspecttype) - if err != nil { - return nil, err +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aspectTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.create" call. +// Do executes the "dataplex.projects.locations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudLocationLocation.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 *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8924,7 +9277,7 @@ func (c *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudLocationLocation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8937,64 +9290,90 @@ func (c *ProjectsLocationsAspectTypesCreateCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsAspectTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an AspectType. +// List: Lists information about the supported locations for this service. // -// - name: The resource name of the AspectType: -// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ -// id}. -func (r *ProjectsLocationsAspectTypesService) Delete(name string) *ProjectsLocationsAspectTypesDeleteCall { - c := &ProjectsLocationsAspectTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value, the DeleteAspectTypeRequest method -// returns an ABORTED error response. -func (c *ProjectsLocationsAspectTypesDeleteCall) Etag(etag string) *ProjectsLocationsAspectTypesDeleteCall { - c.urlParams_.Set("etag", etag) +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the next_page_token field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesDeleteCall { +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesDeleteCall { +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 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 *ProjectsLocationsAspectTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -9005,13 +9384,13 @@ func (c *ProjectsLocationsAspectTypesDeleteCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.delete" call. +// Do executes the "dataplex.projects.locations.list" 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 +// *GoogleCloudLocationListLocationsResponse.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 *ProjectsLocationsAspectTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9030,7 +9409,7 @@ func (c *ProjectsLocationsAspectTypesDeleteCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudLocationListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9043,7 +9422,28 @@ func (c *ProjectsLocationsAspectTypesDeleteCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsAspectTypesGetCall struct { +// 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) 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 ProjectsLocationsLookupEntryCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -9052,49 +9452,1553 @@ type ProjectsLocationsAspectTypesGetCall struct { header_ http.Header } -// Get: Gets an AspectType. +// LookupEntry: Looks up a single Entry by name using the permission on the +// source system. // -// - name: The resource name of the AspectType: -// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ -// id}. -func (r *ProjectsLocationsAspectTypesService) Get(name string) *ProjectsLocationsAspectTypesGetCall { - c := &ProjectsLocationsAspectTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The project to which the request should be attributed in the +// following form: projects/{project}/locations/{location}. +func (r *ProjectsLocationsService) LookupEntry(name string) *ProjectsLocationsLookupEntryCall { + c := &ProjectsLocationsLookupEntryCall{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 *ProjectsLocationsAspectTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects +// returned to the provided aspect types. It only works for CUSTOM view. +func (c *ProjectsLocationsLookupEntryCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) 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 *ProjectsLocationsAspectTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetCall { - c.ifNoneMatch_ = entityTag +// Entry sets the optional parameter "entry": Required. The resource name of +// the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{en +// try}. +func (c *ProjectsLocationsLookupEntryCall) Entry(entry string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.Set("entry", entry) + return c +} + +// Paths sets the optional parameter "paths": Limits the aspects returned to +// those associated with the provided paths within the Entry. It only works for +// CUSTOM view. +func (c *ProjectsLocationsLookupEntryCall) Paths(paths ...string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// View sets the optional parameter "view": View to control which parts of an +// entry the service should return. +// +// Possible values: +// +// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. +// "BASIC" - Returns entry only, without aspects. +// "FULL" - Returns all required aspects as well as the keys of all +// +// non-required aspects. +// +// "CUSTOM" - Returns aspects matching custom fields in GetEntryRequest. If +// +// the number of aspects exceeds 100, the first 100 will be returned. +// +// "ALL" - Returns all aspects. If the number of aspects exceeds 100, the +// +// first 100 will be returned. +func (c *ProjectsLocationsLookupEntryCall) View(view string) *ProjectsLocationsLookupEntryCall { + c.urlParams_.Set("view", view) + 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 *ProjectsLocationsLookupEntryCall) Fields(s ...googleapi.Field) *ProjectsLocationsLookupEntryCall { + 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 *ProjectsLocationsLookupEntryCall) IfNoneMatch(entityTag string) *ProjectsLocationsLookupEntryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsLookupEntryCall) Context(ctx context.Context) *ProjectsLocationsLookupEntryCall { + 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 *ProjectsLocationsLookupEntryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLookupEntryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lookupEntry") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.lookupEntry" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsLookupEntryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, 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 := &GoogleCloudDataplexV1Entry{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsSearchEntriesCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchEntries: Searches for Entries matching the given query and scope. +// +// - name: The project to which the request should be attributed in the +// following form: projects/{project}/locations/{location}. +func (r *ProjectsLocationsService) SearchEntries(name string) *ProjectsLocationsSearchEntriesCall { + c := &ProjectsLocationsSearchEntriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering of +// results. +func (c *ProjectsLocationsSearchEntriesCall) OrderBy(orderBy string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of results in the +// search page. If <=0, then defaults to 10. Max limit for page_size is 1000. +// Throws an invalid argument for page_size > 1000. +func (c *ProjectsLocationsSearchEntriesCall) PageSize(pageSize int64) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous SearchEntries call. Provide this to retrieve the subsequent page. +func (c *ProjectsLocationsSearchEntriesCall) PageToken(pageToken string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": Required. The query against which +// entries in scope should be matched. +func (c *ProjectsLocationsSearchEntriesCall) Query(query string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("query", query) + return c +} + +// Scope sets the optional parameter "scope": The scope under which the search +// should be operating. It must either be organizations/ or projects/. If it is +// unspecified, it defaults to the organization where the project provided in +// name is located. +func (c *ProjectsLocationsSearchEntriesCall) Scope(scope string) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("scope", scope) + 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 *ProjectsLocationsSearchEntriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsSearchEntriesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSearchEntriesCall) Context(ctx context.Context) *ProjectsLocationsSearchEntriesCall { + 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 *ProjectsLocationsSearchEntriesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSearchEntriesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:searchEntries") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.searchEntries" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1SearchEntriesResponse.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 *ProjectsLocationsSearchEntriesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1SearchEntriesResponse, 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 := &GoogleCloudDataplexV1SearchEntriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsSearchEntriesCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1SearchEntriesResponse) 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 ProjectsLocationsAspectTypesCreateCall struct { + s *Service + parent string + googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an AspectType. +// +// - parent: The resource name of the AspectType, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsAspectTypesService) Create(parent string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesCreateCall { + c := &ProjectsLocationsAspectTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype + return c +} + +// AspectTypeId sets the optional parameter "aspectTypeId": Required. +// AspectType identifier. +func (c *ProjectsLocationsAspectTypesCreateCall) AspectTypeId(aspectTypeId string) *ProjectsLocationsAspectTypesCreateCall { + c.urlParams_.Set("aspectTypeId", aspectTypeId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": The service +// validates the request without performing any mutations. The default is +// false. +func (c *ProjectsLocationsAspectTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsAspectTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesCreateCall { + 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 *ProjectsLocationsAspectTypesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1aspecttype) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aspectTypes") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.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 *ProjectsLocationsAspectTypesCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an AspectType. +// +// - name: The resource name of the AspectType: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ +// id}. +func (r *ProjectsLocationsAspectTypesService) Delete(name string) *ProjectsLocationsAspectTypesDeleteCall { + c := &ProjectsLocationsAspectTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": If the client provided etag value +// does not match the current etag value, the DeleteAspectTypeRequest method +// returns an ABORTED error response. +func (c *ProjectsLocationsAspectTypesDeleteCall) Etag(etag string) *ProjectsLocationsAspectTypesDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *ProjectsLocationsAspectTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesDeleteCall { + 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 *ProjectsLocationsAspectTypesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.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 *ProjectsLocationsAspectTypesDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an AspectType. +// +// - name: The resource name of the AspectType: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ +// id}. +func (r *ProjectsLocationsAspectTypesService) Get(name string) *ProjectsLocationsAspectTypesGetCall { + c := &ProjectsLocationsAspectTypesGetCall{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 *ProjectsLocationsAspectTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetCall { + 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 *ProjectsLocationsAspectTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetCall { + 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 *ProjectsLocationsAspectTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1AspectType.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 *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1AspectType, 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 := &GoogleCloudDataplexV1AspectType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsAspectTypesService) GetIamPolicy(resource string) *ProjectsLocationsAspectTypesGetIamPolicyCall { + c := &ProjectsLocationsAspectTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAspectTypesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists AspectType resources in a project and location. +// +// - parent: The resource name of the AspectType location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsAspectTypesService) List(parent string) *ProjectsLocationsAspectTypesListCall { + c := &ProjectsLocationsAspectTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. Filters are +// case-sensitive. The service supports the following formats: labels.key1 = +// "value1" labels:key1 name = "value"These restrictions can be conjoined with +// AND, OR, and NOT conjunctions. +func (c *ProjectsLocationsAspectTypesListCall) Filter(filter string) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Orders the result by name or +// create_time fields. If not specified, the ordering is undefined. +func (c *ProjectsLocationsAspectTypesListCall) OrderBy(orderBy string) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// AspectTypes to return. The service may return fewer than this value. If +// unspecified, the service returns at most 10 AspectTypes. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsAspectTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListAspectTypes call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters you provide to ListAspectTypes +// must match the call that provided the page token. +func (c *ProjectsLocationsAspectTypesListCall) PageToken(pageToken string) *ProjectsLocationsAspectTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAspectTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesListCall { + 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 *ProjectsLocationsAspectTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesListCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesListCall { + 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 *ProjectsLocationsAspectTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aspectTypes") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDataplexV1ListAspectTypesResponse.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 *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListAspectTypesResponse, 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 := &GoogleCloudDataplexV1ListAspectTypesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsAspectTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListAspectTypesResponse) 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 ProjectsLocationsAspectTypesPatchCall struct { + s *Service + name string + googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an AspectType. +// +// - name: Output only. The relative resource name of the AspectType, of the +// form: +// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ +// id}. +func (r *ProjectsLocationsAspectTypesService) Patch(name string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesPatchCall { + c := &ProjectsLocationsAspectTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsAspectTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAspectTypesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsAspectTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsAspectTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesPatchCall { + 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 *ProjectsLocationsAspectTypesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1aspecttype) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.patch" 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 *ProjectsLocationsAspectTypesPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. +// +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAspectTypesSetIamPolicyCall { + c := &ProjectsLocationsAspectTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + 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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesSetIamPolicyCall { + 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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAspectTypesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsAspectTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + c := &ProjectsLocationsAspectTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesTestIamPermissionsCall { + 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.aspectTypes.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsDataAttributeBindingsCreateCall struct { + s *Service + parent string + googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a DataAttributeBinding resource. +// +// - parent: The resource name of the parent data taxonomy +// projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Create(parent string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsCreateCall { + c := &ProjectsLocationsDataAttributeBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding + return c +} + +// DataAttributeBindingId sets the optional parameter "dataAttributeBindingId": +// Required. DataAttributeBinding identifier. * Must contain only lowercase +// letters, numbers and hyphens. * Must start with a letter. * Must be between +// 1-63 characters. * Must end with a number or a letter. * Must be unique +// within the Location. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) DataAttributeBindingId(dataAttributeBindingId string) *ProjectsLocationsDataAttributeBindingsCreateCall { + c.urlParams_.Set("dataAttributeBindingId", dataAttributeBindingId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsCreateCall { + 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattributebinding) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataAttributeBindings") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataAttributeBindings.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 *ProjectsLocationsDataAttributeBindingsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsDataAttributeBindingsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataAttributeBinding resource. All attributes within the +// DataAttributeBinding must be deleted before the DataAttributeBinding can be +// deleted. +// +// - name: The resource name of the DataAttributeBinding: +// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{da +// ta_attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Delete(name string) *ProjectsLocationsDataAttributeBindingsDeleteCall { + c := &ProjectsLocationsDataAttributeBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": Required. If the client provided +// etag value does not match the current etag value, the +// DeleteDataAttributeBindingRequest method returns an ABORTED error response. +// Etags must be used when calling the DeleteDataAttributeBinding. +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Etag(etag string) *ProjectsLocationsDataAttributeBindingsDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesGetCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetCall { +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsDeleteCall { 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 *ProjectsLocationsAspectTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + 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, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataAttributeBindings.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 *ProjectsLocationsDataAttributeBindingsDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsDataAttributeBindingsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves a DataAttributeBinding resource. +// +// - name: The resource name of the DataAttributeBinding: +// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{da +// ta_attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Get(name string) *ProjectsLocationsDataAttributeBindingsGetCall { + c := &ProjectsLocationsDataAttributeBindingsGetCall{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 *ProjectsLocationsDataAttributeBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetCall { + 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 *ProjectsLocationsDataAttributeBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataAttributeBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetCall { + 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 *ProjectsLocationsDataAttributeBindingsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -9115,13 +11019,13 @@ func (c *ProjectsLocationsAspectTypesGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.get" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1AspectType.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1DataAttributeBinding.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 *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1AspectType, error) { +func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttributeBinding, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9140,7 +11044,7 @@ func (c *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1AspectType{ + ret := &GoogleCloudDataplexV1DataAttributeBinding{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9153,7 +11057,7 @@ func (c *ProjectsLocationsAspectTypesGetCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsAspectTypesGetIamPolicyCall struct { +type ProjectsLocationsDataAttributeBindingsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -9168,8 +11072,8 @@ type ProjectsLocationsAspectTypesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsAspectTypesService) GetIamPolicy(resource string) *ProjectsLocationsAspectTypesGetIamPolicyCall { - c := &ProjectsLocationsAspectTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataAttributeBindingsService) GetIamPolicy(resource string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { + c := &ProjectsLocationsDataAttributeBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -9186,7 +11090,7 @@ func (r *ProjectsLocationsAspectTypesService) GetIamPolicy(resource string) *Pro // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -9194,7 +11098,7 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) OptionsRequestedPolicyVer // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9202,27 +11106,27 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Fields(s ...googleapi.Fie // 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesGetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { 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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -9243,13 +11147,13 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9281,7 +11185,7 @@ func (c *ProjectsLocationsAspectTypesGetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsAspectTypesListCall struct { +type ProjectsLocationsDataAttributeBindingsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -9290,47 +11194,46 @@ type ProjectsLocationsAspectTypesListCall struct { header_ http.Header } -// List: Lists AspectType resources in a project and location. +// List: Lists DataAttributeBinding resources in a project and location. // -// - parent: The resource name of the AspectType location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsAspectTypesService) List(parent string) *ProjectsLocationsAspectTypesListCall { - c := &ProjectsLocationsAspectTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location: +// projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) List(parent string) *ProjectsLocationsDataAttributeBindingsListCall { + c := &ProjectsLocationsDataAttributeBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. Filters are -// case-sensitive. The service supports the following formats: labels.key1 = -// "value1" labels:key1 name = "value"These restrictions can be conjoined with -// AND, OR, and NOT conjunctions. -func (c *ProjectsLocationsAspectTypesListCall) Filter(filter string) *ProjectsLocationsAspectTypesListCall { +// Filter sets the optional parameter "filter": Filter request. Filter using +// resource: filter=resource:"resource-name" Filter using attribute: +// filter=attributes:"attribute-name" Filter using attribute in paths list: +// filter=paths.attributes:"attribute-name" +func (c *ProjectsLocationsDataAttributeBindingsListCall) Filter(filter string) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("filter", filter) return c -} - -// OrderBy sets the optional parameter "orderBy": Orders the result by name or -// create_time fields. If not specified, the ordering is undefined. -func (c *ProjectsLocationsAspectTypesListCall) OrderBy(orderBy string) *ProjectsLocationsAspectTypesListCall { +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsDataAttributeBindingsListCall) OrderBy(orderBy string) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// AspectTypes to return. The service may return fewer than this value. If -// unspecified, the service returns at most 10 AspectTypes. The maximum value -// is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsAspectTypesListCall) PageSize(pageSize int64) *ProjectsLocationsAspectTypesListCall { +// DataAttributeBindings to return. The service may return fewer than this +// value. If unspecified, at most 10 DataAttributeBindings will be returned. +// The maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataAttributeBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListAspectTypes call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters you provide to ListAspectTypes -// must match the call that provided the page token. -func (c *ProjectsLocationsAspectTypesListCall) PageToken(pageToken string) *ProjectsLocationsAspectTypesListCall { +// a previous ListDataAttributeBindings call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// ListDataAttributeBindings must match the call that provided the page token. +func (c *ProjectsLocationsDataAttributeBindingsListCall) PageToken(pageToken string) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -9338,7 +11241,7 @@ func (c *ProjectsLocationsAspectTypesListCall) PageToken(pageToken string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesListCall { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9346,27 +11249,27 @@ func (c *ProjectsLocationsAspectTypesListCall) Fields(s ...googleapi.Field) *Pro // 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 *ProjectsLocationsAspectTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAspectTypesListCall { +func (c *ProjectsLocationsDataAttributeBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesListCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesListCall { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsListCall { 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 *ProjectsLocationsAspectTypesListCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -9374,7 +11277,7 @@ func (c *ProjectsLocationsAspectTypesListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/aspectTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataAttributeBindings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9387,13 +11290,15 @@ func (c *ProjectsLocationsAspectTypesListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.list" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListAspectTypesResponse.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 +// *GoogleCloudDataplexV1ListDataAttributeBindingsResponse.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 *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListAspectTypesResponse, error) { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributeBindingsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9412,7 +11317,7 @@ func (c *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListAspectTypesResponse{ + ret := &GoogleCloudDataplexV1ListDataAttributeBindingsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9428,7 +11333,7 @@ func (c *ProjectsLocationsAspectTypesListCall) Do(opts ...googleapi.CallOption) // 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 *ProjectsLocationsAspectTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListAspectTypesResponse) error) error { +func (c *ProjectsLocationsDataAttributeBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributeBindingsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -9446,38 +11351,38 @@ func (c *ProjectsLocationsAspectTypesListCall) Pages(ctx context.Context, f func } } -type ProjectsLocationsAspectTypesPatchCall struct { - s *Service - name string - googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataAttributeBindingsPatchCall struct { + s *Service + name string + googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an AspectType. +// Patch: Updates a DataAttributeBinding resource. // -// - name: Output only. The relative resource name of the AspectType, of the -// form: -// projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_ -// id}. -func (r *ProjectsLocationsAspectTypesService) Patch(name string, googleclouddataplexv1aspecttype *GoogleCloudDataplexV1AspectType) *ProjectsLocationsAspectTypesPatchCall { - c := &ProjectsLocationsAspectTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The relative resource name of the Data Attribute +// Binding, of the form: +// projects/{project_number}/locations/{location}/dataAttributeBindings/{data_ +// attribute_binding_id}. +func (r *ProjectsLocationsDataAttributeBindingsService) Patch(name string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsPatchCall { + c := &ProjectsLocationsDataAttributeBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1aspecttype = googleclouddataplexv1aspecttype + c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding return c } // UpdateMask sets the optional parameter "updateMask": Required. Mask of // fields to update. -func (c *ProjectsLocationsAspectTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAspectTypesPatchCall { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataAttributeBindingsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsAspectTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAspectTypesPatchCall { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -9485,30 +11390,30 @@ func (c *ProjectsLocationsAspectTypesPatchCall) ValidateOnly(validateOnly bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesPatchCall { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesPatchCall { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsPatchCall { 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 *ProjectsLocationsAspectTypesPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1aspecttype) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattributebinding) if err != nil { return nil, err } @@ -9527,13 +11432,13 @@ func (c *ProjectsLocationsAspectTypesPatchCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.patch" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.patch" 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 *ProjectsLocationsAspectTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9565,7 +11470,7 @@ func (c *ProjectsLocationsAspectTypesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsAspectTypesSetIamPolicyCall struct { +type ProjectsLocationsDataAttributeBindingsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -9581,8 +11486,8 @@ type ProjectsLocationsAspectTypesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAspectTypesSetIamPolicyCall { - c := &ProjectsLocationsAspectTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataAttributeBindingsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { + c := &ProjectsLocationsDataAttributeBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -9591,27 +11496,27 @@ func (r *ProjectsLocationsAspectTypesService) SetIamPolicy(resource string, goog // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesSetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesSetIamPolicyCall { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { 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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) @@ -9633,13 +11538,13 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.aspectTypes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9667,189 +11572,69 @@ func (c *ProjectsLocationsAspectTypesSetIamPolicyCall) Do(opts ...googleapi.Call target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err - } - return ret, nil -} - -type ProjectsLocationsAspectTypesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. -// -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsAspectTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAspectTypesTestIamPermissionsCall { - c := &ProjectsLocationsAspectTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest - 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAspectTypesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAspectTypesTestIamPermissionsCall { - 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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAspectTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataplex.projects.locations.aspectTypes.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsAspectTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsDataAttributeBindingsCreateCall struct { - s *Service - parent string - googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Create a DataAttributeBinding resource. -// -// - parent: The resource name of the parent data taxonomy -// projects/{project_number}/locations/{location_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Create(parent string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsCreateCall { - c := &ProjectsLocationsDataAttributeBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding - return c -} - -// DataAttributeBindingId sets the optional parameter "dataAttributeBindingId": -// Required. DataAttributeBinding identifier. * Must contain only lowercase -// letters, numbers and hyphens. * Must start with a letter. * Must be between -// 1-63 characters. * Must end with a number or a letter. * Must be unique -// within the Location. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) DataAttributeBindingId(dataAttributeBindingId string) *ProjectsLocationsDataAttributeBindingsCreateCall { - c.urlParams_.Set("dataAttributeBindingId", dataAttributeBindingId) - return c + } + return ret, nil } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +type ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsDataAttributeBindingsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { + c := &ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsCreateCall { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsCreateCall { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { 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 *ProjectsLocationsDataAttributeBindingsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattributebinding) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataAttributeBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9857,18 +11642,18 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.create" call. +// Do executes the "dataplex.projects.locations.dataAttributeBindings.testIamPermissions" 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 +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9887,7 +11672,7 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9900,84 +11685,95 @@ func (c *ProjectsLocationsDataAttributeBindingsCreateCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataAttributeBindingsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansCreateCall struct { + s *Service + parent string + googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataAttributeBinding resource. All attributes within the -// DataAttributeBinding must be deleted before the DataAttributeBinding can be -// deleted. +// Create: Creates a DataScan resource. // -// - name: The resource name of the DataAttributeBinding: -// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{da -// ta_attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Delete(name string) *ProjectsLocationsDataAttributeBindingsDeleteCall { - c := &ProjectsLocationsDataAttributeBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the parent location: +// projects/{project}/locations/{location_id} where project refers to a +// project_id or project_number and location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansService) Create(parent string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansCreateCall { + c := &ProjectsLocationsDataScansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1datascan = googleclouddataplexv1datascan return c } -// Etag sets the optional parameter "etag": Required. If the client provided -// etag value does not match the current etag value, the -// DeleteDataAttributeBindingRequest method returns an ABORTED error response. -// Etags must be used when calling the DeleteDataAttributeBinding. -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Etag(etag string) *ProjectsLocationsDataAttributeBindingsDeleteCall { - c.urlParams_.Set("etag", etag) +// DataScanId sets the optional parameter "dataScanId": Required. DataScan +// identifier. Must contain only lowercase letters, numbers and hyphens. Must +// start with a letter. Must end with a number or a letter. Must be between +// 1-63 characters. Must be unique within the customer project / location. +func (c *ProjectsLocationsDataScansCreateCall) DataScanId(dataScanId string) *ProjectsLocationsDataScansCreateCall { + c.urlParams_.Set("dataScanId", dataScanId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataScansCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsDeleteCall { +func (c *ProjectsLocationsDataScansCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsDeleteCall { +func (c *ProjectsLocationsDataScansCreateCall) Context(ctx context.Context) *ProjectsLocationsDataScansCreateCall { 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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataScansCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataScansCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datascan) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.delete" call. +// Do executes the "dataplex.projects.locations.dataScans.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 *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10009,22 +11805,22 @@ func (c *ProjectsLocationsDataAttributeBindingsDeleteCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataAttributeBindingsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a DataAttributeBinding resource. +// Delete: Deletes a DataScan resource. // -// - name: The resource name of the DataAttributeBinding: -// projects/{project_number}/locations/{location_id}/dataAttributeBindings/{da -// ta_attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Get(name string) *ProjectsLocationsDataAttributeBindingsGetCall { - c := &ProjectsLocationsDataAttributeBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the dataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where +// project refers to a project_id or project_number and location_id refers to +// a GCP region. +func (r *ProjectsLocationsDataScansService) Delete(name string) *ProjectsLocationsDataScansDeleteCall { + c := &ProjectsLocationsDataScansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -10032,45 +11828,34 @@ func (r *ProjectsLocationsDataAttributeBindingsService) Get(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetCall { +func (c *ProjectsLocationsDataScansDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansDeleteCall { 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 *ProjectsLocationsDataAttributeBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetCall { +func (c *ProjectsLocationsDataScansDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataScansDeleteCall { 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 *ProjectsLocationsDataAttributeBindingsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataScansDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -10081,13 +11866,13 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.get" call. +// Do executes the "dataplex.projects.locations.dataScans.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataAttributeBinding.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttributeBinding, error) { +func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10106,7 +11891,7 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataAttributeBinding{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10119,103 +11904,82 @@ func (c *ProjectsLocationsDataAttributeBindingsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataAttributeBindingsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansGenerateDataQualityRulesCall struct { + s *Service + name string + googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// GenerateDataQualityRules: Generates recommended data quality rules based on +// the results of a data profiling scan.Use the recommendations to build rules +// for a data quality scan. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsDataAttributeBindingsService) GetIamPolicy(resource string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - c := &ProjectsLocationsDataAttributeBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy.Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected.Requests for policies with any conditional -// role bindings must specify version 3. Policies with no conditional role -// bindings may specify any valid value or leave the field unset.The policy in -// the response might use the policy version that you specified, or it might -// use a lower policy version. For example, if you specify version 3, but the -// policy has no conditional role bindings, the response uses version 1.To -// learn which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name must be one of the following: The name of a data scan with +// at least one successful, completed data profiling job The name of a +// successful, completed data profiling job (a data scan job where the job +// type is data profiling). +func (r *ProjectsLocationsDataScansService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { + c := &ProjectsLocationsDataScansGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall { +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { 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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Header() http.Header { if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) 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.header_ = make(http.Header) } + return c.header_ +} + +func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1generatedataqualityrulesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataScans.generateDataQualityRules" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.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 *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10234,7 +11998,7 @@ func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10247,63 +12011,44 @@ func (c *ProjectsLocationsDataAttributeBindingsGetIamPolicyCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataAttributeBindingsListCall struct { +type ProjectsLocationsDataScansGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists DataAttributeBinding resources in a project and location. +// Get: Gets a DataScan resource. // -// - parent: The resource name of the Location: -// projects/{project_number}/locations/{location_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) List(parent string) *ProjectsLocationsDataAttributeBindingsListCall { - c := &ProjectsLocationsDataAttributeBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter request. Filter using -// resource: filter=resource:"resource-name" Filter using attribute: -// filter=attributes:"attribute-name" Filter using attribute in paths list: -// filter=paths.attributes:"attribute-name" -func (c *ProjectsLocationsDataAttributeBindingsListCall) Filter(filter string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsDataAttributeBindingsListCall) OrderBy(orderBy string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataAttributeBindings to return. The service may return fewer than this -// value. If unspecified, at most 10 DataAttributeBindings will be returned. -// The maximum value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataAttributeBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: The resource name of the dataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where +// project refers to a project_id or project_number and location_id refers to +// a GCP region. +func (r *ProjectsLocationsDataScansService) Get(name string) *ProjectsLocationsDataScansGetCall { + c := &ProjectsLocationsDataScansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataAttributeBindings call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// ListDataAttributeBindings must match the call that provided the page token. -func (c *ProjectsLocationsDataAttributeBindingsListCall) PageToken(pageToken string) *ProjectsLocationsDataAttributeBindingsListCall { - c.urlParams_.Set("pageToken", pageToken) +// View sets the optional parameter "view": Select the DataScan view to return. +// Defaults to BASIC. +// +// Possible values: +// +// "DATA_SCAN_VIEW_UNSPECIFIED" - The API will default to the BASIC view. +// "BASIC" - Basic view that does not include spec and result. +// "FULL" - Include everything. +func (c *ProjectsLocationsDataScansGetCall) View(view string) *ProjectsLocationsDataScansGetCall { + c.urlParams_.Set("view", view) 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 *ProjectsLocationsDataAttributeBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsListCall { +func (c *ProjectsLocationsDataScansGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10311,27 +12056,27 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Fields(s ...googleapi.F // 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 *ProjectsLocationsDataAttributeBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataAttributeBindingsListCall { +func (c *ProjectsLocationsDataScansGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsListCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsListCall { +func (c *ProjectsLocationsDataScansGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetCall { 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 *ProjectsLocationsDataAttributeBindingsListCall) Header() http.Header { +func (c *ProjectsLocationsDataScansGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -10339,7 +12084,7 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataAttributeBindings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -10347,20 +12092,18 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.list" call. +// Do executes the "dataplex.projects.locations.dataScans.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataAttributeBindingsResponse.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 +// *GoogleCloudDataplexV1DataScan.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 *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributeBindingsResponse, error) { +func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScan, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10379,7 +12122,7 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataAttributeBindingsResponse{ + ret := &GoogleCloudDataplexV1DataScan{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10392,115 +12135,103 @@ func (c *ProjectsLocationsDataAttributeBindingsListCall) Do(opts ...googleapi.Ca 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 *ProjectsLocationsDataAttributeBindingsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributeBindingsResponse) 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 ProjectsLocationsDataAttributeBindingsPatchCall struct { - s *Service - name string - googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataAttributeBinding resource. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: Output only. The relative resource name of the Data Attribute -// Binding, of the form: -// projects/{project_number}/locations/{location}/dataAttributeBindings/{data_ -// attribute_binding_id}. -func (r *ProjectsLocationsDataAttributeBindingsService) Patch(name string, googleclouddataplexv1dataattributebinding *GoogleCloudDataplexV1DataAttributeBinding) *ProjectsLocationsDataAttributeBindingsPatchCall { - c := &ProjectsLocationsDataAttributeBindingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1dataattributebinding = googleclouddataplexv1dataattributebinding - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataAttributeBindingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataScansService) GetIamPolicy(resource string) *ProjectsLocationsDataScansGetIamPolicyCall { + c := &ProjectsLocationsDataScansGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataAttributeBindingsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsDataScansGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataScansGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsPatchCall { +func (c *ProjectsLocationsDataScansGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetIamPolicyCall { 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 *ProjectsLocationsDataScansGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsPatchCall { +func (c *ProjectsLocationsDataScansGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetIamPolicyCall { 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataScansGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattributebinding) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.patch" call. +// Do executes the "dataplex.projects.locations.dataScans.getIamPolicy" 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 *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10519,7 +12250,7 @@ func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10532,81 +12263,116 @@ func (c *ProjectsLocationsDataAttributeBindingsPatchCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataAttributeBindingsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DataScans. +// +// - parent: The resource name of the parent location: +// projects/{project}/locations/{location_id} where project refers to a +// project_id or project_number and location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansService) List(parent string) *ProjectsLocationsDataScansListCall { + c := &ProjectsLocationsDataScansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsDataScansListCall) Filter(filter string) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("filter", filter) + return c } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. -// -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsDataAttributeBindingsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { - c := &ProjectsLocationsDataAttributeBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// OrderBy sets the optional parameter "orderBy": Order by fields (name or +// create_time) for the result. If not specified, the ordering is undefined. +func (c *ProjectsLocationsDataScansListCall) OrderBy(orderBy string) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of dataScans +// to return. The service may return fewer than this value. If unspecified, at +// most 500 scans will be returned. The maximum value is 1000; values above +// 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataScansListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListDataScans call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ListDataScans must match +// the call that provided the page token. +func (c *ProjectsLocationsDataScansListCall) PageToken(pageToken string) *ProjectsLocationsDataScansListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { +func (c *ProjectsLocationsDataScansListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansListCall { 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 *ProjectsLocationsDataScansListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall { +func (c *ProjectsLocationsDataScansListCall) Context(ctx context.Context) *ProjectsLocationsDataScansListCall { 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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataScansListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataScans.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1ListDataScansResponse.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 *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScansResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10625,7 +12391,7 @@ func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1ListDataScansResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10638,84 +12404,115 @@ func (c *ProjectsLocationsDataAttributeBindingsSetIamPolicyCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - 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 *ProjectsLocationsDataScansListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScansResponse) 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. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +type ProjectsLocationsDataScansPatchCall struct { + s *Service + name string + googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataScan resource. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsDataAttributeBindingsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { - c := &ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: Output only. The relative resource name of the scan, of the form: +// projects/{project}/locations/{location_id}/dataScans/{datascan_id}, where +// project refers to a project_id or project_number and location_id refers to +// a GCP region. +func (r *ProjectsLocationsDataScansService) Patch(name string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansPatchCall { + c := &ProjectsLocationsDataScansPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1datascan = googleclouddataplexv1datascan + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsDataScansPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataScansPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataScansPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsDataScansPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall { +func (c *ProjectsLocationsDataScansPatchCall) Context(ctx context.Context) *ProjectsLocationsDataScansPatchCall { 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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataScansPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datascan) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 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{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataAttributeBindings.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.dataScans.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10734,7 +12531,7 @@ func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10747,76 +12544,61 @@ func (c *ProjectsLocationsDataAttributeBindingsTestIamPermissionsCall) Do(opts . return ret, nil } -type ProjectsLocationsDataScansCreateCall struct { - s *Service - parent string - googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansRunCall struct { + s *Service + name string + googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataScan resource. +// Run: Runs an on-demand execution of a DataScan // -// - parent: The resource name of the parent location: -// projects/{project}/locations/{location_id} where project refers to a -// project_id or project_number and location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansService) Create(parent string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansCreateCall { - c := &ProjectsLocationsDataScansCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1datascan = googleclouddataplexv1datascan - return c -} - -// DataScanId sets the optional parameter "dataScanId": Required. DataScan -// identifier. Must contain only lowercase letters, numbers and hyphens. Must -// start with a letter. Must end with a number or a letter. Must be between -// 1-63 characters. Must be unique within the customer project / location. -func (c *ProjectsLocationsDataScansCreateCall) DataScanId(dataScanId string) *ProjectsLocationsDataScansCreateCall { - c.urlParams_.Set("dataScanId", dataScanId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataScansCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - name: The resource name of the DataScan: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. where +// project refers to a project_id or project_number and location_id refers to +// a GCP region.Only OnDemand data scans are allowed. +func (r *ProjectsLocationsDataScansService) Run(name string, googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest) *ProjectsLocationsDataScansRunCall { + c := &ProjectsLocationsDataScansRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddataplexv1rundatascanrequest = googleclouddataplexv1rundatascanrequest 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 *ProjectsLocationsDataScansCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansCreateCall { +func (c *ProjectsLocationsDataScansRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansRunCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansCreateCall) Context(ctx context.Context) *ProjectsLocationsDataScansCreateCall { +func (c *ProjectsLocationsDataScansRunCall) Context(ctx context.Context) *ProjectsLocationsDataScansRunCall { 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 *ProjectsLocationsDataScansCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataScansRunCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansRunCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datascan) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1rundatascanrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10824,18 +12606,18 @@ func (c *ProjectsLocationsDataScansCreateCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.create" call. +// Do executes the "dataplex.projects.locations.dataScans.run" 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 +// *GoogleCloudDataplexV1RunDataScanResponse.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 *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunDataScanResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10854,7 +12636,7 @@ func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1RunDataScanResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10867,74 +12649,81 @@ func (c *ProjectsLocationsDataScansCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataScansDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataScan resource. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - name: The resource name of the dataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where -// project refers to a project_id or project_number and location_id refers to -// a GCP region. -func (r *ProjectsLocationsDataScansService) Delete(name string) *ProjectsLocationsDataScansDeleteCall { - c := &ProjectsLocationsDataScansDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataScansService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataScansSetIamPolicyCall { + c := &ProjectsLocationsDataScansSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest 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 *ProjectsLocationsDataScansDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansDeleteCall { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataScansDeleteCall { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansSetIamPolicyCall { 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 *ProjectsLocationsDataScansDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataScansSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataScansSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.delete" call. +// Do executes the "dataplex.projects.locations.dataScans.setIamPolicy" 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 *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10953,7 +12742,7 @@ func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10966,63 +12755,65 @@ func (c *ProjectsLocationsDataScansDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataScansGenerateDataQualityRulesCall struct { - s *Service - name string - googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GenerateDataQualityRules: Generates recommended data quality rules based on -// the results of a data profiling scan.Use the recommendations to build rules -// for a data quality scan. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - name: The name must be one of the following: The name of a data scan with -// at least one successful, completed data profiling job The name of a -// successful, completed data profiling job (a data scan job where the job -// type is data profiling). -func (r *ProjectsLocationsDataScansService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { - c := &ProjectsLocationsDataScansGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsDataScansService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataScansTestIamPermissionsCall { + c := &ProjectsLocationsDataScansTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest 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 *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansGenerateDataQualityRulesCall { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataScansTestIamPermissionsCall { 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 *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Header() http.Header { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1generatedataqualityrulesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11030,18 +12821,18 @@ func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) doRequest(alt s } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.generateDataQualityRules" call. +// Do executes the "dataplex.projects.locations.dataScans.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.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 +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { +func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11060,7 +12851,7 @@ func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11073,82 +12864,65 @@ func (c *ProjectsLocationsDataScansGenerateDataQualityRulesCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataScansGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall struct { + s *Service + name string + googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataScan resource. +// GenerateDataQualityRules: Generates recommended data quality rules based on +// the results of a data profiling scan.Use the recommendations to build rules +// for a data quality scan. // -// - name: The resource name of the dataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where -// project refers to a project_id or project_number and location_id refers to -// a GCP region. -func (r *ProjectsLocationsDataScansService) Get(name string) *ProjectsLocationsDataScansGetCall { - c := &ProjectsLocationsDataScansGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name must be one of the following: The name of a data scan with +// at least one successful, completed data profiling job The name of a +// successful, completed data profiling job (a data scan job where the job +// type is data profiling). +func (r *ProjectsLocationsDataScansJobsService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { + c := &ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// View sets the optional parameter "view": Select the DataScan view to return. -// Defaults to BASIC. -// -// Possible values: -// -// "DATA_SCAN_VIEW_UNSPECIFIED" - The API will default to the BASIC view. -// "BASIC" - Basic view that does not include spec and result. -// "FULL" - Include everything. -func (c *ProjectsLocationsDataScansGetCall) View(view string) *ProjectsLocationsDataScansGetCall { - c.urlParams_.Set("view", view) + c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest 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 *ProjectsLocationsDataScansGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetCall { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { 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 *ProjectsLocationsDataScansGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetCall { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { 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 *ProjectsLocationsDataScansGetCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansGetCall) 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 *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1generatedataqualityrulesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -11159,13 +12933,13 @@ func (c *ProjectsLocationsDataScansGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.get" call. +// Do executes the "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataScan.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 +// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.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 *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScan, error) { +func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11184,7 +12958,7 @@ func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataScan{ + ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11197,48 +12971,44 @@ func (c *ProjectsLocationsDataScansGetCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsDataScansGetIamPolicyCall struct { +type ProjectsLocationsDataScansJobsGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Get: Gets a DataScanJob resource. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsDataScansService) GetIamPolicy(resource string) *ProjectsLocationsDataScansGetIamPolicyCall { - c := &ProjectsLocationsDataScansGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The resource name of the DataScanJob: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{d +// ata_scan_job_id} where project refers to a project_id or project_number +// and location_id refers to a GCP region. +func (r *ProjectsLocationsDataScansJobsService) Get(name string) *ProjectsLocationsDataScansJobsGetCall { + c := &ProjectsLocationsDataScansJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy.Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected.Requests for policies with any conditional -// role bindings must specify version 3. Policies with no conditional role -// bindings may specify any valid value or leave the field unset.The policy in -// the response might use the policy version that you specified, or it might -// use a lower policy version. For example, if you specify version 3, but the -// policy has no conditional role bindings, the response uses version 1.To -// learn which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataScansGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataScansGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// View sets the optional parameter "view": Select the DataScanJob view to +// return. Defaults to BASIC. +// +// Possible values: +// +// "DATA_SCAN_JOB_VIEW_UNSPECIFIED" - The API will default to the BASIC view. +// "BASIC" - Basic view that does not include spec and result. +// "FULL" - Include everything. +func (c *ProjectsLocationsDataScansJobsGetCall) View(view string) *ProjectsLocationsDataScansJobsGetCall { + c.urlParams_.Set("view", view) 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 *ProjectsLocationsDataScansGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansGetIamPolicyCall { +func (c *ProjectsLocationsDataScansJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11246,27 +13016,27 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Fields(s ...googleapi.Field // 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 *ProjectsLocationsDataScansGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansGetIamPolicyCall { +func (c *ProjectsLocationsDataScansJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansGetIamPolicyCall { +func (c *ProjectsLocationsDataScansJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGetCall { 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 *ProjectsLocationsDataScansGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -11274,7 +13044,7 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11282,18 +13052,18 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataScans.jobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1DataScanJob.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 *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScanJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11312,7 +13082,7 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1DataScanJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11325,7 +13095,7 @@ func (c *ProjectsLocationsDataScansGetIamPolicyCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDataScansListCall struct { +type ProjectsLocationsDataScansJobsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -11334,44 +13104,46 @@ type ProjectsLocationsDataScansListCall struct { header_ http.Header } -// List: Lists DataScans. +// List: Lists DataScanJobs under the given DataScan. // -// - parent: The resource name of the parent location: -// projects/{project}/locations/{location_id} where project refers to a -// project_id or project_number and location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansService) List(parent string) *ProjectsLocationsDataScansListCall { - c := &ProjectsLocationsDataScansListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent environment: +// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where +// project refers to a project_id or project_number and location_id refers to +// a GCP region. +func (r *ProjectsLocationsDataScansJobsService) List(parent string) *ProjectsLocationsDataScansJobsListCall { + c := &ProjectsLocationsDataScansJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataScansListCall) Filter(filter string) *ProjectsLocationsDataScansListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the ListDataScanJobs request.If unspecified, all datascan jobs +// will be returned. Multiple filters can be applied (with AND, OR logical +// operators). Filters are case-sensitive.Allowed fields are: start_time +// end_timestart_time and end_time expect RFC-3339 formatted strings (e.g. +// 2018-10-08T18:30:00-07:00).For instance, 'start_time > +// 2018-10-08T00:00:00.123456789Z AND end_time < +// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between +// specified start and end times. +func (c *ProjectsLocationsDataScansJobsListCall) Filter(filter string) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Order by fields (name or -// create_time) for the result. If not specified, the ordering is undefined. -func (c *ProjectsLocationsDataScansListCall) OrderBy(orderBy string) *ProjectsLocationsDataScansListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of dataScans -// to return. The service may return fewer than this value. If unspecified, at -// most 500 scans will be returned. The maximum value is 1000; values above -// 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataScansListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataScanJobs to return. The service may return fewer than this value. If +// unspecified, at most 10 DataScanJobs will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataScansJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataScans call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ListDataScans must match -// the call that provided the page token. -func (c *ProjectsLocationsDataScansListCall) PageToken(pageToken string) *ProjectsLocationsDataScansListCall { +// a previous ListDataScanJobs call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListDataScanJobs +// must match the call that provided the page token. +func (c *ProjectsLocationsDataScansJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -11379,7 +13151,7 @@ func (c *ProjectsLocationsDataScansListCall) PageToken(pageToken string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansListCall { +func (c *ProjectsLocationsDataScansJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11387,27 +13159,27 @@ func (c *ProjectsLocationsDataScansListCall) Fields(s ...googleapi.Field) *Proje // 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 *ProjectsLocationsDataScansListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansListCall { +func (c *ProjectsLocationsDataScansJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansListCall) Context(ctx context.Context) *ProjectsLocationsDataScansListCall { +func (c *ProjectsLocationsDataScansJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsListCall { 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 *ProjectsLocationsDataScansListCall) Header() http.Header { +func (c *ProjectsLocationsDataScansJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataScansJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -11415,7 +13187,7 @@ func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataScans") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11428,13 +13200,13 @@ func (c *ProjectsLocationsDataScansListCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.list" call. +// Do executes the "dataplex.projects.locations.dataScans.jobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataScansResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListDataScanJobsResponse.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 *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScansResponse, error) { +func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScanJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11453,7 +13225,7 @@ func (c *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataScansResponse{ + ret := &GoogleCloudDataplexV1ListDataScanJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11469,7 +13241,7 @@ func (c *ProjectsLocationsDataScansListCall) Do(opts ...googleapi.CallOption) (* // 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 *ProjectsLocationsDataScansListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScansResponse) error) error { +func (c *ProjectsLocationsDataScansJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScanJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -11487,77 +13259,185 @@ func (c *ProjectsLocationsDataScansListCall) Pages(ctx context.Context, f func(* } } -type ProjectsLocationsDataScansPatchCall struct { - s *Service - name string - googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesCreateCall struct { + s *Service + parent string + googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataScan resource. +// Create: Create a DataTaxonomy resource. // -// - name: Output only. The relative resource name of the scan, of the form: -// projects/{project}/locations/{location_id}/dataScans/{datascan_id}, where -// project refers to a project_id or project_number and location_id refers to -// a GCP region. -func (r *ProjectsLocationsDataScansService) Patch(name string, googleclouddataplexv1datascan *GoogleCloudDataplexV1DataScan) *ProjectsLocationsDataScansPatchCall { - c := &ProjectsLocationsDataScansPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1datascan = googleclouddataplexv1datascan +// - parent: The resource name of the data taxonomy location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a GCP region. +func (r *ProjectsLocationsDataTaxonomiesService) Create(parent string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesCreateCall { + c := &ProjectsLocationsDataTaxonomiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsDataScansPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataScansPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// DataTaxonomyId sets the optional parameter "dataTaxonomyId": Required. +// DataTaxonomy identifier. * Must contain only lowercase letters, numbers and +// hyphens. * Must start with a letter. * Must be between 1-63 characters. * +// Must end with a number or a letter. * Must be unique within the Project. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) DataTaxonomyId(dataTaxonomyId string) *ProjectsLocationsDataTaxonomiesCreateCall { + c.urlParams_.Set("dataTaxonomyId", dataTaxonomyId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + 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 *ProjectsLocationsDataTaxonomiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataTaxonomiesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesCreateCall { + 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 *ProjectsLocationsDataTaxonomiesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataTaxonomiesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datataxonomy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.dataTaxonomies.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 *ProjectsLocationsDataTaxonomiesCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsDataTaxonomiesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataTaxonomy resource. All attributes within the +// DataTaxonomy must be deleted before the DataTaxonomy can be deleted. +// +// - name: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Delete(name string) *ProjectsLocationsDataTaxonomiesDeleteCall { + c := &ProjectsLocationsDataTaxonomiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataScansPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataScansPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// Etag sets the optional parameter "etag": If the client provided etag value +// does not match the current etag value,the DeleteDataTaxonomy method returns +// an ABORTED error. +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesDeleteCall { + c.urlParams_.Set("etag", etag) 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 *ProjectsLocationsDataScansPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansPatchCall { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansPatchCall) Context(ctx context.Context) *ProjectsLocationsDataScansPatchCall { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesDeleteCall { 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 *ProjectsLocationsDataScansPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datascan) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -11568,13 +13448,13 @@ func (c *ProjectsLocationsDataScansPatchCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.patch" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.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 *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11606,63 +13486,68 @@ func (c *ProjectsLocationsDataScansPatchCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDataScansRunCall struct { - s *Service - name string - googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Run: Runs an on-demand execution of a DataScan +// Get: Retrieves a DataTaxonomy resource. // -// - name: The resource name of the DataScan: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. where -// project refers to a project_id or project_number and location_id refers to -// a GCP region.Only OnDemand data scans are allowed. -func (r *ProjectsLocationsDataScansService) Run(name string, googleclouddataplexv1rundatascanrequest *GoogleCloudDataplexV1RunDataScanRequest) *ProjectsLocationsDataScansRunCall { - c := &ProjectsLocationsDataScansRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocationsDataTaxonomiesGetCall { + c := &ProjectsLocationsDataTaxonomiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1rundatascanrequest = googleclouddataplexv1rundatascanrequest 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 *ProjectsLocationsDataScansRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansRunCall { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetCall { 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 *ProjectsLocationsDataTaxonomiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansRunCall) Context(ctx context.Context) *ProjectsLocationsDataScansRunCall { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetCall { 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 *ProjectsLocationsDataScansRunCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansRunCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1rundatascanrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataTaxonomiesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -11673,13 +13558,13 @@ func (c *ProjectsLocationsDataScansRunCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.run" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1RunDataScanResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1DataTaxonomy.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 *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1RunDataScanResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataTaxonomy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11698,7 +13583,7 @@ func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1RunDataScanResponse{ + ret := &GoogleCloudDataplexV1DataTaxonomy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11711,64 +13596,86 @@ func (c *ProjectsLocationsDataScansRunCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsDataScansSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { + s *Service + resource 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.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - resource: REQUIRED: The resource for which the policy is being specified. +// - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataScansService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataScansSetIamPolicyCall { - c := &ProjectsLocationsDataScansSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsDataScansSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataScansSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { 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 *ProjectsLocationsDataScansSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -11779,13 +13686,13 @@ func (c *ProjectsLocationsDataScansSetIamPolicyCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11817,84 +13724,116 @@ func (c *ProjectsLocationsDataScansSetIamPolicyCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDataScansTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// List: Lists DataTaxonomy resources in a project and location. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ProjectsLocationsDataScansService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataScansTestIamPermissionsCall { - c := &ProjectsLocationsDataScansTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - parent: The resource name of the DataTaxonomy location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a GCP region. +func (r *ProjectsLocationsDataTaxonomiesService) List(parent string) *ProjectsLocationsDataTaxonomiesListCall { + c := &ProjectsLocationsDataTaxonomiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter request. +func (c *ProjectsLocationsDataTaxonomiesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Order by fields for the +// result. +func (c *ProjectsLocationsDataTaxonomiesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataTaxonomies to return. The service may return fewer than this value. If +// unspecified, at most 10 DataTaxonomies will be returned. The maximum value +// is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataTaxonomiesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListDataTaxonomies call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListDataTaxonomies +// must match the call that provided the page token. +func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesListCall { 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 *ProjectsLocationsDataTaxonomiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataScansTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesListCall { 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 *ProjectsLocationsDataScansTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListDataTaxonomiesResponse.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 *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataTaxonomiesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11913,7 +13852,7 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleCloudDataplexV1ListDataTaxonomiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11926,65 +13865,98 @@ func (c *ProjectsLocationsDataScansTestIamPermissionsCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall struct { - s *Service - name string - googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest - 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 *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataTaxonomiesResponse) 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) + } } -// GenerateDataQualityRules: Generates recommended data quality rules based on -// the results of a data profiling scan.Use the recommendations to build rules -// for a data quality scan. +type ProjectsLocationsDataTaxonomiesPatchCall struct { + s *Service + name string + googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataTaxonomy resource. // -// - name: The name must be one of the following: The name of a data scan with -// at least one successful, completed data profiling job The name of a -// successful, completed data profiling job (a data scan job where the job -// type is data profiling). -func (r *ProjectsLocationsDataScansJobsService) GenerateDataQualityRules(name string, googleclouddataplexv1generatedataqualityrulesrequest *GoogleCloudDataplexV1GenerateDataQualityRulesRequest) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { - c := &ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The relative resource name of the DataTaxonomy, of the +// form: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesService) Patch(name string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesPatchCall { + c := &ProjectsLocationsDataTaxonomiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1generatedataqualityrulesrequest = googleclouddataplexv1generatedataqualityrulesrequest + c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsDataTaxonomiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": Only validate the +// request, but do not perform mutations. The default is false. +func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 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 *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesPatchCall { 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 *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1generatedataqualityrulesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datataxonomy) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateDataQualityRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -11995,13 +13967,13 @@ func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.jobs.generateDataQualityRules" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1GenerateDataQualityRulesResponse.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 +// *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 *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1GenerateDataQualityRulesResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12020,7 +13992,7 @@ func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1GenerateDataQualityRulesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12033,99 +14005,81 @@ func (c *ProjectsLocationsDataScansJobsGenerateDataQualityRulesCall) Do(opts ... return ret, nil } -type ProjectsLocationsDataScansJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a DataScanJob resource. -// -// - name: The resource name of the DataScanJob: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/jobs/{d -// ata_scan_job_id} where project refers to a project_id or project_number -// and location_id refers to a GCP region. -func (r *ProjectsLocationsDataScansJobsService) Get(name string) *ProjectsLocationsDataScansJobsGetCall { - c := &ProjectsLocationsDataScansJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Select the DataScanJob view to -// return. Defaults to BASIC. -// -// Possible values: +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// "DATA_SCAN_JOB_VIEW_UNSPECIFIED" - The API will default to the BASIC view. -// "BASIC" - Basic view that does not include spec and result. -// "FULL" - Include everything. -func (c *ProjectsLocationsDataScansJobsGetCall) View(view string) *ProjectsLocationsDataScansJobsGetCall { - c.urlParams_.Set("view", view) +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest 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 *ProjectsLocationsDataScansJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsGetCall { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { 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 *ProjectsLocationsDataScansJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsGetCall { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { 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 *ProjectsLocationsDataScansJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansJobsGetCall) 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 *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.jobs.get" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataScanJob.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 *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataScanJob, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12144,7 +14098,7 @@ func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataScanJob{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12157,118 +14111,84 @@ func (c *ProjectsLocationsDataScansJobsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataScansJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists DataScanJobs under the given DataScan. -// -// - parent: The resource name of the parent environment: -// projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where -// project refers to a project_id or project_number and location_id refers to -// a GCP region. -func (r *ProjectsLocationsDataScansJobsService) List(parent string) *ProjectsLocationsDataScansJobsListCall { - c := &ProjectsLocationsDataScansJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the ListDataScanJobs request.If unspecified, all datascan jobs -// will be returned. Multiple filters can be applied (with AND, OR logical -// operators). Filters are case-sensitive.Allowed fields are: start_time -// end_timestart_time and end_time expect RFC-3339 formatted strings (e.g. -// 2018-10-08T18:30:00-07:00).For instance, 'start_time > -// 2018-10-08T00:00:00.123456789Z AND end_time < -// 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between -// specified start and end times. -func (c *ProjectsLocationsDataScansJobsListCall) Filter(filter string) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataScanJobs to return. The service may return fewer than this value. If -// unspecified, at most 10 DataScanJobs will be returned. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataScansJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataScanJobs call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListDataScanJobs -// must match the call that provided the page token. -func (c *ProjectsLocationsDataScansJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataScansJobsListCall { - c.urlParams_.Set("pageToken", pageToken) +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsDataTaxonomiesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { + c := &ProjectsLocationsDataTaxonomiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest 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 *ProjectsLocationsDataScansJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataScansJobsListCall { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { 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 *ProjectsLocationsDataScansJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataScansJobsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataScansJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataScansJobsListCall { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { 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 *ProjectsLocationsDataScansJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataScansJobsListCall) 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 *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataScans.jobs.list" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataScanJobsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataScanJobsResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12287,7 +14207,7 @@ func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataScanJobsResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12300,60 +14220,40 @@ func (c *ProjectsLocationsDataScansJobsListCall) Do(opts ...googleapi.CallOption 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 *ProjectsLocationsDataScansJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataScanJobsResponse) 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 ProjectsLocationsDataTaxonomiesCreateCall struct { - s *Service - parent string - googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesAttributesCreateCall struct { + s *Service + parent string + googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a DataTaxonomy resource. +// Create: Create a DataAttribute resource. // -// - parent: The resource name of the data taxonomy location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a GCP region. -func (r *ProjectsLocationsDataTaxonomiesService) Create(parent string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesCreateCall { - c := &ProjectsLocationsDataTaxonomiesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent data taxonomy +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Create(parent string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { + c := &ProjectsLocationsDataTaxonomiesAttributesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy + c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute return c } -// DataTaxonomyId sets the optional parameter "dataTaxonomyId": Required. -// DataTaxonomy identifier. * Must contain only lowercase letters, numbers and +// DataAttributeId sets the optional parameter "dataAttributeId": Required. +// DataAttribute identifier. * Must contain only lowercase letters, numbers and // hyphens. * Must start with a letter. * Must be between 1-63 characters. * -// Must end with a number or a letter. * Must be unique within the Project. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) DataTaxonomyId(dataTaxonomyId string) *ProjectsLocationsDataTaxonomiesCreateCall { - c.urlParams_.Set("dataTaxonomyId", dataTaxonomyId) +// Must end with a number or a letter. * Must be unique within the +// DataTaxonomy. +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) DataAttributeId(dataAttributeId string) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { + c.urlParams_.Set("dataAttributeId", dataAttributeId) return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -12361,36 +14261,36 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) ValidateOnly(validateOnly bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesCreateCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { 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 *ProjectsLocationsDataTaxonomiesCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datataxonomy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12403,13 +14303,13 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.create" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.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 *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12441,7 +14341,7 @@ func (c *ProjectsLocationsDataTaxonomiesCreateCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsDataTaxonomiesDeleteCall struct { +type ProjectsLocationsDataTaxonomiesAttributesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12449,22 +14349,21 @@ type ProjectsLocationsDataTaxonomiesDeleteCall struct { header_ http.Header } -// Delete: Deletes a DataTaxonomy resource. All attributes within the -// DataTaxonomy must be deleted before the DataTaxonomy can be deleted. +// Delete: Deletes a Data Attribute resource. // -// - name: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Delete(name string) *ProjectsLocationsDataTaxonomiesDeleteCall { - c := &ProjectsLocationsDataTaxonomiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the DataAttribute: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon +// omy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Delete(name string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { + c := &ProjectsLocationsDataTaxonomiesAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value,the DeleteDataTaxonomy method returns -// an ABORTED error. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesDeleteCall { +// does not match the current etag value, the DeleteDataAttribute method +// returns an ABORTED error response. +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { c.urlParams_.Set("etag", etag) return c } @@ -12472,27 +14371,27 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Etag(etag string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesDeleteCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesDeleteCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { 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 *ProjectsLocationsDataTaxonomiesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -12510,13 +14409,13 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.delete" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.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 *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12548,7 +14447,7 @@ func (c *ProjectsLocationsDataTaxonomiesDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsDataTaxonomiesGetCall struct { +type ProjectsLocationsDataTaxonomiesAttributesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12557,13 +14456,13 @@ type ProjectsLocationsDataTaxonomiesGetCall struct { header_ http.Header } -// Get: Retrieves a DataTaxonomy resource. +// Get: Retrieves a Data Attribute resource. // -// - name: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocationsDataTaxonomiesGetCall { - c := &ProjectsLocationsDataTaxonomiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the dataAttribute: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon +// omy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { + c := &ProjectsLocationsDataTaxonomiesAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12571,7 +14470,7 @@ func (r *ProjectsLocationsDataTaxonomiesService) Get(name string) *ProjectsLocat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12579,27 +14478,27 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsLocationsDataTaxonomiesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetCall { 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 *ProjectsLocationsDataTaxonomiesGetCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12620,13 +14519,13 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.get" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataTaxonomy.ServerResponse.Header or (if a response +// *GoogleCloudDataplexV1DataAttribute.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 *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataTaxonomy, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttribute, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12645,7 +14544,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataTaxonomy{ + ret := &GoogleCloudDataplexV1DataAttribute{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12658,7 +14557,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { +type ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -12673,8 +14572,8 @@ type ProjectsLocationsDataTaxonomiesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesAttributesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -12691,7 +14590,7 @@ func (r *ProjectsLocationsDataTaxonomiesService) GetIamPolicy(resource string) * // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -12699,7 +14598,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) OptionsRequestedPolicy // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12707,27 +14606,27 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Fields(s ...googleapi. // 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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesGetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12748,13 +14647,13 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12786,7 +14685,7 @@ func (c *ProjectsLocationsDataTaxonomiesGetIamPolicyCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataTaxonomiesListCall struct { +type ProjectsLocationsDataTaxonomiesAttributesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -12795,44 +14694,44 @@ type ProjectsLocationsDataTaxonomiesListCall struct { header_ http.Header } -// List: Lists DataTaxonomy resources in a project and location. +// List: Lists Data Attribute resources in a DataTaxonomy. // -// - parent: The resource name of the DataTaxonomy location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a GCP region. -func (r *ProjectsLocationsDataTaxonomiesService) List(parent string) *ProjectsLocationsDataTaxonomiesListCall { - c := &ProjectsLocationsDataTaxonomiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the DataTaxonomy: +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo +// nomy_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) List(parent string) *ProjectsLocationsDataTaxonomiesAttributesListCall { + c := &ProjectsLocationsDataTaxonomiesAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataTaxonomiesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Order by fields for the // result. -func (c *ProjectsLocationsDataTaxonomiesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// DataTaxonomies to return. The service may return fewer than this value. If -// unspecified, at most 10 DataTaxonomies will be returned. The maximum value +// DataAttributes to return. The service may return fewer than this value. If +// unspecified, at most 10 dataAttributes will be returned. The maximum value // is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataTaxonomiesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataTaxonomies call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListDataTaxonomies +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListDataAttributes call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to ListDataAttributes // must match the call that provided the page token. -func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12840,7 +14739,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) PageToken(pageToken string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12848,27 +14747,27 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Fields(s ...googleapi.Field) * // 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 *ProjectsLocationsDataTaxonomiesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesListCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesListCall { 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 *ProjectsLocationsDataTaxonomiesListCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12876,7 +14775,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataTaxonomies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12889,13 +14788,13 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.list" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataTaxonomiesResponse.ServerResponse.Header or +// *GoogleCloudDataplexV1ListDataAttributesResponse.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 *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataTaxonomiesResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12914,7 +14813,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataTaxonomiesResponse{ + ret := &GoogleCloudDataplexV1ListDataAttributesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12930,7 +14829,7 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Do(opts ...googleapi.CallOptio // 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 *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataTaxonomiesResponse) error) error { +func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -12948,38 +14847,38 @@ func (c *ProjectsLocationsDataTaxonomiesListCall) Pages(ctx context.Context, f f } } -type ProjectsLocationsDataTaxonomiesPatchCall struct { - s *Service - name string - googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataTaxonomiesAttributesPatchCall struct { + s *Service + name string + googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataTaxonomy resource. +// Patch: Updates a DataAttribute resource. // -// - name: Output only. The relative resource name of the DataTaxonomy, of the +// - name: Output only. The relative resource name of the dataAttribute, of the // form: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesService) Patch(name string, googleclouddataplexv1datataxonomy *GoogleCloudDataplexV1DataTaxonomy) *ProjectsLocationsDataTaxonomiesPatchCall { - c := &ProjectsLocationsDataTaxonomiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon +// omy}/attributes/{data_attribute_id}. +func (r *ProjectsLocationsDataTaxonomiesAttributesService) Patch(name string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { + c := &ProjectsLocationsDataTaxonomiesAttributesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1datataxonomy = googleclouddataplexv1datataxonomy + c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute return c } // UpdateMask sets the optional parameter "updateMask": Required. Mask of // fields to update. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } // ValidateOnly sets the optional parameter "validateOnly": Only validate the // request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -12987,30 +14886,30 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) ValidateOnly(validateOnly boo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesPatchCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { 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 *ProjectsLocationsDataTaxonomiesPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1datataxonomy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) if err != nil { return nil, err } @@ -13029,13 +14928,13 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.patch" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.patch" 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 *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13067,7 +14966,7 @@ func (c *ProjectsLocationsDataTaxonomiesPatchCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { +type ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -13083,8 +14982,8 @@ type ProjectsLocationsDataTaxonomiesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesAttributesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { + c := &ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -13093,27 +14992,27 @@ func (r *ProjectsLocationsDataTaxonomiesService) SetIamPolicy(resource string, g // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesSetIamPolicyCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) @@ -13135,13 +15034,13 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13173,7 +15072,7 @@ func (c *ProjectsLocationsDataTaxonomiesSetIamPolicyCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { +type ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -13192,8 +15091,8 @@ type ProjectsLocationsDataTaxonomiesTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsDataTaxonomiesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { - c := &ProjectsLocationsDataTaxonomiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataTaxonomiesAttributesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { + c := &ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -13202,27 +15101,27 @@ func (r *ProjectsLocationsDataTaxonomiesService) TestIamPermissions(resource str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { 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 *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) @@ -13244,13 +15143,13 @@ func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13282,40 +15181,38 @@ func (c *ProjectsLocationsDataTaxonomiesTestIamPermissionsCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesCreateCall struct { - s *Service - parent string - googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsCreateCall struct { + s *Service + parent string + googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a DataAttribute resource. +// Create: Creates an EntryGroup. // -// - parent: The resource name of the parent data taxonomy -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Create(parent string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { - c := &ProjectsLocationsDataTaxonomiesAttributesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the entryGroup, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a GCP region. +func (r *ProjectsLocationsEntryGroupsService) Create(parent string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsCreateCall { + c := &ProjectsLocationsEntryGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute + c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup return c } -// DataAttributeId sets the optional parameter "dataAttributeId": Required. -// DataAttribute identifier. * Must contain only lowercase letters, numbers and -// hyphens. * Must start with a letter. * Must be between 1-63 characters. * -// Must end with a number or a letter. * Must be unique within the -// DataTaxonomy. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) DataAttributeId(dataAttributeId string) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { - c.urlParams_.Set("dataAttributeId", dataAttributeId) +// EntryGroupId sets the optional parameter "entryGroupId": Required. +// EntryGroup identifier. +func (c *ProjectsLocationsEntryGroupsCreateCall) EntryGroupId(entryGroupId string) *ProjectsLocationsEntryGroupsCreateCall { + c.urlParams_.Set("entryGroupId", entryGroupId) return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { +// ValidateOnly sets the optional parameter "validateOnly": The service +// validates the request without performing any mutations. The default is +// false. +func (c *ProjectsLocationsEntryGroupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -13323,36 +15220,36 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) ValidateOnly(valid // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { +func (c *ProjectsLocationsEntryGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesCreateCall { +func (c *ProjectsLocationsEntryGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsCreateCall { 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 *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrygroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13365,13 +15262,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.create" call. +// Do executes the "dataplex.projects.locations.entryGroups.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 *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13403,7 +15300,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesCreateCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesDeleteCall struct { +type ProjectsLocationsEntryGroupsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13411,21 +15308,21 @@ type ProjectsLocationsDataTaxonomiesAttributesDeleteCall struct { header_ http.Header } -// Delete: Deletes a Data Attribute resource. +// Delete: Deletes an EntryGroup. // -// - name: The resource name of the DataAttribute: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon -// omy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Delete(name string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { - c := &ProjectsLocationsDataTaxonomiesAttributesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryGroup: +// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ +// id}. +func (r *ProjectsLocationsEntryGroupsService) Delete(name string) *ProjectsLocationsEntryGroupsDeleteCall { + c := &ProjectsLocationsEntryGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value, the DeleteDataAttribute method +// does not match the current etag value, the DeleteEntryGroupRequest method // returns an ABORTED error response. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Etag(etag string) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Etag(etag string) *ProjectsLocationsEntryGroupsDeleteCall { c.urlParams_.Set("etag", etag) return c } @@ -13433,27 +15330,27 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Etag(etag string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesDeleteCall { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsDeleteCall { 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 *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -13471,13 +15368,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.delete" call. +// Do executes the "dataplex.projects.locations.entryGroups.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 *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13509,7 +15406,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesGetCall struct { +type ProjectsLocationsEntryGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13518,13 +15415,13 @@ type ProjectsLocationsDataTaxonomiesAttributesGetCall struct { header_ http.Header } -// Get: Retrieves a Data Attribute resource. +// Get: Gets an EntryGroup. // -// - name: The resource name of the dataAttribute: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon -// omy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { - c := &ProjectsLocationsDataTaxonomiesAttributesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryGroup: +// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ +// id}. +func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocationsEntryGroupsGetCall { + c := &ProjectsLocationsEntryGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13532,7 +15429,7 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13540,27 +15437,27 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Fields(s ...googleapi // 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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetCall { +func (c *ProjectsLocationsEntryGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetCall { 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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13581,13 +15478,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.get" call. +// Do executes the "dataplex.projects.locations.entryGroups.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1DataAttribute.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1EntryGroup.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 *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1DataAttribute, error) { +func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13606,7 +15503,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1DataAttribute{ + ret := &GoogleCloudDataplexV1EntryGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13619,7 +15516,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -13634,8 +15531,8 @@ type ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) GetIamPolicy(resource string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryGroupsService) GetIamPolicy(resource string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { + c := &ProjectsLocationsEntryGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -13652,7 +15549,7 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) GetIamPolicy(resource // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -13660,7 +15557,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) OptionsReque // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13668,27 +15565,27 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Fields(s ... // 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13709,13 +15606,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryGroups.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13747,7 +15644,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesGetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesListCall struct { +type ProjectsLocationsEntryGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -13756,44 +15653,44 @@ type ProjectsLocationsDataTaxonomiesAttributesListCall struct { header_ http.Header } -// List: Lists Data Attribute resources in a DataTaxonomy. +// List: Lists EntryGroup resources in a project and location. // -// - parent: The resource name of the DataTaxonomy: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxo -// nomy_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) List(parent string) *ProjectsLocationsDataTaxonomiesAttributesListCall { - c := &ProjectsLocationsDataTaxonomiesAttributesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the entryGroup location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsEntryGroupsService) List(parent string) *ProjectsLocationsEntryGroupsListCall { + c := &ProjectsLocationsEntryGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Filter(filter string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Filter(filter string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Order by fields for the // result. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) OrderBy(orderBy string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of -// DataAttributes to return. The service may return fewer than this value. If -// unspecified, at most 10 dataAttributes will be returned. The maximum value +// EntryGroups to return. The service may return fewer than this value. If +// unspecified, the service returns at most 10 EntryGroups. The maximum value // is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageSize(pageSize int64) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListDataAttributes call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to ListDataAttributes +// a previous ListEntryGroups call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters you provide to ListEntryGroups // must match the call that provided the page token. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -13801,7 +15698,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13809,27 +15706,27 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Fields(s ...googleap // 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 *ProjectsLocationsDataTaxonomiesAttributesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesListCall { +func (c *ProjectsLocationsEntryGroupsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsListCall { 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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13837,7 +15734,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13850,13 +15747,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.list" call. +// Do executes the "dataplex.projects.locations.entryGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListDataAttributesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListEntryGroupsResponse.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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListDataAttributesResponse, error) { +func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13875,7 +15772,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListDataAttributesResponse{ + ret := &GoogleCloudDataplexV1ListEntryGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13891,7 +15788,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Do(opts ...googleapi // 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 *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListDataAttributesResponse) error) error { +func (c *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -13909,38 +15806,39 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesListCall) Pages(ctx context.Co } } -type ProjectsLocationsDataTaxonomiesAttributesPatchCall struct { - s *Service - name string - googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsPatchCall struct { + s *Service + name string + googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataAttribute resource. +// Patch: Updates an EntryGroup. // -// - name: Output only. The relative resource name of the dataAttribute, of the -// form: -// projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxon -// omy}/attributes/{data_attribute_id}. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) Patch(name string, googleclouddataplexv1dataattribute *GoogleCloudDataplexV1DataAttribute) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { - c := &ProjectsLocationsDataTaxonomiesAttributesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The relative resource name of the EntryGroup, in the +// format +// projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_ +// group_id}. +func (r *ProjectsLocationsEntryGroupsService) Patch(name string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsPatchCall { + c := &ProjectsLocationsEntryGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1dataattribute = googleclouddataplexv1dataattribute + c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup return c } // UpdateMask sets the optional parameter "updateMask": Required. Mask of // fields to update. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } -// ValidateOnly sets the optional parameter "validateOnly": Only validate the -// request, but do not perform mutations. The default is false. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +// ValidateOnly sets the optional parameter "validateOnly": The service +// validates the request, without performing any mutations. The default is +// false. +func (c *ProjectsLocationsEntryGroupsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -13948,30 +15846,30 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) ValidateOnly(valida // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesPatchCall { +func (c *ProjectsLocationsEntryGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsPatchCall { 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 *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1dataattribute) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrygroup) if err != nil { return nil, err } @@ -13990,13 +15888,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.patch" call. +// Do executes the "dataplex.projects.locations.entryGroups.patch" 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 *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14028,7 +15926,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -14044,8 +15942,8 @@ type ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { - c := &ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryGroupsSetIamPolicyCall { + c := &ProjectsLocationsEntryGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -14054,27 +15952,27 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) SetIamPolicy(resource // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsSetIamPolicyCall { 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 *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) @@ -14096,13 +15994,13 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryGroups.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14134,7 +16032,7 @@ func (c *ProjectsLocationsDataTaxonomiesAttributesSetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall struct { +type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -14153,8 +16051,8 @@ type ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsDataTaxonomiesAttributesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { - c := &ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { + c := &ProjectsLocationsEntryGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -14163,155 +16061,36 @@ func (r *ProjectsLocationsDataTaxonomiesAttributesService) TestIamPermissions(re // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall { - 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 *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataplex.projects.locations.dataTaxonomies.attributes.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsDataTaxonomiesAttributesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsEntryGroupsCreateCall struct { - s *Service - parent string - googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an EntryGroup. -// -// - parent: The resource name of the entryGroup, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a GCP region. -func (r *ProjectsLocationsEntryGroupsService) Create(parent string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsCreateCall { - c := &ProjectsLocationsEntryGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup - return c -} - -// EntryGroupId sets the optional parameter "entryGroupId": Required. -// EntryGroup identifier. -func (c *ProjectsLocationsEntryGroupsCreateCall) EntryGroupId(entryGroupId string) *ProjectsLocationsEntryGroupsCreateCall { - c.urlParams_.Set("entryGroupId", entryGroupId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsEntryGroupsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - 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 *ProjectsLocationsEntryGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsCreateCall { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsCreateCall { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { 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 *ProjectsLocationsEntryGroupsCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrygroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14319,18 +16098,18 @@ func (c *ProjectsLocationsEntryGroupsCreateCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.create" call. +// Do executes the "dataplex.projects.locations.entryGroups.testIamPermissions" 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 +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14349,7 +16128,7 @@ func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14362,81 +16141,96 @@ func (c *ProjectsLocationsEntryGroupsCreateCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsEntryGroupsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesCreateCall struct { + s *Service + parent string + googleclouddataplexv1entry *GoogleCloudDataplexV1Entry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an EntryGroup. +// Create: Creates an Entry. // -// - name: The resource name of the EntryGroup: -// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ -// id}. -func (r *ProjectsLocationsEntryGroupsService) Delete(name string) *ProjectsLocationsEntryGroupsDeleteCall { - c := &ProjectsLocationsEntryGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the parent Entry Group: +// projects/{project}/locations/{location}/entryGroups/{entry_group}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Create(parent string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesCreateCall { + c := &ProjectsLocationsEntryGroupsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddataplexv1entry = googleclouddataplexv1entry return c } -// Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value, the DeleteEntryGroupRequest method -// returns an ABORTED error response. -func (c *ProjectsLocationsEntryGroupsDeleteCall) Etag(etag string) *ProjectsLocationsEntryGroupsDeleteCall { - c.urlParams_.Set("etag", etag) +// EntryId sets the optional parameter "entryId": Required. Entry identifier. +// It has to be unique within an Entry Group.Entries corresponding to Google +// Cloud resources use an Entry ID format based on full resource names +// (https://cloud.google.com/apis/design/resource_names#full_resource_name). +// The format is a full resource name of the resource without the prefix double +// slashes in the API service name part of the full resource name. This allows +// retrieval of entries using their associated resource name.For example, if +// the full resource name of a resource is +// //library.googleapis.com/shelves/shelf1/books/book2, then the suggested +// entry_id is library.googleapis.com/shelves/shelf1/books/book2.It is also +// suggested to follow the same convention for entries corresponding to +// resources from providers or systems other than Google Cloud.The maximum size +// of the field is 4000 characters. +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) EntryId(entryId string) *ProjectsLocationsEntryGroupsEntriesCreateCall { + c.urlParams_.Set("entryId", entryId) 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 *ProjectsLocationsEntryGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsDeleteCall { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsDeleteCall { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesCreateCall { 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 *ProjectsLocationsEntryGroupsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entry) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.delete" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14455,7 +16249,7 @@ func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14468,22 +16262,21 @@ func (c *ProjectsLocationsEntryGroupsDeleteCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsEntryGroupsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an EntryGroup. +// Delete: Deletes an Entry. // -// - name: The resource name of the EntryGroup: -// projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_ -// id}. -func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocationsEntryGroupsGetCall { - c := &ProjectsLocationsEntryGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ +// entry}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesDeleteCall { + c := &ProjectsLocationsEntryGroupsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14491,45 +16284,34 @@ func (r *ProjectsLocationsEntryGroupsService) Get(name string) *ProjectsLocation // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetCall { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 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 *ProjectsLocationsEntryGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetCall { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesDeleteCall { 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 *ProjectsLocationsEntryGroupsGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -14540,13 +16322,13 @@ func (c *ProjectsLocationsEntryGroupsGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.get" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1EntryGroup.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryGroup, error) { +func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14565,7 +16347,7 @@ func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1EntryGroup{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14578,48 +16360,68 @@ func (c *ProjectsLocationsEntryGroupsGetCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsEntryGroupsGetIamPolicyCall struct { +type ProjectsLocationsEntryGroupsEntriesGetCall struct { s *Service - resource string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Get: Gets an Entry. // -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsEntryGroupsService) GetIamPolicy(resource string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { - c := &ProjectsLocationsEntryGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The resource name of the Entry: +// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ +// entry}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Get(name string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c := &ProjectsLocationsEntryGroupsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that will be -// used to format the policy.Valid values are 0, 1, and 3. Requests specifying -// an invalid value will be rejected.Requests for policies with any conditional -// role bindings must specify version 3. Policies with no conditional role -// bindings may specify any valid value or leave the field unset.The policy in -// the response might use the policy version that you specified, or it might -// use a lower policy version. For example, if you specify version 3, but the -// policy has no conditional role bindings, the response uses version 1.To -// learn which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryGroupsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects +// returned to the provided aspect types. It only works for CUSTOM view. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) + return c +} + +// Paths sets the optional parameter "paths": Limits the aspects returned to +// those associated with the provided paths within the Entry. It only works for +// CUSTOM view. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Paths(paths ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + return c +} + +// View sets the optional parameter "view": View to control which parts of an +// entry the service should return. +// +// Possible values: +// +// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. +// "BASIC" - Returns entry only, without aspects. +// "FULL" - Returns all required aspects as well as the keys of all +// +// non-required aspects. +// +// "CUSTOM" - Returns aspects matching custom fields in GetEntryRequest. If +// +// the number of aspects exceeds 100, the first 100 will be returned. +// +// "ALL" - Returns all aspects. If the number of aspects exceeds 100, the +// +// first 100 will be returned. +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) View(view string) *ProjectsLocationsEntryGroupsEntriesGetCall { + c.urlParams_.Set("view", view) 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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14627,27 +16429,27 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Fields(s ...googleapi.Fie // 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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsGetIamPolicyCall { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetCall { 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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -14655,7 +16457,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14663,18 +16465,18 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14693,7 +16495,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudDataplexV1Entry{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14706,7 +16508,7 @@ func (c *ProjectsLocationsEntryGroupsGetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEntryGroupsListCall struct { +type ProjectsLocationsEntryGroupsEntriesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -14715,44 +16517,45 @@ type ProjectsLocationsEntryGroupsListCall struct { header_ http.Header } -// List: Lists EntryGroup resources in a project and location. +// List: Lists Entries within an EntryGroup. // -// - parent: The resource name of the entryGroup location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsEntryGroupsService) List(parent string) *ProjectsLocationsEntryGroupsListCall { - c := &ProjectsLocationsEntryGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the parent Entry Group: +// projects/{project}/locations/{location}/entryGroups/{entry_group}. +func (r *ProjectsLocationsEntryGroupsEntriesService) List(parent string) *ProjectsLocationsEntryGroupsEntriesListCall { + c := &ProjectsLocationsEntryGroupsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter request. -func (c *ProjectsLocationsEntryGroupsListCall) Filter(filter string) *ProjectsLocationsEntryGroupsListCall { +// Filter sets the optional parameter "filter": A filter on the entries to +// return. Filters are case-sensitive. You can filter the request by the +// following fields: entry_type entry_source.display_nameThe comparison +// operators are =, !=, <, >, <=, >=. The service compares strings according to +// lexical order.You can use the logical operators AND, OR, NOT in the +// filter.You can use Wildcard "*", but for entry_type you need to provide the +// full project id or number.Example filter expressions: +// "entry_source.display_name=AnExampleDisplayName" +// "entry_type=projects/example-project/locations/global/entryTypes/example-entr +// y_type" "entry_type=projects/example-project/locations/us/entryTypes/a* OR +// entry_type=projects/another-project/locations/*" "NOT +// entry_source.display_name=AnotherExampleDisplayName" +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Filter(filter string) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Order by fields for the -// result. -func (c *ProjectsLocationsEntryGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsEntryGroupsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// EntryGroups to return. The service may return fewer than this value. If -// unspecified, the service returns at most 10 EntryGroups. The maximum value -// is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsEntryGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsListCall { +// PageSize sets the optional parameter "pageSize": Number of items to return +// per page. If there are remaining results, the service returns a +// next_page_token. If unspecified, the service returns at most 10 Entries. The +// maximum value is 100; values above 100 will be coerced to 100. +func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListEntryGroups call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters you provide to ListEntryGroups -// must match the call that provided the page token. -func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsListCall { +// a previous ListEntries call. Provide this to retrieve the subsequent page. +func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -14760,7 +16563,7 @@ func (c *ProjectsLocationsEntryGroupsListCall) PageToken(pageToken string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14768,27 +16571,27 @@ func (c *ProjectsLocationsEntryGroupsListCall) Fields(s ...googleapi.Field) *Pro // 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 *ProjectsLocationsEntryGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsListCall { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesListCall { 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 *ProjectsLocationsEntryGroupsListCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -14796,7 +16599,7 @@ func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14809,13 +16612,13 @@ func (c *ProjectsLocationsEntryGroupsListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.list" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListEntryGroupsResponse.ServerResponse.Header or (if a +// *GoogleCloudDataplexV1ListEntriesResponse.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 *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryGroupsResponse, error) { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14834,7 +16637,7 @@ func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEntryGroupsResponse{ + ret := &GoogleCloudDataplexV1ListEntriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14850,7 +16653,7 @@ func (c *ProjectsLocationsEntryGroupsListCall) Do(opts ...googleapi.CallOption) // 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 *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryGroupsResponse) error) error { +func (c *ProjectsLocationsEntryGroupsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntriesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -14868,70 +16671,92 @@ func (c *ProjectsLocationsEntryGroupsListCall) Pages(ctx context.Context, f func } } -type ProjectsLocationsEntryGroupsPatchCall struct { - s *Service - name string - googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryGroupsEntriesPatchCall struct { + s *Service + name string + googleclouddataplexv1entry *GoogleCloudDataplexV1Entry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an EntryGroup. +// Patch: Updates an Entry. // -// - name: Output only. The relative resource name of the EntryGroup, in the -// format +// - name: Identifier. The relative resource name of the entry, in the format // projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_ -// group_id}. -func (r *ProjectsLocationsEntryGroupsService) Patch(name string, googleclouddataplexv1entrygroup *GoogleCloudDataplexV1EntryGroup) *ProjectsLocationsEntryGroupsPatchCall { - c := &ProjectsLocationsEntryGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// group_id}/entries/{entry_id}. +func (r *ProjectsLocationsEntryGroupsEntriesService) Patch(name string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c := &ProjectsLocationsEntryGroupsEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddataplexv1entrygroup = googleclouddataplexv1entrygroup + c.googleclouddataplexv1entry = googleclouddataplexv1entry return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsEntryGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// AllowMissing sets the optional parameter "allowMissing": If set to true and +// the entry doesn't exist, the service will create it. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request, without performing any mutations. The default is -// false. -func (c *ProjectsLocationsEntryGroupsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryGroupsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// AspectKeys sets the optional parameter "aspectKeys": The map keys of the +// Aspects which the service should modify. It supports the following syntaxes: +// - matches an aspect of the given type and empty path. @path - matches an +// aspect of the given type and specified path. * - matches aspects of the +// given type for all paths. *@path - matches aspects of all types on the given +// path.The service will not remove existing aspects matching the syntax unless +// delete_missing_aspects is set to true.If this field is left empty, the +// service treats it as specifying exactly those Aspects present in the +// request. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AspectKeys(aspectKeys ...string) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.SetMulti("aspectKeys", append([]string{}, aspectKeys...)) + return c +} + +// DeleteMissingAspects sets the optional parameter "deleteMissingAspects": If +// set to true and the aspect_keys specify aspect ranges, the service deletes +// any existing aspects from that range that weren't provided in the request. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) DeleteMissingAspects(deleteMissingAspects bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { + c.urlParams_.Set("deleteMissingAspects", fmt.Sprint(deleteMissingAspects)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Mask of fields to +// update. To update Aspects, the update_mask must contain the value +// "aspects".If the update_mask is empty, the service will update all +// modifiable fields present in the request. +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesPatchCall { + 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 *ProjectsLocationsEntryGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsPatchCall { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsPatchCall { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesPatchCall { 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 *ProjectsLocationsEntryGroupsPatchCall) Header() http.Header { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrygroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entry) if err != nil { return nil, err } @@ -14950,13 +16775,141 @@ func (c *ProjectsLocationsEntryGroupsPatchCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.patch" call. +// Do executes the "dataplex.projects.locations.entryGroups.entries.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1Entry.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 *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, 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 := &GoogleCloudDataplexV1Entry{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsEntryLinkTypesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsEntryLinkTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + c := &ProjectsLocationsEntryLinkTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + 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 *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryLinkTypesGetIamPolicyCall { + 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 *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.entryLinkTypes.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsEntryLinkTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14975,7 +16928,7 @@ func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14988,7 +16941,7 @@ func (c *ProjectsLocationsEntryGroupsPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { +type ProjectsLocationsEntryLinkTypesSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -15004,8 +16957,8 @@ type ProjectsLocationsEntryGroupsSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryGroupsSetIamPolicyCall { - c := &ProjectsLocationsEntryGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryLinkTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryLinkTypesSetIamPolicyCall { + c := &ProjectsLocationsEntryLinkTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -15014,27 +16967,27 @@ func (r *ProjectsLocationsEntryGroupsService) SetIamPolicy(resource string, goog // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsSetIamPolicyCall { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryLinkTypesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsSetIamPolicyCall { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryLinkTypesSetIamPolicyCall { 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 *ProjectsLocationsEntryGroupsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) @@ -15056,13 +17009,13 @@ func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.entryLinkTypes.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsEntryLinkTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15094,7 +17047,7 @@ func (c *ProjectsLocationsEntryGroupsSetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { +type ProjectsLocationsEntryLinkTypesTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -15113,8 +17066,8 @@ type ProjectsLocationsEntryGroupsTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { - c := &ProjectsLocationsEntryGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsEntryLinkTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall { + c := &ProjectsLocationsEntryLinkTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -15123,27 +17076,27 @@ func (r *ProjectsLocationsEntryGroupsService) TestIamPermissions(resource string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsTestIamPermissionsCall { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall { 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 *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) @@ -15165,13 +17118,13 @@ func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.entryLinkTypes.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsEntryLinkTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15203,77 +17156,75 @@ func (c *ProjectsLocationsEntryGroupsTestIamPermissionsCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsEntryGroupsEntriesCreateCall struct { - s *Service - parent string - googleclouddataplexv1entry *GoogleCloudDataplexV1Entry - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesCreateCall struct { + s *Service + parent string + googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Entry. +// Create: Creates an EntryType. // -// - parent: The resource name of the parent Entry Group: -// projects/{project}/locations/{location}/entryGroups/{entry_group}. -func (r *ProjectsLocationsEntryGroupsEntriesService) Create(parent string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesCreateCall { - c := &ProjectsLocationsEntryGroupsEntriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the EntryType, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsEntryTypesService) Create(parent string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesCreateCall { + c := &ProjectsLocationsEntryTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddataplexv1entry = googleclouddataplexv1entry + c.googleclouddataplexv1entrytype = googleclouddataplexv1entrytype return c } -// EntryId sets the optional parameter "entryId": Required. Entry identifier. -// It has to be unique within an Entry Group.Entries corresponding to Google -// Cloud resources use an Entry ID format based on full resource names -// (https://cloud.google.com/apis/design/resource_names#full_resource_name). -// The format is a full resource name of the resource without the prefix double -// slashes in the API service name part of the full resource name. This allows -// retrieval of entries using their associated resource name.For example, if -// the full resource name of a resource is -// //library.googleapis.com/shelves/shelf1/books/book2, then the suggested -// entry_id is library.googleapis.com/shelves/shelf1/books/book2.It is also -// suggested to follow the same convention for entries corresponding to -// resources from providers or systems other than Google Cloud.The maximum size -// of the field is 4000 characters. -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) EntryId(entryId string) *ProjectsLocationsEntryGroupsEntriesCreateCall { - c.urlParams_.Set("entryId", entryId) +// EntryTypeId sets the optional parameter "entryTypeId": Required. EntryType +// identifier. +func (c *ProjectsLocationsEntryTypesCreateCall) EntryTypeId(entryTypeId string) *ProjectsLocationsEntryTypesCreateCall { + c.urlParams_.Set("entryTypeId", entryTypeId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": The service +// validates the request without performing any mutations. The default is +// false. +func (c *ProjectsLocationsEntryTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 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 *ProjectsLocationsEntryGroupsEntriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesCreateCall { +func (c *ProjectsLocationsEntryTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesCreateCall { +func (c *ProjectsLocationsEntryTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesCreateCall { 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 *ProjectsLocationsEntryGroupsEntriesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entry) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15286,13 +17237,13 @@ func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.create" call. +// Do executes the "dataplex.projects.locations.entryTypes.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15311,7 +17262,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15324,7 +17275,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { +type ProjectsLocationsEntryTypesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15332,41 +17283,49 @@ type ProjectsLocationsEntryGroupsEntriesDeleteCall struct { header_ http.Header } -// Delete: Deletes an Entry. +// Delete: Deletes an EntryType. // -// - name: The resource name of the Entry: -// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ -// entry}. -func (r *ProjectsLocationsEntryGroupsEntriesService) Delete(name string) *ProjectsLocationsEntryGroupsEntriesDeleteCall { - c := &ProjectsLocationsEntryGroupsEntriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryType: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id +// }. +func (r *ProjectsLocationsEntryTypesService) Delete(name string) *ProjectsLocationsEntryTypesDeleteCall { + c := &ProjectsLocationsEntryTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Etag sets the optional parameter "etag": If the client provided etag value +// does not match the current etag value, the DeleteEntryTypeRequest method +// returns an ABORTED error response. +func (c *ProjectsLocationsEntryTypesDeleteCall) Etag(etag string) *ProjectsLocationsEntryTypesDeleteCall { + c.urlParams_.Set("etag", etag) + 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 *ProjectsLocationsEntryGroupsEntriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesDeleteCall { +func (c *ProjectsLocationsEntryTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesDeleteCall { +func (c *ProjectsLocationsEntryTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesDeleteCall { 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 *ProjectsLocationsEntryGroupsEntriesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -15384,13 +17343,13 @@ func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.delete" call. +// Do executes the "dataplex.projects.locations.entryTypes.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15409,7 +17368,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15422,7 +17381,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsEntryGroupsEntriesGetCall struct { +type ProjectsLocationsEntryTypesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15431,59 +17390,21 @@ type ProjectsLocationsEntryGroupsEntriesGetCall struct { header_ http.Header } -// Get: Gets an Entry. +// Get: Gets an EntryType. // -// - name: The resource name of the Entry: -// projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{ -// entry}. -func (r *ProjectsLocationsEntryGroupsEntriesService) Get(name string) *ProjectsLocationsEntryGroupsEntriesGetCall { - c := &ProjectsLocationsEntryGroupsEntriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the EntryType: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id +// }. +func (r *ProjectsLocationsEntryTypesService) Get(name string) *ProjectsLocationsEntryTypesGetCall { + c := &ProjectsLocationsEntryTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// AspectTypes sets the optional parameter "aspectTypes": Limits the aspects -// returned to the provided aspect types. It only works for CUSTOM view. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) AspectTypes(aspectTypes ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { - c.urlParams_.SetMulti("aspectTypes", append([]string{}, aspectTypes...)) - return c -} - -// Paths sets the optional parameter "paths": Limits the aspects returned to -// those associated with the provided paths within the Entry. It only works for -// CUSTOM view. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Paths(paths ...string) *ProjectsLocationsEntryGroupsEntriesGetCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - return c -} - -// View sets the optional parameter "view": View to control which parts of an -// entry the service should return. -// -// Possible values: -// -// "ENTRY_VIEW_UNSPECIFIED" - Unspecified EntryView. Defaults to FULL. -// "BASIC" - Returns entry only, without aspects. -// "FULL" - Returns all required aspects as well as the keys of all -// -// non-required aspects. -// -// "CUSTOM" - Returns aspects matching custom fields in GetEntryRequest. If -// -// the number of aspects exceeds 100, the first 100 will be returned. -// -// "ALL" - Returns all aspects. If the number of aspects exceeds 100, the -// -// first 100 will be returned. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) View(view string) *ProjectsLocationsEntryGroupsEntriesGetCall { - c.urlParams_.Set("view", view) - 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 *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesGetCall { +func (c *ProjectsLocationsEntryTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15491,27 +17412,27 @@ func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Fields(s ...googleapi.Field // 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 *ProjectsLocationsEntryGroupsEntriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesGetCall { +func (c *ProjectsLocationsEntryTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesGetCall { +func (c *ProjectsLocationsEntryTypesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetCall { 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 *ProjectsLocationsEntryGroupsEntriesGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15532,13 +17453,13 @@ func (c *ProjectsLocationsEntryGroupsEntriesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.get" call. +// Do executes the "dataplex.projects.locations.entryTypes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was +// *GoogleCloudDataplexV1EntryType.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 *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15557,7 +17478,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleCloudDataplexV1EntryType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15570,62 +17491,48 @@ func (c *ProjectsLocationsEntryGroupsEntriesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsEntryGroupsEntriesListCall struct { +type ProjectsLocationsEntryTypesGetIamPolicyCall struct { s *Service - parent string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Entries within an EntryGroup. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - parent: The resource name of the parent Entry Group: -// projects/{project}/locations/{location}/entryGroups/{entry_group}. -func (r *ProjectsLocationsEntryGroupsEntriesService) List(parent string) *ProjectsLocationsEntryGroupsEntriesListCall { - c := &ProjectsLocationsEntryGroupsEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter on the entries to -// return. Filters are case-sensitive. You can filter the request by the -// following fields: entry_type entry_source.display_nameThe comparison -// operators are =, !=, <, >, <=, >=. The service compares strings according to -// lexical order.You can use the logical operators AND, OR, NOT in the -// filter.You can use Wildcard "*", but for entry_type you need to provide the -// full project id or number.Example filter expressions: -// "entry_source.display_name=AnExampleDisplayName" -// "entry_type=projects/example-project/locations/global/entryTypes/example-entr -// y_type" "entry_type=projects/example-project/locations/us/entryTypes/a* OR -// entry_type=projects/another-project/locations/*" "NOT -// entry_source.display_name=AnotherExampleDisplayName" -func (c *ProjectsLocationsEntryGroupsEntriesListCall) Filter(filter string) *ProjectsLocationsEntryGroupsEntriesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Number of items to return -// per page. If there are remaining results, the service returns a -// next_page_token. If unspecified, the service returns at most 10 Entries. The -// maximum value is 100; values above 100 will be coerced to 100. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryGroupsEntriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c := &ProjectsLocationsEntryTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListEntries call. Provide this to retrieve the subsequent page. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) PageToken(pageToken string) *ProjectsLocationsEntryGroupsEntriesListCall { - c.urlParams_.Set("pageToken", pageToken) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryTypesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsEntryGroupsEntriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesListCall { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15633,27 +17540,27 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) 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 *ProjectsLocationsEntryGroupsEntriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryGroupsEntriesListCall { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesListCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesListCall { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetIamPolicyCall { 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 *ProjectsLocationsEntryGroupsEntriesListCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15661,7 +17568,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15669,18 +17576,18 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.list" call. +// Do executes the "dataplex.projects.locations.entryTypes.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListEntriesResponse.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 *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntriesResponse, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15699,7 +17606,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEntriesResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15712,138 +17619,119 @@ func (c *ProjectsLocationsEntryGroupsEntriesListCall) Do(opts ...googleapi.CallO 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 *ProjectsLocationsEntryGroupsEntriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntriesResponse) 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 ProjectsLocationsEntryGroupsEntriesPatchCall struct { - s *Service - name string - googleclouddataplexv1entry *GoogleCloudDataplexV1Entry - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Entry. +// List: Lists EntryType resources in a project and location. // -// - name: Identifier. The relative resource name of the entry, in the format -// projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_ -// group_id}/entries/{entry_id}. -func (r *ProjectsLocationsEntryGroupsEntriesService) Patch(name string, googleclouddataplexv1entry *GoogleCloudDataplexV1Entry) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c := &ProjectsLocationsEntryGroupsEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1entry = googleclouddataplexv1entry +// - parent: The resource name of the EntryType location, of the form: +// projects/{project_number}/locations/{location_id} where location_id refers +// to a Google Cloud region. +func (r *ProjectsLocationsEntryTypesService) List(parent string) *ProjectsLocationsEntryTypesListCall { + c := &ProjectsLocationsEntryTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// AllowMissing sets the optional parameter "allowMissing": If set to true and -// the entry doesn't exist, the service will create it. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// Filter sets the optional parameter "filter": Filter request. Filters are +// case-sensitive. The service supports the following formats: labels.key1 = +// "value1" labels:key1 name = "value"These restrictions can be conjoined with +// AND, OR, and NOT conjunctions. +func (c *ProjectsLocationsEntryTypesListCall) Filter(filter string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("filter", filter) return c } -// AspectKeys sets the optional parameter "aspectKeys": The map keys of the -// Aspects which the service should modify. It supports the following syntaxes: -// - matches an aspect of the given type and empty path. @path - matches an -// aspect of the given type and specified path. * - matches aspects of the -// given type for all paths. *@path - matches aspects of all types on the given -// path.The service will not remove existing aspects matching the syntax unless -// delete_missing_aspects is set to true.If this field is left empty, the -// service treats it as specifying exactly those Aspects present in the -// request. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) AspectKeys(aspectKeys ...string) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c.urlParams_.SetMulti("aspectKeys", append([]string{}, aspectKeys...)) +// OrderBy sets the optional parameter "orderBy": Orders the result by name or +// create_time fields. If not specified, the ordering is undefined. +func (c *ProjectsLocationsEntryTypesListCall) OrderBy(orderBy string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// DeleteMissingAspects sets the optional parameter "deleteMissingAspects": If -// set to true and the aspect_keys specify aspect ranges, the service deletes -// any existing aspects from that range that weren't provided in the request. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) DeleteMissingAspects(deleteMissingAspects bool) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c.urlParams_.Set("deleteMissingAspects", fmt.Sprint(deleteMissingAspects)) +// PageSize sets the optional parameter "pageSize": Maximum number of +// EntryTypes to return. The service may return fewer than this value. If +// unspecified, the service returns at most 10 EntryTypes. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsEntryTypesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UpdateMask sets the optional parameter "updateMask": Mask of fields to -// update. To update Aspects, the update_mask must contain the value -// "aspects".If the update_mask is empty, the service will update all -// modifiable fields present in the request. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryGroupsEntriesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous ListEntryTypes call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters you provided to ListEntryTypes +// must match the call that provided the page token. +func (c *ProjectsLocationsEntryTypesListCall) PageToken(pageToken string) *ProjectsLocationsEntryTypesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryGroupsEntriesPatchCall { +func (c *ProjectsLocationsEntryTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesListCall { 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 *ProjectsLocationsEntryTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryGroupsEntriesPatchCall { +func (c *ProjectsLocationsEntryTypesListCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesListCall { 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 *ProjectsLocationsEntryGroupsEntriesPatchCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entry) - if err != nil { - return nil, err +func (c *ProjectsLocationsEntryTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryGroups.entries.patch" call. +// Do executes the "dataplex.projects.locations.entryTypes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1Entry.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDataplexV1ListEntryTypesResponse.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 *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1Entry, error) { +func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryTypesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15862,7 +17750,7 @@ func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1Entry{ + ret := &GoogleCloudDataplexV1ListEntryTypesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15875,38 +17763,60 @@ func (c *ProjectsLocationsEntryGroupsEntriesPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsEntryTypesCreateCall struct { +// 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 *ProjectsLocationsEntryTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryTypesResponse) 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 ProjectsLocationsEntryTypesPatchCall struct { s *Service - parent string + name string googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates an EntryType. +// Patch: Updates an EntryType. // -// - parent: The resource name of the EntryType, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsEntryTypesService) Create(parent string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesCreateCall { - c := &ProjectsLocationsEntryTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Output only. The relative resource name of the EntryType, of the +// form: +// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id +// }. +func (r *ProjectsLocationsEntryTypesService) Patch(name string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesPatchCall { + c := &ProjectsLocationsEntryTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddataplexv1entrytype = googleclouddataplexv1entrytype return c } -// EntryTypeId sets the optional parameter "entryTypeId": Required. EntryType -// identifier. -func (c *ProjectsLocationsEntryTypesCreateCall) EntryTypeId(entryTypeId string) *ProjectsLocationsEntryTypesCreateCall { - c.urlParams_.Set("entryTypeId", entryTypeId) +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. +func (c *ProjectsLocationsEntryTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryTypesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // ValidateOnly sets the optional parameter "validateOnly": The service // validates the request without performing any mutations. The default is // false. -func (c *ProjectsLocationsEntryTypesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesCreateCall { +func (c *ProjectsLocationsEntryTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -15914,27 +17824,27 @@ func (c *ProjectsLocationsEntryTypesCreateCall) ValidateOnly(validateOnly bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesCreateCall { +func (c *ProjectsLocationsEntryTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesCreateCall { +func (c *ProjectsLocationsEntryTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesPatchCall { 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 *ProjectsLocationsEntryTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEntryTypesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) @@ -15943,26 +17853,26 @@ func (c *ProjectsLocationsEntryTypesCreateCall) doRequest(alt string) (*http.Res } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.create" call. +// Do executes the "dataplex.projects.locations.entryTypes.patch" 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 *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15994,81 +17904,81 @@ func (c *ProjectsLocationsEntryTypesCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an EntryType. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - name: The resource name of the EntryType: -// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id -// }. -func (r *ProjectsLocationsEntryTypesService) Delete(name string) *ProjectsLocationsEntryTypesDeleteCall { - c := &ProjectsLocationsEntryTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Etag sets the optional parameter "etag": If the client provided etag value -// does not match the current etag value, the DeleteEntryTypeRequest method -// returns an ABORTED error response. -func (c *ProjectsLocationsEntryTypesDeleteCall) Etag(etag string) *ProjectsLocationsEntryTypesDeleteCall { - c.urlParams_.Set("etag", etag) +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsEntryTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryTypesSetIamPolicyCall { + c := &ProjectsLocationsEntryTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest 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 *ProjectsLocationsEntryTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesDeleteCall { +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesDeleteCall { +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesSetIamPolicyCall { 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 *ProjectsLocationsEntryTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.delete" call. +// Do executes the "dataplex.projects.locations.entryTypes.setIamPolicy" 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 *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16087,7 +17997,7 @@ func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16100,85 +18010,84 @@ func (c *ProjectsLocationsEntryTypesDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEntryTypesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an EntryType. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. // -// - name: The resource name of the EntryType: -// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id -// }. -func (r *ProjectsLocationsEntryTypesService) Get(name string) *ProjectsLocationsEntryTypesGetCall { - c := &ProjectsLocationsEntryTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsEntryTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryTypesTestIamPermissionsCall { + c := &ProjectsLocationsEntryTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest 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 *ProjectsLocationsEntryTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetCall { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesTestIamPermissionsCall { 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 *ProjectsLocationsEntryTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesGetCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetCall { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesTestIamPermissionsCall { 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 *ProjectsLocationsEntryTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesGetCall) 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 *ProjectsLocationsEntryTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.get" call. +// Do executes the "dataplex.projects.locations.entryTypes.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1EntryType.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1EntryType, error) { +func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16197,7 +18106,7 @@ func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1EntryType{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16210,7 +18119,7 @@ func (c *ProjectsLocationsEntryTypesGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsEntryTypesGetIamPolicyCall struct { +type ProjectsLocationsGlossariesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -16225,8 +18134,8 @@ type ProjectsLocationsEntryTypesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *ProjectsLocationsEntryTypesGetIamPolicyCall { - c := &ProjectsLocationsEntryTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesGetIamPolicyCall { + c := &ProjectsLocationsGlossariesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -16243,7 +18152,7 @@ func (r *ProjectsLocationsEntryTypesService) GetIamPolicy(resource string) *Proj // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -16251,7 +18160,7 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) OptionsRequestedPolicyVers // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16259,27 +18168,27 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGetIamPolicyCall { 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 *ProjectsLocationsEntryTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16300,13 +18209,13 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16338,119 +18247,190 @@ func (c *ProjectsLocationsEntryTypesGetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEntryTypesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlossariesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists EntryType resources in a project and location. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - parent: The resource name of the EntryType location, of the form: -// projects/{project_number}/locations/{location_id} where location_id refers -// to a Google Cloud region. -func (r *ProjectsLocationsEntryTypesService) List(parent string) *ProjectsLocationsEntryTypesListCall { - c := &ProjectsLocationsEntryTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - resource: REQUIRED: The resource for which the policy is being specified. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsGlossariesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesSetIamPolicyCall { + c := &ProjectsLocationsGlossariesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } -// Filter sets the optional parameter "filter": Filter request. Filters are -// case-sensitive. The service supports the following formats: labels.key1 = -// "value1" labels:key1 name = "value"These restrictions can be conjoined with -// AND, OR, and NOT conjunctions. -func (c *ProjectsLocationsEntryTypesListCall) Filter(filter string) *ProjectsLocationsEntryTypesListCall { - 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 *ProjectsLocationsGlossariesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// OrderBy sets the optional parameter "orderBy": Orders the result by name or -// create_time fields. If not specified, the ordering is undefined. -func (c *ProjectsLocationsEntryTypesListCall) OrderBy(orderBy string) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("orderBy", orderBy) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesSetIamPolicyCall { + c.ctx_ = ctx return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// EntryTypes to return. The service may return fewer than this value. If -// unspecified, the service returns at most 10 EntryTypes. The maximum value is -// 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsEntryTypesListCall) PageSize(pageSize int64) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlossariesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "dataplex.projects.locations.glossaries.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsGlossariesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGlossariesTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous ListEntryTypes call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters you provided to ListEntryTypes -// must match the call that provided the page token. -func (c *ProjectsLocationsEntryTypesListCall) PageToken(pageToken string) *ProjectsLocationsEntryTypesListCall { - c.urlParams_.Set("pageToken", pageToken) +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. If the resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error.Note: This operation is designed to be +// used for building permission-aware UIs and command-line tools, not for +// authorization checking. This operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the appropriate +// value for this field. +func (r *ProjectsLocationsGlossariesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesTestIamPermissionsCall { + c := &ProjectsLocationsGlossariesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest 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 *ProjectsLocationsEntryTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesListCall { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTestIamPermissionsCall { 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 *ProjectsLocationsEntryTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntryTypesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesListCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesListCall { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTestIamPermissionsCall { 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 *ProjectsLocationsEntryTypesListCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesListCall) 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 *ProjectsLocationsGlossariesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entryTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", 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{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.list" call. +// Do executes the "dataplex.projects.locations.glossaries.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDataplexV1ListEntryTypesResponse.ServerResponse.Header or (if a +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDataplexV1ListEntryTypesResponse, error) { +func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16469,7 +18449,7 @@ func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDataplexV1ListEntryTypesResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16482,116 +18462,103 @@ func (c *ProjectsLocationsEntryTypesListCall) Do(opts ...googleapi.CallOption) ( 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 *ProjectsLocationsEntryTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDataplexV1ListEntryTypesResponse) 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 ProjectsLocationsEntryTypesPatchCall struct { - s *Service - name string - googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGlossariesCategoriesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an EntryType. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: Output only. The relative resource name of the EntryType, of the -// form: -// projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id -// }. -func (r *ProjectsLocationsEntryTypesService) Patch(name string, googleclouddataplexv1entrytype *GoogleCloudDataplexV1EntryType) *ProjectsLocationsEntryTypesPatchCall { - c := &ProjectsLocationsEntryTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddataplexv1entrytype = googleclouddataplexv1entrytype - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask of -// fields to update. -func (c *ProjectsLocationsEntryTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEntryTypesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - resource: REQUIRED: The resource for which the policy is being requested. +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsGlossariesCategoriesService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { + c := &ProjectsLocationsGlossariesCategoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": The service -// validates the request without performing any mutations. The default is -// false. -func (c *ProjectsLocationsEntryTypesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsEntryTypesPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that will be +// used to format the policy.Valid values are 0, 1, and 3. Requests specifying +// an invalid value will be rejected.Requests for policies with any conditional +// role bindings must specify version 3. Policies with no conditional role +// bindings may specify any valid value or leave the field unset.The policy in +// the response might use the policy version that you specified, or it might +// use a lower policy version. For example, if you specify version 3, but the +// policy has no conditional role bindings, the response uses version 1.To +// learn which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", 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 *ProjectsLocationsEntryTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesPatchCall { +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { 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 *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesPatchCall { +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall { 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 *ProjectsLocationsEntryTypesPatchCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddataplexv1entrytype) - if err != nil { - return nil, err +func (c *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.patch" call. +// Do executes the "dataplex.projects.locations.glossaries.categories.getIamPolicy" 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 *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsGlossariesCategoriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16610,7 +18577,7 @@ func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16623,7 +18590,7 @@ func (c *ProjectsLocationsEntryTypesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEntryTypesSetIamPolicyCall struct { +type ProjectsLocationsGlossariesCategoriesSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -16639,8 +18606,8 @@ type ProjectsLocationsEntryTypesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsEntryTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsEntryTypesSetIamPolicyCall { - c := &ProjectsLocationsEntryTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesCategoriesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall { + c := &ProjectsLocationsGlossariesCategoriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -16649,27 +18616,27 @@ func (r *ProjectsLocationsEntryTypesService) SetIamPolicy(resource string, googl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesSetIamPolicyCall { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesSetIamPolicyCall { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall { 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 *ProjectsLocationsEntryTypesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) @@ -16691,13 +18658,13 @@ func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.categories.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGlossariesCategoriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16729,7 +18696,7 @@ func (c *ProjectsLocationsEntryTypesSetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEntryTypesTestIamPermissionsCall struct { +type ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -16748,8 +18715,8 @@ type ProjectsLocationsEntryTypesTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsEntryTypesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsEntryTypesTestIamPermissionsCall { - c := &ProjectsLocationsEntryTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesCategoriesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall { + c := &ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -16758,27 +18725,27 @@ func (r *ProjectsLocationsEntryTypesService) TestIamPermissions(resource string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntryTypesTestIamPermissionsCall { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEntryTypesTestIamPermissionsCall { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall { 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 *ProjectsLocationsEntryTypesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) @@ -16800,13 +18767,13 @@ func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.entryTypes.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.glossaries.categories.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsGlossariesCategoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16838,7 +18805,7 @@ func (c *ProjectsLocationsEntryTypesTestIamPermissionsCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsGlossariesGetIamPolicyCall struct { +type ProjectsLocationsGlossariesTermsGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -16853,8 +18820,8 @@ type ProjectsLocationsGlossariesGetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being requested. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsGlossariesService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesGetIamPolicyCall { - c := &ProjectsLocationsGlossariesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesTermsService) GetIamPolicy(resource string) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { + c := &ProjectsLocationsGlossariesTermsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -16871,7 +18838,7 @@ func (r *ProjectsLocationsGlossariesService) GetIamPolicy(resource string) *Proj // learn which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -16879,7 +18846,7 @@ func (c *ProjectsLocationsGlossariesGetIamPolicyCall) OptionsRequestedPolicyVers // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16887,27 +18854,27 @@ func (c *ProjectsLocationsGlossariesGetIamPolicyCall) 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 *ProjectsLocationsGlossariesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesGetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTermsGetIamPolicyCall { 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 *ProjectsLocationsGlossariesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlossariesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16928,13 +18895,13 @@ func (c *ProjectsLocationsGlossariesGetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.glossaries.getIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.terms.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsGlossariesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGlossariesTermsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16966,7 +18933,7 @@ func (c *ProjectsLocationsGlossariesGetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsGlossariesSetIamPolicyCall struct { +type ProjectsLocationsGlossariesTermsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -16982,8 +18949,8 @@ type ProjectsLocationsGlossariesSetIamPolicyCall struct { // - resource: REQUIRED: The resource for which the policy is being specified. // See Resource names (https://cloud.google.com/apis/design/resource_names) // for the appropriate value for this field. -func (r *ProjectsLocationsGlossariesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesSetIamPolicyCall { - c := &ProjectsLocationsGlossariesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesTermsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsGlossariesTermsSetIamPolicyCall { + c := &ProjectsLocationsGlossariesTermsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -16992,27 +18959,27 @@ func (r *ProjectsLocationsGlossariesService) SetIamPolicy(resource string, googl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesSetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTermsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesSetIamPolicyCall { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTermsSetIamPolicyCall { 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 *ProjectsLocationsGlossariesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlossariesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) @@ -17034,13 +19001,13 @@ func (c *ProjectsLocationsGlossariesSetIamPolicyCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.glossaries.setIamPolicy" call. +// Do executes the "dataplex.projects.locations.glossaries.terms.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.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 *ProjectsLocationsGlossariesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsGlossariesTermsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17072,7 +19039,7 @@ func (c *ProjectsLocationsGlossariesSetIamPolicyCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsGlossariesTestIamPermissionsCall struct { +type ProjectsLocationsGlossariesTermsTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -17091,8 +19058,8 @@ type ProjectsLocationsGlossariesTestIamPermissionsCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the appropriate // value for this field. -func (r *ProjectsLocationsGlossariesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesTestIamPermissionsCall { - c := &ProjectsLocationsGlossariesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsGlossariesTermsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlossariesTermsTestIamPermissionsCall { + c := &ProjectsLocationsGlossariesTermsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -17101,27 +19068,27 @@ func (r *ProjectsLocationsGlossariesService) TestIamPermissions(resource string, // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTestIamPermissionsCall { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlossariesTermsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTestIamPermissionsCall { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlossariesTermsTestIamPermissionsCall { 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 *ProjectsLocationsGlossariesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) @@ -17143,13 +19110,13 @@ func (c *ProjectsLocationsGlossariesTestIamPermissionsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataplex.projects.locations.glossaries.testIamPermissions" call. +// Do executes the "dataplex.projects.locations.glossaries.terms.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsGlossariesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsGlossariesTermsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index c53eb2a522b..d81a01da7b4 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1065,7 +1065,7 @@ ] }, "run": { - "description": "Use this method to start, resume or recover a stream with a non default CDC strategy. NOTE: This feature is currently experimental.", + "description": "Use this method to start, resume or recover a stream with a non default CDC strategy.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/streams/{streamsId}:run", "httpMethod": "POST", "id": "datastream.projects.locations.streams.run", @@ -1250,7 +1250,7 @@ } } }, - "revision": "20240529", + "revision": "20240814", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AppendOnly": { diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index 3f9b5d1679b..d28421c84fc 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -6003,7 +6003,7 @@ type ProjectsLocationsStreamsRunCall struct { } // Run: Use this method to start, resume or recover a stream with a non default -// CDC strategy. NOTE: This feature is currently experimental. +// CDC strategy. // // - name: Name of the stream resource to start, in the format: // projects/{project_id}/locations/{location}/streams/{stream_name}. diff --git a/developerconnect/v1/developerconnect-api.json b/developerconnect/v1/developerconnect-api.json index 7e980bfc972..b10e36bd582 100644 --- a/developerconnect/v1/developerconnect-api.json +++ b/developerconnect/v1/developerconnect-api.json @@ -15,6 +15,13 @@ "description": "Connect third-party source code management to Google", "discoveryVersion": "v1", "documentationLink": "http://cloud.google.com/developer-connect/docs/overview", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://developerconnect.us-central1.rep.googleapis.com/", + "location": "us-central1" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -840,7 +847,7 @@ } } }, - "revision": "20240523", + "revision": "20240822", "rootUrl": "https://developerconnect.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/dfareporting/v3.5/dfareporting-api.json b/dfareporting/v3.5/dfareporting-api.json index 846c2a97896..c851e089e56 100644 --- a/dfareporting/v3.5/dfareporting-api.json +++ b/dfareporting/v3.5/dfareporting-api.json @@ -161,7 +161,7 @@ } } }, - "revision": "20240613", + "revision": "20240821", "rootUrl": "https://dfareporting.googleapis.com/", "schemas": { "ClickTag": { @@ -399,12 +399,6 @@ "description": "Identifies what kind of resource this is. Value: the fixed string \"dfareporting#creativeAssetMetadata\".", "type": "string" }, - "mediaRequestInfo": { - "$ref": "MediaRequestInfo" - }, - "mediaResponseInfo": { - "$ref": "MediaResponseInfo" - }, "richMedia": { "description": "True if the uploaded asset is a rich media asset. This is a read-only, auto-generated field.", "type": "boolean" @@ -630,154 +624,6 @@ }, "type": "object" }, - "MediaRequestInfo": { - "description": "Extra information added to operations that support Scotty media requests.", - "id": "MediaRequestInfo", - "properties": { - "currentBytes": { - "description": "The number of current bytes uploaded or downloaded.", - "format": "int64", - "type": "string" - }, - "customData": { - "description": "Data to be copied to backend requests. Custom data is returned to Scotty in the agent_state field, which Scotty will then provide in subsequent upload notifications.", - "type": "string" - }, - "diffObjectVersion": { - "description": "Set if the http request info is diff encoded. The value of this field is the version number of the base revision. This is corresponding to Apiary's mediaDiffObjectVersion (//depot/google3/java/com/google/api/server/media/variable/DiffObjectVersionVariable.java). See go/esf-scotty-diff-upload for more information.", - "type": "string" - }, - "finalStatus": { - "description": "The existence of the final_status field indicates that this is the last call to the agent for this request_id. http://google3/uploader/agent/scotty_agent.proto?l=737\u0026rcl=347601929", - "format": "int32", - "type": "integer" - }, - "notificationType": { - "description": "The type of notification received from Scotty.", - "enum": [ - "START", - "PROGRESS", - "END", - "RESPONSE_SENT", - "ERROR" - ], - "enumDescriptions": [ - "Such requests signals the start of a request containing media upload. Only the media field(s) in the inserted/updated resource are set. The response should either return an error or succeed. On success, responses don't need to contain anything.", - "Such requests signals that the upload has progressed and that the backend might want to access the media file specified in relevant fields in the resource. Only the media field(s) in the inserted/updated resource are set. The response should either return an error or succeed. On success, responses don't need to contain anything.", - "Such requests signals the end of a request containing media upload. END should be handled just like normal Insert/Upload requests, that is, they should process the request and return a complete resource in the response. Pointers to media data (a GFS path usually) appear in the relevant fields in the inserted/updated resource. See gdata.Media in data.proto.", - "Such requests occur after an END and signal that the response has been sent back to the client. RESPONSE_SENT is only sent to the backend if it is configured to receive them. The response does not need to contain anything.", - "Such requests indicate that an error occurred while processing the request. ERROR is only sent to the backend if it is configured to receive them. It is not guaranteed that all errors will result in this notification to the backend, even if the backend requests them. Since these requests are just for informational purposes, the response does not need to contain anything." - ], - "type": "string" - }, - "requestId": { - "description": "The Scotty request ID.", - "type": "string" - }, - "requestReceivedParamsServingInfo": { - "description": "The partition of the Scotty server handling this request. type is uploader_service.RequestReceivedParamsServingInfo LINT.IfChange(request_received_params_serving_info_annotations) LINT.ThenChange()", - "format": "byte", - "type": "string" - }, - "totalBytes": { - "description": "The total size of the file.", - "format": "int64", - "type": "string" - }, - "totalBytesIsEstimated": { - "description": "Whether the total bytes field contains an estimated data.", - "type": "boolean" - } - }, - "type": "object" - }, - "MediaResponseInfo": { - "description": "This message is for backends to pass their scotty media specific fields to ESF. Backend will include this in their response message to ESF. Example: ExportFile is an rpc defined for upload using scotty from ESF. rpc ExportFile(ExportFileRequest) returns (ExportFileResponse) Message ExportFileResponse will include apiserving.MediaResponseInfo to tell ESF about data like dynamic_dropzone it needs to pass to Scotty. message ExportFileResponse { optional gdata.Media blob = 1; optional apiserving.MediaResponseInfo media_response_info = 2 }", - "id": "MediaResponseInfo", - "properties": { - "customData": { - "description": "Data to copy from backend response to the next backend requests. Custom data is returned to Scotty in the agent_state field, which Scotty will then provide in subsequent upload notifications.", - "type": "string" - }, - "dataStorageTransform": { - "description": "Specifies any transformation to be applied to data before persisting it or retrieving from storage. E.g., encryption options for blobstore2. This should be of the form uploader_service.DataStorageTransform.", - "format": "byte", - "type": "string" - }, - "dynamicDropTarget": { - "description": "Specifies the Scotty Drop Target to use for uploads. If present in a media response, Scotty does not upload to a standard drop zone. Instead, Scotty saves the upload directly to the location specified in this drop target. Unlike drop zones, the drop target is the final storage location for an upload. So, the agent does not need to clone the blob at the end of the upload. The agent is responsible for garbage collecting any orphaned blobs that may occur due to aborted uploads. For more information, see the drop target design doc here: http://goto/ScottyDropTarget This field will be preferred to dynamicDropzone. If provided, the identified field in the response must be of the type uploader.agent.DropTarget.", - "format": "byte", - "type": "string" - }, - "dynamicDropzone": { - "description": "Specifies the Scotty dropzone to use for uploads.", - "type": "string" - }, - "requestClass": { - "description": "Request class to use for all Blobstore operations for this request.", - "enum": [ - "UNKNOWN_REQUEST_CLASS", - "LATENCY_SENSITIVE", - "PRODUCTION_BATCH", - "BEST_EFFORT" - ], - "enumDescriptions": [ - "Unpopulated request_class in log files will be taken as 0 in dremel query. GoogleSQL will try to cast it to enum by default. An unused 0 value is added to avoid GoogleSQL casting error. Please refer to b/69677280.", - "A latency-sensitive request.", - "A request generated by a batch process.", - "A best-effort request." - ], - "type": "string" - }, - "scottyAgentUserId": { - "description": "Requester ID passed along to be recorded in the Scotty logs", - "format": "int64", - "type": "string" - }, - "scottyCustomerLog": { - "description": "Customer-specific data to be recorded in the Scotty logs type is logs_proto_scotty.CustomerLog", - "format": "byte", - "type": "string" - }, - "trafficClassField": { - "description": "Specifies the TrafficClass that Scotty should use for any RPCs to fetch the response bytes. Will override the traffic class GTOS of the incoming http request. This is a temporary field to facilitate whitelisting and experimentation by the bigstore agent only. For instance, this does not apply to RTMP reads. WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.", - "enum": [ - "BE1", - "AF1", - "AF2", - "AF3", - "AF4", - "NC1", - "NC0", - "BE0", - "LLQ", - "LLQ1", - "LLQ2", - "LLQ3" - ], - "enumDescriptions": [ - "Application-selectable traffic classes Best effort", - "Assured forwarding priority 1", - "Assured forwarding priority 2", - "Assured forwarding priority 3", - "Assured forwarding priority 4", - "Network control", - "Network control", - "Best effort at high packet loss", - "Low-latency queue (LLQ) best effort (go/llq)", - "LLQ assured forwarding priority 1 (go/llq2)", - "LLQ assured forwarding priority 2 (go/llq2)", - "LLQ assured forwarding priority 3 (go/llq3)" - ], - "type": "string" - }, - "verifyHashFromHeader": { - "description": "Tells Scotty to verify hashes on the agent's behalf by parsing out the X-Goog-Hash header.", - "type": "boolean" - } - }, - "type": "object" - }, "OffsetPosition": { "description": "Offset Position.", "id": "OffsetPosition", diff --git a/dfareporting/v3.5/dfareporting-gen.go b/dfareporting/v3.5/dfareporting-gen.go index 99d652b0d6d..224e563ef06 100644 --- a/dfareporting/v3.5/dfareporting-gen.go +++ b/dfareporting/v3.5/dfareporting-gen.go @@ -326,9 +326,7 @@ type CreativeAssetMetadata struct { IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed string // "dfareporting#creativeAssetMetadata". - Kind string `json:"kind,omitempty"` - MediaRequestInfo *MediaRequestInfo `json:"mediaRequestInfo,omitempty"` - MediaResponseInfo *MediaResponseInfo `json:"mediaResponseInfo,omitempty"` + Kind string `json:"kind,omitempty"` // RichMedia: True if the uploaded asset is a rich media asset. This is a // read-only, auto-generated field. RichMedia bool `json:"richMedia,omitempty"` @@ -535,175 +533,6 @@ func (s DimensionValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MediaRequestInfo: Extra information added to operations that support Scotty -// media requests. -type MediaRequestInfo struct { - // CurrentBytes: The number of current bytes uploaded or downloaded. - CurrentBytes int64 `json:"currentBytes,omitempty,string"` - // CustomData: Data to be copied to backend requests. Custom data is returned - // to Scotty in the agent_state field, which Scotty will then provide in - // subsequent upload notifications. - CustomData string `json:"customData,omitempty"` - // DiffObjectVersion: Set if the http request info is diff encoded. The value - // of this field is the version number of the base revision. This is - // corresponding to Apiary's mediaDiffObjectVersion - // (//depot/google3/java/com/google/api/server/media/variable/DiffObjectVersionV - // ariable.java). See go/esf-scotty-diff-upload for more information. - DiffObjectVersion string `json:"diffObjectVersion,omitempty"` - // FinalStatus: The existence of the final_status field indicates that this is - // the last call to the agent for this request_id. - // http://google3/uploader/agent/scotty_agent.proto?l=737&rcl=347601929 - FinalStatus int64 `json:"finalStatus,omitempty"` - // NotificationType: The type of notification received from Scotty. - // - // Possible values: - // "START" - Such requests signals the start of a request containing media - // upload. Only the media field(s) in the inserted/updated resource are set. - // The response should either return an error or succeed. On success, responses - // don't need to contain anything. - // "PROGRESS" - Such requests signals that the upload has progressed and that - // the backend might want to access the media file specified in relevant fields - // in the resource. Only the media field(s) in the inserted/updated resource - // are set. The response should either return an error or succeed. On success, - // responses don't need to contain anything. - // "END" - Such requests signals the end of a request containing media - // upload. END should be handled just like normal Insert/Upload requests, that - // is, they should process the request and return a complete resource in the - // response. Pointers to media data (a GFS path usually) appear in the relevant - // fields in the inserted/updated resource. See gdata.Media in data.proto. - // "RESPONSE_SENT" - Such requests occur after an END and signal that the - // response has been sent back to the client. RESPONSE_SENT is only sent to the - // backend if it is configured to receive them. The response does not need to - // contain anything. - // "ERROR" - Such requests indicate that an error occurred while processing - // the request. ERROR is only sent to the backend if it is configured to - // receive them. It is not guaranteed that all errors will result in this - // notification to the backend, even if the backend requests them. Since these - // requests are just for informational purposes, the response does not need to - // contain anything. - NotificationType string `json:"notificationType,omitempty"` - // RequestId: The Scotty request ID. - RequestId string `json:"requestId,omitempty"` - // RequestReceivedParamsServingInfo: The partition of the Scotty server - // handling this request. type is - // uploader_service.RequestReceivedParamsServingInfo - // LINT.IfChange(request_received_params_serving_info_annotations) - // LINT.ThenChange() - RequestReceivedParamsServingInfo string `json:"requestReceivedParamsServingInfo,omitempty"` - // TotalBytes: The total size of the file. - TotalBytes int64 `json:"totalBytes,omitempty,string"` - // TotalBytesIsEstimated: Whether the total bytes field contains an estimated - // data. - TotalBytesIsEstimated bool `json:"totalBytesIsEstimated,omitempty"` - // ForceSendFields is a list of field names (e.g. "CurrentBytes") 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. "CurrentBytes") 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 MediaRequestInfo) MarshalJSON() ([]byte, error) { - type NoMethod MediaRequestInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MediaResponseInfo: This message is for backends to pass their scotty media -// specific fields to ESF. Backend will include this in their response message -// to ESF. Example: ExportFile is an rpc defined for upload using scotty from -// ESF. rpc ExportFile(ExportFileRequest) returns (ExportFileResponse) Message -// ExportFileResponse will include apiserving.MediaResponseInfo to tell ESF -// about data like dynamic_dropzone it needs to pass to Scotty. message -// ExportFileResponse { optional gdata.Media blob = 1; optional -// apiserving.MediaResponseInfo media_response_info = 2 } -type MediaResponseInfo struct { - // CustomData: Data to copy from backend response to the next backend requests. - // Custom data is returned to Scotty in the agent_state field, which Scotty - // will then provide in subsequent upload notifications. - CustomData string `json:"customData,omitempty"` - // DataStorageTransform: Specifies any transformation to be applied to data - // before persisting it or retrieving from storage. E.g., encryption options - // for blobstore2. This should be of the form - // uploader_service.DataStorageTransform. - DataStorageTransform string `json:"dataStorageTransform,omitempty"` - // DynamicDropTarget: Specifies the Scotty Drop Target to use for uploads. If - // present in a media response, Scotty does not upload to a standard drop zone. - // Instead, Scotty saves the upload directly to the location specified in this - // drop target. Unlike drop zones, the drop target is the final storage - // location for an upload. So, the agent does not need to clone the blob at the - // end of the upload. The agent is responsible for garbage collecting any - // orphaned blobs that may occur due to aborted uploads. For more information, - // see the drop target design doc here: http://goto/ScottyDropTarget This field - // will be preferred to dynamicDropzone. If provided, the identified field in - // the response must be of the type uploader.agent.DropTarget. - DynamicDropTarget string `json:"dynamicDropTarget,omitempty"` - // DynamicDropzone: Specifies the Scotty dropzone to use for uploads. - DynamicDropzone string `json:"dynamicDropzone,omitempty"` - // RequestClass: Request class to use for all Blobstore operations for this - // request. - // - // Possible values: - // "UNKNOWN_REQUEST_CLASS" - Unpopulated request_class in log files will be - // taken as 0 in dremel query. GoogleSQL will try to cast it to enum by - // default. An unused 0 value is added to avoid GoogleSQL casting error. Please - // refer to b/69677280. - // "LATENCY_SENSITIVE" - A latency-sensitive request. - // "PRODUCTION_BATCH" - A request generated by a batch process. - // "BEST_EFFORT" - A best-effort request. - RequestClass string `json:"requestClass,omitempty"` - // ScottyAgentUserId: Requester ID passed along to be recorded in the Scotty - // logs - ScottyAgentUserId int64 `json:"scottyAgentUserId,omitempty,string"` - // ScottyCustomerLog: Customer-specific data to be recorded in the Scotty logs - // type is logs_proto_scotty.CustomerLog - ScottyCustomerLog string `json:"scottyCustomerLog,omitempty"` - // TrafficClassField: Specifies the TrafficClass that Scotty should use for any - // RPCs to fetch the response bytes. Will override the traffic class GTOS of - // the incoming http request. This is a temporary field to facilitate - // whitelisting and experimentation by the bigstore agent only. For instance, - // this does not apply to RTMP reads. WARNING: DO NOT USE WITHOUT PERMISSION - // FROM THE SCOTTY TEAM. - // - // Possible values: - // "BE1" - Application-selectable traffic classes Best effort - // "AF1" - Assured forwarding priority 1 - // "AF2" - Assured forwarding priority 2 - // "AF3" - Assured forwarding priority 3 - // "AF4" - Assured forwarding priority 4 - // "NC1" - Network control - // "NC0" - Network control - // "BE0" - Best effort at high packet loss - // "LLQ" - Low-latency queue (LLQ) best effort (go/llq) - // "LLQ1" - LLQ assured forwarding priority 1 (go/llq2) - // "LLQ2" - LLQ assured forwarding priority 2 (go/llq2) - // "LLQ3" - LLQ assured forwarding priority 3 (go/llq3) - TrafficClassField string `json:"trafficClassField,omitempty"` - // VerifyHashFromHeader: Tells Scotty to verify hashes on the agent's behalf by - // parsing out the X-Goog-Hash header. - VerifyHashFromHeader bool `json:"verifyHashFromHeader,omitempty"` - // ForceSendFields is a list of field names (e.g. "CustomData") 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. "CustomData") 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 MediaResponseInfo) MarshalJSON() ([]byte, error) { - type NoMethod MediaResponseInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // OffsetPosition: Offset Position. type OffsetPosition struct { // Left: Offset distance from left side of an asset or a window. diff --git a/dfareporting/v4/dfareporting-api.json b/dfareporting/v4/dfareporting-api.json index 690beeaafdc..5a5d9d1a2e5 100644 --- a/dfareporting/v4/dfareporting-api.json +++ b/dfareporting/v4/dfareporting-api.json @@ -10067,7 +10067,7 @@ } } }, - "revision": "20240613", + "revision": "20240821", "rootUrl": "https://dfareporting.googleapis.com/", "schemas": { "Account": { @@ -11663,6 +11663,54 @@ }, "type": "object" }, + "CartData": { + "description": "Contains additional information about cart data.", + "id": "CartData", + "properties": { + "items": { + "description": "Data of the items purchased.", + "items": { + "$ref": "CartDataItem" + }, + "type": "array" + }, + "merchantFeedLabel": { + "description": "The feed labels associated with the feed where your items are uploaded. For more information, please refer to ​​ https://support.google.com/merchants/answer/12453549. This is a required field.", + "type": "string" + }, + "merchantFeedLanguage": { + "description": "The language associated with the feed where your items are uploaded. Use ISO 639-1 language codes. This field is needed only when item IDs are not unique across multiple Merchant Center feeds.", + "type": "string" + }, + "merchantId": { + "description": "The Merchant Center ID where the items are uploaded.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "CartDataItem": { + "description": "Contains data of the items purchased.", + "id": "CartDataItem", + "properties": { + "itemId": { + "description": "The shopping id of the item. Must be equal to the Merchant Center product identifier. This is a required field.", + "type": "string" + }, + "quantity": { + "description": "Number of items sold. This is a required field.", + "format": "int32", + "type": "integer" + }, + "unitPrice": { + "description": "Unit price excluding tax, shipping, and any transaction level discounts. Interpreted in CM360 Floodlight config parent advertiser's currency code. This is a required field.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "ChangeLog": { "description": "Describes a change that a user has made to a resource.", "id": "ChangeLog", @@ -12050,6 +12098,10 @@ ], "type": "string" }, + "cartData": { + "$ref": "CartData", + "description": "The cart data associated with this conversion." + }, "childDirectedTreatment": { "description": "Whether this particular request may come from a user under the age of 13, under COPPA compliance.", "type": "boolean" @@ -14964,6 +15016,12 @@ "description": "Name of this directory site.", "type": "string" }, + "publisherSpecificationId": { + "description": "Output only. Default publisher specification ID of video placements under this directory site. Possible values are: * `1`, Hulu * `2`, NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * `7`, VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max", + "format": "int64", + "readOnly": true, + "type": "string" + }, "settings": { "$ref": "DirectorySiteSettings", "description": "Directory site settings." @@ -17614,6 +17672,11 @@ "description": "Whether this placement opts out of ad blocking. When true, ad blocking is disabled for this placement. When false, the campaign and site settings take effect.", "type": "boolean" }, + "adServingPlatformId": { + "description": "Optional. Ad serving platform ID to identify the ad serving platform used by the placement. Measurement partners can use this field to add ad-server specific macros. Possible values are: * `1`, Adelphic * `2`, Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, Beeswax * `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * `11`, Roku OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, Xandr Invest DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * `18`, Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, Cognitiv", + "format": "int64", + "type": "string" + }, "additionalSizes": { "description": "Additional sizes associated with this placement. When inserting or updating a placement, only the size ID field is used.", "items": { @@ -17773,6 +17836,10 @@ "$ref": "DimensionValue", "description": "Dimension value for the ID of the site. This is a read-only, auto-generated field." }, + "siteServed": { + "description": "Optional. Whether the ads in the placement are served by another platform and CM is only used for tracking or they are served by CM. A false value indicates the ad is served by CM.", + "type": "boolean" + }, "size": { "$ref": "Size", "description": "Size associated with this placement. When inserting or updating a placement, only the size ID field is used. This field is required on insertion." @@ -19568,6 +19635,11 @@ "format": "int64", "type": "string" }, + "adServingPlatformId": { + "description": "Optional. Ad serving platform ID to identify the ad serving platform used by the site. Measurement partners can use this field to add ad-server specific macros. If set, this value acts as the default during placement creation. Possible values are: * `1`, Adelphic * `2`, Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, Beeswax * `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * `11`, Roku OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, Xandr Invest DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * `18`, Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, Cognitiv", + "format": "int64", + "type": "string" + }, "approved": { "description": "Whether this site is approved.", "type": "boolean" @@ -19819,7 +19891,7 @@ "type": "string" }, "publisherSpecificationId": { - "description": "Publisher specification ID used to identify site-associated publisher requirements and automatically populate transcode settings. If publisher specification ID is specified, it will take precedence over transcode settings.", + "description": "Publisher specification ID used to identify site-associated publisher requirements and automatically populate transcode settings. If publisher specification ID is specified, it will take precedence over transcode settings. Possible values are: * `1`, Hulu * `2`, NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * `7`, VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max", "format": "int64", "type": "string" }, @@ -21119,7 +21191,7 @@ "type": "string" }, "publisherSpecificationId": { - "description": "Publisher specification ID of a video placement.", + "description": "Publisher specification ID of a video placement. Possible values are: * `1`, Hulu * `2`, NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * `7`, VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max", "format": "int64", "type": "string" }, diff --git a/dfareporting/v4/dfareporting-gen.go b/dfareporting/v4/dfareporting-gen.go index 707918a1604..1e428ef59fc 100644 --- a/dfareporting/v4/dfareporting-gen.go +++ b/dfareporting/v4/dfareporting-gen.go @@ -2569,6 +2569,82 @@ func (s CampaignsListResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CartData: Contains additional information about cart data. +type CartData struct { + // Items: Data of the items purchased. + Items []*CartDataItem `json:"items,omitempty"` + // MerchantFeedLabel: The feed labels associated with the feed where your items + // are uploaded. For more information, please refer to ​​ + // https://support.google.com/merchants/answer/12453549. This is a required + // field. + MerchantFeedLabel string `json:"merchantFeedLabel,omitempty"` + // MerchantFeedLanguage: The language associated with the feed where your items + // are uploaded. Use ISO 639-1 language codes. This field is needed only when + // item IDs are not unique across multiple Merchant Center feeds. + MerchantFeedLanguage string `json:"merchantFeedLanguage,omitempty"` + // MerchantId: The Merchant Center ID where the items are uploaded. + MerchantId int64 `json:"merchantId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Items") 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. "Items") 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 CartData) MarshalJSON() ([]byte, error) { + type NoMethod CartData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CartDataItem: Contains data of the items purchased. +type CartDataItem struct { + // ItemId: The shopping id of the item. Must be equal to the Merchant Center + // product identifier. This is a required field. + ItemId string `json:"itemId,omitempty"` + // Quantity: Number of items sold. This is a required field. + Quantity int64 `json:"quantity,omitempty"` + // UnitPrice: Unit price excluding tax, shipping, and any transaction level + // discounts. Interpreted in CM360 Floodlight config parent advertiser's + // currency code. This is a required field. + UnitPrice float64 `json:"unitPrice,omitempty"` + // ForceSendFields is a list of field names (e.g. "ItemId") 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. "ItemId") 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 CartDataItem) MarshalJSON() ([]byte, error) { + type NoMethod CartDataItem + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *CartDataItem) UnmarshalJSON(data []byte) error { + type NoMethod CartDataItem + var s1 struct { + UnitPrice gensupport.JSONFloat64 `json:"unitPrice"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.UnitPrice = float64(s1.UnitPrice) + return nil +} + // ChangeLog: Describes a change that a user has made to a resource. type ChangeLog struct { // AccountId: Account ID of the modified object. @@ -3047,6 +3123,8 @@ type Conversion struct { // "GRANTED" - Granted. // "DENIED" - Denied. AdUserDataConsent string `json:"adUserDataConsent,omitempty"` + // CartData: The cart data associated with this conversion. + CartData *CartData `json:"cartData,omitempty"` // ChildDirectedTreatment: Whether this particular request may come from a user // under the age of 13, under COPPA compliance. ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"` @@ -5741,6 +5819,16 @@ type DirectorySite struct { Kind string `json:"kind,omitempty"` // Name: Name of this directory site. Name string `json:"name,omitempty"` + // PublisherSpecificationId: Output only. Default publisher specification ID of + // video placements under this directory site. Possible values are: * `1`, Hulu + // * `2`, NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * + // `7`, VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * + // `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst + // Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, + // MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, + // TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * + // `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max + PublisherSpecificationId int64 `json:"publisherSpecificationId,omitempty,string"` // Settings: Directory site settings. Settings *DirectorySiteSettings `json:"settings,omitempty"` // Url: URL of this directory site. @@ -8389,6 +8477,16 @@ type Placement struct { // ad blocking is disabled for this placement. When false, the campaign and // site settings take effect. AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"` + // AdServingPlatformId: Optional. Ad serving platform ID to identify the ad + // serving platform used by the placement. Measurement partners can use this + // field to add ad-server specific macros. Possible values are: * `1`, Adelphic + // * `2`, Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, + // Beeswax * `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * + // `11`, Roku OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, + // Xandr Invest DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * + // `18`, Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, + // Cognitiv + AdServingPlatformId int64 `json:"adServingPlatformId,omitempty,string"` // AdditionalSizes: Additional sizes associated with this placement. When // inserting or updating a placement, only the size ID field is used. AdditionalSizes []*Size `json:"additionalSizes,omitempty"` @@ -8498,6 +8596,10 @@ type Placement struct { // SiteIdDimensionValue: Dimension value for the ID of the site. This is a // read-only, auto-generated field. SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"` + // SiteServed: Optional. Whether the ads in the placement are served by another + // platform and CM is only used for tracking or they are served by CM. A false + // value indicates the ad is served by CM. + SiteServed bool `json:"siteServed,omitempty"` // Size: Size associated with this placement. When inserting or updating a // placement, only the size ID field is used. This field is required on // insertion. @@ -10312,6 +10414,16 @@ type Site struct { // AccountId: Account ID of this site. This is a read-only field that can be // left blank. AccountId int64 `json:"accountId,omitempty,string"` + // AdServingPlatformId: Optional. Ad serving platform ID to identify the ad + // serving platform used by the site. Measurement partners can use this field + // to add ad-server specific macros. If set, this value acts as the default + // during placement creation. Possible values are: * `1`, Adelphic * `2`, + // Adform * `3`, Adobe * `4`, Amobee * `5`, Basis (Centro) * `6`, Beeswax * + // `7`, Amazon * `8`, DV360 (DBM) * `9`, Innovid * `10`, MediaMath * `11`, Roku + // OneView DSP * `12`, TabMo Hawk * `13`, The Trade Desk * `14`, Xandr Invest + // DSP * `15`, Yahoo DSP * `16`, Zeta Global * `17`, Scaleout * `18`, + // Bidtellect * `19`, Unicorn * `20`, Teads * `21`, Quantcast * `22`, Cognitiv + AdServingPlatformId int64 `json:"adServingPlatformId,omitempty,string"` // Approved: Whether this site is approved. Approved bool `json:"approved,omitempty"` // DirectorySiteId: Directory site associated with this site. This is a @@ -10572,7 +10684,14 @@ type SiteVideoSettings struct { // PublisherSpecificationId: Publisher specification ID used to identify // site-associated publisher requirements and automatically populate transcode // settings. If publisher specification ID is specified, it will take - // precedence over transcode settings. + // precedence over transcode settings. Possible values are: * `1`, Hulu * `2`, + // NBC * `3`, CBS * `4`, CBS Desktop * `5`, Discovery * `6`, VEVO HD * `7`, + // VEVO Vertical * `8`, Fox * `9`, CW Network * `10`, Disney * `11`, IGN * + // `12`, NFL.com * `13`, Turner Broadcasting * `14`, Tubi on Fox * `15`, Hearst + // Corporation * `16`, Twitch Desktop * `17`, ABC * `18`, Univision * `19`, + // MLB.com * `20`, MLB.com Mobile * `21`, MLB.com OTT * `22`, Polsat * `23`, + // TVN * `24`, Mediaset * `25`, Antena 3 * `26`, Mediamond * `27`, Sky Italia * + // `28`, Tubi on CBS * `29`, Spotify * `30`, Paramount * `31`, Max PublisherSpecificationId int64 `json:"publisherSpecificationId,omitempty,string"` // SkippableSettings: Settings for the skippability of video creatives served // to this site. This will act as default for new placements created under this @@ -11939,6 +12058,14 @@ type VideoSettings struct { // "PORTRAIT" Orientation string `json:"orientation,omitempty"` // PublisherSpecificationId: Publisher specification ID of a video placement. + // Possible values are: * `1`, Hulu * `2`, NBC * `3`, CBS * `4`, CBS Desktop * + // `5`, Discovery * `6`, VEVO HD * `7`, VEVO Vertical * `8`, Fox * `9`, CW + // Network * `10`, Disney * `11`, IGN * `12`, NFL.com * `13`, Turner + // Broadcasting * `14`, Tubi on Fox * `15`, Hearst Corporation * `16`, Twitch + // Desktop * `17`, ABC * `18`, Univision * `19`, MLB.com * `20`, MLB.com Mobile + // * `21`, MLB.com OTT * `22`, Polsat * `23`, TVN * `24`, Mediaset * `25`, + // Antena 3 * `26`, Mediamond * `27`, Sky Italia * `28`, Tubi on CBS * `29`, + // Spotify * `30`, Paramount * `31`, Max PublisherSpecificationId int64 `json:"publisherSpecificationId,omitempty,string"` // SkippableSettings: Settings for the skippability of video creatives served // to this placement. If this object is provided, the creative-level skippable diff --git a/dialogflow/v2/dialogflow-api.json b/dialogflow/v2/dialogflow-api.json index 5399e4753f6..d745fe9c882 100644 --- a/dialogflow/v2/dialogflow-api.json +++ b/dialogflow/v2/dialogflow-api.json @@ -8714,7 +8714,7 @@ } } }, - "revision": "20240724", + "revision": "20240812", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -9018,17 +9018,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata": { "description": "Metadata associated with the long running operation for Versions.CreateVersion.", "id": "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata", @@ -9067,17 +9056,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3DeployFlowMetadata": { "description": "Metadata returned for the Environments.DeployFlow long running operation.", "id": "GoogleCloudDialogflowCxV3DeployFlowMetadata", @@ -9544,55 +9522,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowCxV3ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata": { "description": "Metadata returned for the EntityTypes.ImportEntityTypes long running operation.", "id": "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata", @@ -10144,17 +10073,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ResponseMessage": { "description": "Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.", "id": "GoogleCloudDialogflowCxV3ResponseMessage", @@ -10362,7 +10280,7 @@ "type": "boolean" }, "text": { - "description": "Required. A collection of text responses.", + "description": "Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -10719,17 +10637,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3Webhook": { "description": "Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.", "id": "GoogleCloudDialogflowCxV3Webhook", @@ -11416,17 +11323,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata": { "description": "Metadata associated with the long running operation for Versions.CreateVersion.", "id": "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata", @@ -11465,17 +11361,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata": { "description": "Metadata returned for the Environments.DeployFlow long running operation.", "id": "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata", @@ -11942,55 +11827,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata": { "description": "Metadata returned for the EntityTypes.ImportEntityTypes long running operation.", "id": "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata", @@ -12546,17 +12382,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1ResponseMessage": { "description": "Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.", "id": "GoogleCloudDialogflowCxV3beta1ResponseMessage", @@ -12752,7 +12577,7 @@ "type": "boolean" }, "text": { - "description": "Required. A collection of text responses.", + "description": "Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -13170,17 +12995,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1Webhook": { "description": "Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.", "id": "GoogleCloudDialogflowCxV3beta1Webhook", @@ -18415,7 +18229,7 @@ "description": "Required. The natural language text query for knowledge search." }, "sessionId": { - "description": "Optional. The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.", + "description": "Required. The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.", "type": "string" } }, @@ -21668,7 +21482,7 @@ "id": "GoogleCloudDialogflowV2beta1ResponseMessageText", "properties": { "text": { - "description": "A collection of text responses.", + "description": "A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -22058,88 +21872,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowV3alpha1ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowV3alpha1TurnSignals": { "description": "Collection of all signals that were extracted for a single turn of the conversation.", "id": "GoogleCloudDialogflowV3alpha1TurnSignals", @@ -22209,17 +21941,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", diff --git a/dialogflow/v2/dialogflow-gen.go b/dialogflow/v2/dialogflow-gen.go index c0b1e1cd625..cbe7c2be9a7 100644 --- a/dialogflow/v2/dialogflow-gen.go +++ b/dialogflow/v2/dialogflow-gen.go @@ -1355,29 +1355,6 @@ func (s GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3CreateVersionOperationMetadata: Metadata associated // with the long running operation for Versions.CreateVersion. type GoogleCloudDialogflowCxV3CreateVersionOperationMetadata struct { @@ -1439,29 +1416,6 @@ func (s GoogleCloudDialogflowCxV3DataStoreConnection) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3DeployFlowMetadata: Metadata returned for the // Environments.DeployFlow long running operation. type GoogleCloudDialogflowCxV3DeployFlowMetadata struct { @@ -2193,81 +2147,6 @@ func (s GoogleCloudDialogflowCxV3GcsDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowCxV3ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowCxV3ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ImportEntityTypesMetadata: Metadata returned for // the EntityTypes.ImportEntityTypes long running operation. type GoogleCloudDialogflowCxV3ImportEntityTypesMetadata struct { @@ -3081,29 +2960,6 @@ func (s GoogleCloudDialogflowCxV3QueryInput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ResponseMessage: Represents a response message that // can be returned by a conversational agent. Response messages are also used // for output audio synthesis. The approach is as follows: * If at least one @@ -3403,7 +3259,8 @@ type GoogleCloudDialogflowCxV3ResponseMessageText struct { // can be interrupted by the end user's speech and the client can then starts // the next Dialogflow request. AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` - // Text: Required. A collection of text responses. + // Text: Required. A collection of text response variants. If multiple variants + // are defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowPlaybackInterruption") // to unconditionally include in API requests. By default, fields with empty or @@ -3875,29 +3732,6 @@ func (s *GoogleCloudDialogflowCxV3TurnSignals) UnmarshalJSON(data []byte) error return nil } -// GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3Webhook: Webhooks host the developer's business // logic. During a session, webhooks allow the developer to use the data // extracted by Dialogflow's natural language processing to generate dynamic @@ -4798,29 +4632,6 @@ func (s GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata: Metadata // associated with the long running operation for Versions.CreateVersion. type GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata struct { @@ -4882,29 +4693,6 @@ func (s GoogleCloudDialogflowCxV3beta1DataStoreConnection) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1DeployFlowMetadata: Metadata returned for the // Environments.DeployFlow long running operation. type GoogleCloudDialogflowCxV3beta1DeployFlowMetadata struct { @@ -5637,81 +5425,6 @@ func (s GoogleCloudDialogflowCxV3beta1GcsDestination) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata: Metadata returned // for the EntityTypes.ImportEntityTypes long running operation. type GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata struct { @@ -6528,29 +6241,6 @@ func (s GoogleCloudDialogflowCxV3beta1QueryInput) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1ResponseMessage: Represents a response message // that can be returned by a conversational agent. Response messages are also // used for output audio synthesis. The approach is as follows: * If at least @@ -6845,7 +6535,8 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessageText struct { // can be interrupted by the end user's speech and the client can then starts // the next Dialogflow request. AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` - // Text: Required. A collection of text responses. + // Text: Required. A collection of text response variants. If multiple variants + // are defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowPlaybackInterruption") // to unconditionally include in API requests. By default, fields with empty or @@ -7399,29 +7090,6 @@ func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) UnmarshalJSON(data []byte) e return nil } -// GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1Webhook: Webhooks host the developer's // business logic. During a session, webhooks allow the developer to use the // data extracted by Dialogflow's natural language processing to generate @@ -14663,7 +14331,7 @@ type GoogleCloudDialogflowV2SearchKnowledgeRequest struct { Parent string `json:"parent,omitempty"` // Query: Required. The natural language text query for knowledge search. Query *GoogleCloudDialogflowV2TextInput `json:"query,omitempty"` - // SessionId: Optional. The ID of the search session. The session_id can be + // SessionId: Required. The ID of the search session. The session_id can be // combined with Dialogflow V3 Agent ID retrieved from conversation profile or // on its own to identify a search session. The search history of the same // session will impact the search result. It's up to the API caller to choose @@ -19312,7 +18980,8 @@ func (s GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall) Marsha // GoogleCloudDialogflowV2beta1ResponseMessageText: The text response message. type GoogleCloudDialogflowV2beta1ResponseMessageText struct { - // Text: A collection of text responses. + // Text: A collection of text response variants. If multiple variants are + // defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "Text") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -19904,150 +19573,6 @@ func (s GoogleCloudDialogflowV3alpha1ConversationSignals) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowV3alpha1ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowV3alpha1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowV3alpha1TurnSignals: Collection of all signals that // were extracted for a single turn of the conversation. type GoogleCloudDialogflowV3alpha1TurnSignals struct { @@ -20116,29 +19641,6 @@ func (s *GoogleCloudDialogflowV3alpha1TurnSignals) UnmarshalJSON(data []byte) er return nil } -// GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { diff --git a/dialogflow/v2beta1/dialogflow-api.json b/dialogflow/v2beta1/dialogflow-api.json index 1d9da16ff47..0f94a67e7b7 100644 --- a/dialogflow/v2beta1/dialogflow-api.json +++ b/dialogflow/v2beta1/dialogflow-api.json @@ -8082,7 +8082,7 @@ } } }, - "revision": "20240724", + "revision": "20240812", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -8386,17 +8386,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata": { "description": "Metadata associated with the long running operation for Versions.CreateVersion.", "id": "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata", @@ -8435,17 +8424,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3DeployFlowMetadata": { "description": "Metadata returned for the Environments.DeployFlow long running operation.", "id": "GoogleCloudDialogflowCxV3DeployFlowMetadata", @@ -8912,55 +8890,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowCxV3ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata": { "description": "Metadata returned for the EntityTypes.ImportEntityTypes long running operation.", "id": "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata", @@ -9512,17 +9441,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ResponseMessage": { "description": "Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.", "id": "GoogleCloudDialogflowCxV3ResponseMessage", @@ -9730,7 +9648,7 @@ "type": "boolean" }, "text": { - "description": "Required. A collection of text responses.", + "description": "Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -10087,17 +10005,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3Webhook": { "description": "Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.", "id": "GoogleCloudDialogflowCxV3Webhook", @@ -10784,17 +10691,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata": { "description": "Metadata associated with the long running operation for Versions.CreateVersion.", "id": "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata", @@ -10833,17 +10729,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata": { "description": "Metadata returned for the Environments.DeployFlow long running operation.", "id": "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata", @@ -11310,55 +11195,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata": { "description": "Metadata returned for the EntityTypes.ImportEntityTypes long running operation.", "id": "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata", @@ -11914,17 +11750,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1ResponseMessage": { "description": "Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.", "id": "GoogleCloudDialogflowCxV3beta1ResponseMessage", @@ -12120,7 +11945,7 @@ "type": "boolean" }, "text": { - "description": "Required. A collection of text responses.", + "description": "Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -12538,17 +12363,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1Webhook": { "description": "Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.", "id": "GoogleCloudDialogflowCxV3beta1Webhook", @@ -20175,7 +19989,7 @@ "id": "GoogleCloudDialogflowV2beta1ResponseMessageText", "properties": { "text": { - "description": "A collection of text responses.", + "description": "A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -20300,7 +20114,7 @@ "description": "Required. The natural language text query for knowledge search." }, "sessionId": { - "description": "Optional. The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.", + "description": "Required. The ID of the search session. The session_id can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate `Session ID`. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.", "type": "string" } }, @@ -21534,88 +21348,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowV3alpha1ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowV3alpha1TurnSignals": { "description": "Collection of all signals that were extracted for a single turn of the conversation.", "id": "GoogleCloudDialogflowV3alpha1TurnSignals", @@ -21685,17 +21417,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", diff --git a/dialogflow/v2beta1/dialogflow-gen.go b/dialogflow/v2beta1/dialogflow-gen.go index 18387ea9318..f235aff1efa 100644 --- a/dialogflow/v2beta1/dialogflow-gen.go +++ b/dialogflow/v2beta1/dialogflow-gen.go @@ -1283,29 +1283,6 @@ func (s GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3CreateVersionOperationMetadata: Metadata associated // with the long running operation for Versions.CreateVersion. type GoogleCloudDialogflowCxV3CreateVersionOperationMetadata struct { @@ -1367,29 +1344,6 @@ func (s GoogleCloudDialogflowCxV3DataStoreConnection) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3DeployFlowMetadata: Metadata returned for the // Environments.DeployFlow long running operation. type GoogleCloudDialogflowCxV3DeployFlowMetadata struct { @@ -2121,81 +2075,6 @@ func (s GoogleCloudDialogflowCxV3GcsDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowCxV3ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowCxV3ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ImportEntityTypesMetadata: Metadata returned for // the EntityTypes.ImportEntityTypes long running operation. type GoogleCloudDialogflowCxV3ImportEntityTypesMetadata struct { @@ -3009,29 +2888,6 @@ func (s GoogleCloudDialogflowCxV3QueryInput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ResponseMessage: Represents a response message that // can be returned by a conversational agent. Response messages are also used // for output audio synthesis. The approach is as follows: * If at least one @@ -3331,7 +3187,8 @@ type GoogleCloudDialogflowCxV3ResponseMessageText struct { // can be interrupted by the end user's speech and the client can then starts // the next Dialogflow request. AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` - // Text: Required. A collection of text responses. + // Text: Required. A collection of text response variants. If multiple variants + // are defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowPlaybackInterruption") // to unconditionally include in API requests. By default, fields with empty or @@ -3803,29 +3660,6 @@ func (s *GoogleCloudDialogflowCxV3TurnSignals) UnmarshalJSON(data []byte) error return nil } -// GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3Webhook: Webhooks host the developer's business // logic. During a session, webhooks allow the developer to use the data // extracted by Dialogflow's natural language processing to generate dynamic @@ -4726,29 +4560,6 @@ func (s GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata: Metadata // associated with the long running operation for Versions.CreateVersion. type GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata struct { @@ -4810,29 +4621,6 @@ func (s GoogleCloudDialogflowCxV3beta1DataStoreConnection) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1DeployFlowMetadata: Metadata returned for the // Environments.DeployFlow long running operation. type GoogleCloudDialogflowCxV3beta1DeployFlowMetadata struct { @@ -5565,81 +5353,6 @@ func (s GoogleCloudDialogflowCxV3beta1GcsDestination) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata: Metadata returned // for the EntityTypes.ImportEntityTypes long running operation. type GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata struct { @@ -6456,29 +6169,6 @@ func (s GoogleCloudDialogflowCxV3beta1QueryInput) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1ResponseMessage: Represents a response message // that can be returned by a conversational agent. Response messages are also // used for output audio synthesis. The approach is as follows: * If at least @@ -6773,7 +6463,8 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessageText struct { // can be interrupted by the end user's speech and the client can then starts // the next Dialogflow request. AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` - // Text: Required. A collection of text responses. + // Text: Required. A collection of text response variants. If multiple variants + // are defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowPlaybackInterruption") // to unconditionally include in API requests. By default, fields with empty or @@ -7327,29 +7018,6 @@ func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) UnmarshalJSON(data []byte) e return nil } -// GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1Webhook: Webhooks host the developer's // business logic. During a session, webhooks allow the developer to use the // data extracted by Dialogflow's natural language processing to generate @@ -17898,7 +17566,8 @@ func (s GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall) Marsha // GoogleCloudDialogflowV2beta1ResponseMessageText: The text response message. type GoogleCloudDialogflowV2beta1ResponseMessageText struct { - // Text: A collection of text responses. + // Text: A collection of text response variants. If multiple variants are + // defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "Text") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -18061,7 +17730,7 @@ type GoogleCloudDialogflowV2beta1SearchKnowledgeRequest struct { Parent string `json:"parent,omitempty"` // Query: Required. The natural language text query for knowledge search. Query *GoogleCloudDialogflowV2beta1TextInput `json:"query,omitempty"` - // SessionId: Optional. The ID of the search session. The session_id can be + // SessionId: Required. The ID of the search session. The session_id can be // combined with Dialogflow V3 Agent ID retrieved from conversation profile or // on its own to identify a search session. The search history of the same // session will impact the search result. It's up to the API caller to choose @@ -19896,150 +19565,6 @@ func (s GoogleCloudDialogflowV3alpha1ConversationSignals) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowV3alpha1ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowV3alpha1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowV3alpha1TurnSignals: Collection of all signals that // were extracted for a single turn of the conversation. type GoogleCloudDialogflowV3alpha1TurnSignals struct { @@ -20108,29 +19633,6 @@ func (s *GoogleCloudDialogflowV3alpha1TurnSignals) UnmarshalJSON(data []byte) er return nil } -// GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { diff --git a/dialogflow/v3/dialogflow-api.json b/dialogflow/v3/dialogflow-api.json index 8701ddf0ae4..71307f95d07 100644 --- a/dialogflow/v3/dialogflow-api.json +++ b/dialogflow/v3/dialogflow-api.json @@ -4453,7 +4453,7 @@ } } }, - "revision": "20240724", + "revision": "20240822", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -4572,6 +4572,10 @@ "description": "The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration.", "type": "string" }, + "clientCertificateSettings": { + "$ref": "GoogleCloudDialogflowCxV3AgentClientCertificateSettings", + "description": "Optional. Settings for custom client certificates." + }, "defaultLanguageCode": { "description": "Required. Immutable. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the Agents.UpdateAgent method.", "type": "string" @@ -4658,6 +4662,25 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3AgentClientCertificateSettings": { + "description": "Settings for custom client certificates.", + "id": "GoogleCloudDialogflowCxV3AgentClientCertificateSettings", + "properties": { + "passphrase": { + "description": "Optional. The name of the SecretManager secret version resource storing the passphrase. 'passphrase' should be left unset if the private key is not encrypted. Format: `projects/{project}/secrets/{secret}/versions/{version}`", + "type": "string" + }, + "privateKey": { + "description": "Required. The name of the SecretManager secret version resource storing the private key encoded in PEM format. Format: `projects/{project}/secrets/{secret}/versions/{version}`", + "type": "string" + }, + "sslCertificate": { + "description": "Required. The ssl certificate encoded in PEM format. This string must include the begin header and end footer lines.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings": { "description": "Settings for Gen App Builder.", "id": "GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings", @@ -4906,6 +4929,10 @@ "format": "float", "type": "number" }, + "boostControlSpec": { + "$ref": "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec", + "description": "Optional. Complex specification for custom ranking based on customer defined attribute value." + }, "condition": { "description": "Optional. An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": * (id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\",\"Blue\"))", "type": "string" @@ -4913,6 +4940,66 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec": { + "description": "Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.", + "id": "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec", + "properties": { + "attributeType": { + "description": "Optional. The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).", + "enum": [ + "ATTRIBUTE_TYPE_UNSPECIFIED", + "NUMERICAL", + "FRESHNESS" + ], + "enumDescriptions": [ + "Unspecified AttributeType.", + "The value of the numerical field will be used to dynamically update the boost amount. In this case, the attribute_value (the x value) of the control point will be the actual value of the numerical field for which the boost_amount is specified.", + "For the freshness use case the attribute value will be the duration between the current time and the date in the datetime field specified. The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. E.g. `5D`, `3DT12H30M`, `T24H`." + ], + "type": "string" + }, + "controlPoints": { + "description": "Optional. The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint" + }, + "type": "array" + }, + "fieldName": { + "description": "Optional. The name of the field whose value will be used to determine the boost amount.", + "type": "string" + }, + "interpolationType": { + "description": "Optional. The interpolation type to be applied to connect the control points listed below.", + "enum": [ + "INTERPOLATION_TYPE_UNSPECIFIED", + "LINEAR" + ], + "enumDescriptions": [ + "Interpolation type is unspecified. In this case, it defaults to Linear.", + "Piecewise linear interpolation will be applied." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "description": "The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).", + "id": "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint", + "properties": { + "attributeValue": { + "description": "Optional. Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.", + "type": "string" + }, + "boostAmount": { + "description": "Optional. The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3BoostSpecs": { "description": "Boost specifications for data stores.", "id": "GoogleCloudDialogflowCxV3BoostSpecs", @@ -5172,17 +5259,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata": { "description": "Metadata associated with the long running operation for Versions.CreateVersion.", "id": "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata", @@ -5447,17 +5523,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3DeployFlowMetadata": { "description": "Metadata returned for the Environments.DeployFlow long running operation.", "id": "GoogleCloudDialogflowCxV3DeployFlowMetadata", @@ -6882,55 +6947,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowCxV3ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata": { "description": "Metadata returned for the EntityTypes.ImportEntityTypes long running operation.", "id": "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata", @@ -8410,17 +8426,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ResourceName": { "description": "Resource name and display name.", "id": "GoogleCloudDialogflowCxV3ResourceName", @@ -8643,7 +8648,7 @@ "type": "boolean" }, "text": { - "description": "Required. A collection of text responses.", + "description": "Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -9603,17 +9608,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ValidateAgentRequest": { "description": "The request message for Agents.ValidateAgent.", "id": "GoogleCloudDialogflowCxV3ValidateAgentRequest", @@ -10526,17 +10520,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata": { "description": "Metadata associated with the long running operation for Versions.CreateVersion.", "id": "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata", @@ -10575,17 +10558,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata": { "description": "Metadata returned for the Environments.DeployFlow long running operation.", "id": "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata", @@ -11052,55 +11024,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata": { "description": "Metadata returned for the EntityTypes.ImportEntityTypes long running operation.", "id": "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata", @@ -11656,17 +11579,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1ResponseMessage": { "description": "Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.", "id": "GoogleCloudDialogflowCxV3beta1ResponseMessage", @@ -11862,7 +11774,7 @@ "type": "boolean" }, "text": { - "description": "Required. A collection of text responses.", + "description": "Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -12280,17 +12192,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1Webhook": { "description": "Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.", "id": "GoogleCloudDialogflowCxV3beta1Webhook", @@ -17160,7 +17061,7 @@ "id": "GoogleCloudDialogflowV2beta1ResponseMessageText", "properties": { "text": { - "description": "A collection of text responses.", + "description": "A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -17550,88 +17451,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowV3alpha1ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowV3alpha1TurnSignals": { "description": "Collection of all signals that were extracted for a single turn of the conversation.", "id": "GoogleCloudDialogflowV3alpha1TurnSignals", @@ -17701,17 +17520,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", diff --git a/dialogflow/v3/dialogflow-gen.go b/dialogflow/v3/dialogflow-gen.go index 80254110a15..10dd06d9309 100644 --- a/dialogflow/v3/dialogflow-gen.go +++ b/dialogflow/v3/dialogflow-gen.go @@ -636,6 +636,9 @@ type GoogleCloudDialogflowCxV3Agent struct { // (https://cloud.google.com/dialogflow/docs/integrations/web-demo) // integration. AvatarUri string `json:"avatarUri,omitempty"` + // ClientCertificateSettings: Optional. Settings for custom client + // certificates. + ClientCertificateSettings *GoogleCloudDialogflowCxV3AgentClientCertificateSettings `json:"clientCertificateSettings,omitempty"` // DefaultLanguageCode: Required. Immutable. The default language of the agent // as a language tag. See Language Support // (https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list @@ -736,6 +739,39 @@ func (s GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3AgentClientCertificateSettings: Settings for custom +// client certificates. +type GoogleCloudDialogflowCxV3AgentClientCertificateSettings struct { + // Passphrase: Optional. The name of the SecretManager secret version resource + // storing the passphrase. 'passphrase' should be left unset if the private key + // is not encrypted. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + Passphrase string `json:"passphrase,omitempty"` + // PrivateKey: Required. The name of the SecretManager secret version resource + // storing the private key encoded in PEM format. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + PrivateKey string `json:"privateKey,omitempty"` + // SslCertificate: Required. The ssl certificate encoded in PEM format. This + // string must include the begin header and end footer lines. + SslCertificate string `json:"sslCertificate,omitempty"` + // ForceSendFields is a list of field names (e.g. "Passphrase") 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. "Passphrase") 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 GoogleCloudDialogflowCxV3AgentClientCertificateSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3AgentClientCertificateSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings: Settings for Gen App // Builder. type GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings struct { @@ -1151,6 +1187,9 @@ type GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec struct { // out completely. Setting to 0.0 means no boost applied. The boosting // condition is ignored. Boost float64 `json:"boost,omitempty"` + // BoostControlSpec: Optional. Complex specification for custom ranking based + // on customer defined attribute value. + BoostControlSpec *GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` // Condition: Optional. An expression which specifies a boost condition. The // syntax and supported fields are the same as a filter expression. Examples: * // To boost documents with document ID "doc_1" or "doc_2", and color "Red" or @@ -1188,6 +1227,107 @@ func (s *GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec) UnmarshalJSON(dat return nil } +// GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec: +// Specification for custom ranking based on customer specified attribute +// value. It provides more controls for customized ranking than the simple +// (condition, boost) combination above. +type GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: Optional. The attribute type to be used to determine the + // boost amount. The attribute value can be derived from the field value of the + // specified field_name. In the case of numerical it is straightforward i.e. + // attribute_value = numerical_field_value. In the case of freshness however, + // attribute_value = (time.now() - datetime_field_value). + // + // Possible values: + // "ATTRIBUTE_TYPE_UNSPECIFIED" - Unspecified AttributeType. + // "NUMERICAL" - The value of the numerical field will be used to dynamically + // update the boost amount. In this case, the attribute_value (the x value) of + // the control point will be the actual value of the numerical field for which + // the boost_amount is specified. + // "FRESHNESS" - For the freshness use case the attribute value will be the + // duration between the current time and the date in the datetime field + // specified. The value must be formatted as an XSD `dayTimeDuration` value (a + // restricted subset of an ISO 8601 duration value). The pattern for this is: + // `nDnM]`. E.g. `5D`, `3DT12H30M`, `T24H`. + AttributeType string `json:"attributeType,omitempty"` + // ControlPoints: Optional. The control points used to define the curve. The + // monotonic function (defined through the interpolation_type above) passes + // through the control points listed here. + ControlPoints []*GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + // FieldName: Optional. The name of the field whose value will be used to + // determine the boost amount. + FieldName string `json:"fieldName,omitempty"` + // InterpolationType: Optional. The interpolation type to be applied to connect + // the control points listed below. + // + // Possible values: + // "INTERPOLATION_TYPE_UNSPECIFIED" - Interpolation type is unspecified. In + // this case, it defaults to Linear. + // "LINEAR" - Piecewise linear interpolation will be applied. + InterpolationType string `json:"interpolationType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeType") 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. "AttributeType") 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 GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPo +// int: The control points used to define the curve. The curve defined through +// these control points can only be monotonically increasing or +// decreasing(constant values are acceptable). +type GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: Optional. Can be one of: 1. The numerical field value. 2. + // The duration spec for freshness: The value must be formatted as an XSD + // `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). + // The pattern for this is: `nDnM]`. + AttributeValue string `json:"attributeValue,omitempty"` + // BoostAmount: Optional. The value between -1 to 1 by which to boost the score + // if the attribute_value evaluates to the value specified above. + BoostAmount float64 `json:"boostAmount,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeValue") 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. "AttributeValue") 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 GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint + var s1 struct { + BoostAmount gensupport.JSONFloat64 `json:"boostAmount"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BoostAmount = float64(s1.BoostAmount) + return nil +} + // GoogleCloudDialogflowCxV3BoostSpecs: Boost specifications for data stores. type GoogleCloudDialogflowCxV3BoostSpecs struct { // DataStores: Optional. Data Stores where the boosting configuration is @@ -1512,29 +1652,6 @@ func (s GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3CreateVersionOperationMetadata: Metadata associated // with the long running operation for Versions.CreateVersion. type GoogleCloudDialogflowCxV3CreateVersionOperationMetadata struct { @@ -1854,29 +1971,6 @@ func (s GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3DeployFlowMetadata: Metadata returned for the // Environments.DeployFlow long running operation. type GoogleCloudDialogflowCxV3DeployFlowMetadata struct { @@ -3919,81 +4013,6 @@ func (s GoogleCloudDialogflowCxV3GeneratorPlaceholder) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowCxV3ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowCxV3ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ImportEntityTypesMetadata: Metadata returned for // the EntityTypes.ImportEntityTypes long running operation. type GoogleCloudDialogflowCxV3ImportEntityTypesMetadata struct { @@ -6190,29 +6209,6 @@ func (s *GoogleCloudDialogflowCxV3QueryResult) UnmarshalJSON(data []byte) error return nil } -// GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ResourceName: Resource name and display name. type GoogleCloudDialogflowCxV3ResourceName struct { // DisplayName: Display name. @@ -6536,7 +6532,8 @@ type GoogleCloudDialogflowCxV3ResponseMessageText struct { // can be interrupted by the end user's speech and the client can then starts // the next Dialogflow request. AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` - // Text: Required. A collection of text responses. + // Text: Required. A collection of text response variants. If multiple variants + // are defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowPlaybackInterruption") // to unconditionally include in API requests. By default, fields with empty or @@ -7967,29 +7964,6 @@ func (s *GoogleCloudDialogflowCxV3TurnSignals) UnmarshalJSON(data []byte) error return nil } -// GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ValidateAgentRequest: The request message for // Agents.ValidateAgent. type GoogleCloudDialogflowCxV3ValidateAgentRequest struct { @@ -9167,29 +9141,6 @@ func (s GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata: Metadata // associated with the long running operation for Versions.CreateVersion. type GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata struct { @@ -9251,29 +9202,6 @@ func (s GoogleCloudDialogflowCxV3beta1DataStoreConnection) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1DeployFlowMetadata: Metadata returned for the // Environments.DeployFlow long running operation. type GoogleCloudDialogflowCxV3beta1DeployFlowMetadata struct { @@ -10006,81 +9934,6 @@ func (s GoogleCloudDialogflowCxV3beta1GcsDestination) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata: Metadata returned // for the EntityTypes.ImportEntityTypes long running operation. type GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata struct { @@ -10897,29 +10750,6 @@ func (s GoogleCloudDialogflowCxV3beta1QueryInput) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1ResponseMessage: Represents a response message // that can be returned by a conversational agent. Response messages are also // used for output audio synthesis. The approach is as follows: * If at least @@ -11214,7 +11044,8 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessageText struct { // can be interrupted by the end user's speech and the client can then starts // the next Dialogflow request. AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` - // Text: Required. A collection of text responses. + // Text: Required. A collection of text response variants. If multiple variants + // are defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowPlaybackInterruption") // to unconditionally include in API requests. By default, fields with empty or @@ -11768,29 +11599,6 @@ func (s *GoogleCloudDialogflowCxV3beta1TurnSignals) UnmarshalJSON(data []byte) e return nil } -// GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1Webhook: Webhooks host the developer's // business logic. During a session, webhooks allow the developer to use the // data extracted by Dialogflow's natural language processing to generate @@ -18328,7 +18136,8 @@ func (s GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall) Marsha // GoogleCloudDialogflowV2beta1ResponseMessageText: The text response message. type GoogleCloudDialogflowV2beta1ResponseMessageText struct { - // Text: A collection of text responses. + // Text: A collection of text response variants. If multiple variants are + // defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "Text") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -18920,150 +18729,6 @@ func (s GoogleCloudDialogflowV3alpha1ConversationSignals) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowV3alpha1ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowV3alpha1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowV3alpha1TurnSignals: Collection of all signals that // were extracted for a single turn of the conversation. type GoogleCloudDialogflowV3alpha1TurnSignals struct { @@ -19132,29 +18797,6 @@ func (s *GoogleCloudDialogflowV3alpha1TurnSignals) UnmarshalJSON(data []byte) er return nil } -// GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { diff --git a/dialogflow/v3beta1/dialogflow-api.json b/dialogflow/v3beta1/dialogflow-api.json index 0dd82ee73b3..322c27a3680 100644 --- a/dialogflow/v3beta1/dialogflow-api.json +++ b/dialogflow/v3beta1/dialogflow-api.json @@ -5185,7 +5185,7 @@ } } }, - "revision": "20240731", + "revision": "20240822", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -5489,17 +5489,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata": { "description": "Metadata associated with the long running operation for Versions.CreateVersion.", "id": "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata", @@ -5538,17 +5527,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3DeployFlowMetadata": { "description": "Metadata returned for the Environments.DeployFlow long running operation.", "id": "GoogleCloudDialogflowCxV3DeployFlowMetadata", @@ -6015,55 +5993,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowCxV3ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata": { "description": "Metadata returned for the EntityTypes.ImportEntityTypes long running operation.", "id": "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata", @@ -6615,17 +6544,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3ResponseMessage": { "description": "Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.", "id": "GoogleCloudDialogflowCxV3ResponseMessage", @@ -6833,7 +6751,7 @@ "type": "boolean" }, "text": { - "description": "Required. A collection of text responses.", + "description": "Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -7190,17 +7108,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3Webhook": { "description": "Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.", "id": "GoogleCloudDialogflowCxV3Webhook", @@ -7729,6 +7636,10 @@ "description": "The URI of the agent's avatar. Avatars are used throughout the Dialogflow console and in the self-hosted [Web Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo) integration.", "type": "string" }, + "clientCertificateSettings": { + "$ref": "GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings", + "description": "Optional. Settings for custom client certificates." + }, "defaultLanguageCode": { "description": "Required. Immutable. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list of the currently supported language codes. This field cannot be set by the Agents.UpdateAgent method.", "type": "string" @@ -7819,6 +7730,25 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings": { + "description": "Settings for custom client certificates.", + "id": "GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings", + "properties": { + "passphrase": { + "description": "Optional. The name of the SecretManager secret version resource storing the passphrase. 'passphrase' should be left unset if the private key is not encrypted. Format: `projects/{project}/secrets/{secret}/versions/{version}`", + "type": "string" + }, + "privateKey": { + "description": "Required. The name of the SecretManager secret version resource storing the private key encoded in PEM format. Format: `projects/{project}/secrets/{secret}/versions/{version}`", + "type": "string" + }, + "sslCertificate": { + "description": "Required. The ssl certificate encoded in PEM format. This string must include the begin header and end footer lines.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings": { "description": "Settings for Gen App Builder.", "id": "GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings", @@ -8078,6 +8008,10 @@ "format": "float", "type": "number" }, + "boostControlSpec": { + "$ref": "GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec", + "description": "Optional. Complex specification for custom ranking based on customer defined attribute value." + }, "condition": { "description": "Optional. An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": * (id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\",\"Blue\"))", "type": "string" @@ -8085,6 +8019,66 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec": { + "description": "Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.", + "id": "GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec", + "properties": { + "attributeType": { + "description": "Optional. The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).", + "enum": [ + "ATTRIBUTE_TYPE_UNSPECIFIED", + "NUMERICAL", + "FRESHNESS" + ], + "enumDescriptions": [ + "Unspecified AttributeType.", + "The value of the numerical field will be used to dynamically update the boost amount. In this case, the attribute_value (the x value) of the control point will be the actual value of the numerical field for which the boost_amount is specified.", + "For the freshness use case the attribute value will be the duration between the current time and the date in the datetime field specified. The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. E.g. `5D`, `3DT12H30M`, `T24H`." + ], + "type": "string" + }, + "controlPoints": { + "description": "Optional. The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.", + "items": { + "$ref": "GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint" + }, + "type": "array" + }, + "fieldName": { + "description": "Optional. The name of the field whose value will be used to determine the boost amount.", + "type": "string" + }, + "interpolationType": { + "description": "Optional. The interpolation type to be applied to connect the control points listed below.", + "enum": [ + "INTERPOLATION_TYPE_UNSPECIFIED", + "LINEAR" + ], + "enumDescriptions": [ + "Interpolation type is unspecified. In this case, it defaults to Linear.", + "Piecewise linear interpolation will be applied." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "description": "The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).", + "id": "GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint", + "properties": { + "attributeValue": { + "description": "Optional. Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.", + "type": "string" + }, + "boostAmount": { + "description": "Optional. The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1BoostSpecs": { "description": "Boost specifications for data stores.", "id": "GoogleCloudDialogflowCxV3beta1BoostSpecs", @@ -8606,17 +8600,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata": { "description": "Metadata associated with the long running operation for Versions.CreateVersion.", "id": "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata", @@ -8881,17 +8864,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata": { "description": "Metadata returned for the Environments.DeployFlow long running operation.", "id": "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata", @@ -10505,55 +10477,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata": { "description": "Metadata returned for the EntityTypes.ImportEntityTypes long running operation.", "id": "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata", @@ -12483,17 +12406,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1ResourceName": { "description": "Resource name and display name.", "id": "GoogleCloudDialogflowCxV3beta1ResourceName", @@ -12704,7 +12616,7 @@ "type": "boolean" }, "text": { - "description": "Required. A collection of text responses.", + "description": "Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -13470,6 +13382,10 @@ "$ref": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig", "description": "Config for API key auth." }, + "bearerTokenConfig": { + "$ref": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationBearerTokenConfig", + "description": "Config for bearer token auth." + }, "oauthConfig": { "$ref": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig", "description": "Config for OAuth." @@ -13510,6 +13426,17 @@ }, "type": "object" }, + "GoogleCloudDialogflowCxV3beta1ToolAuthenticationBearerTokenConfig": { + "description": "Config for authentication using bearer token.", + "id": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationBearerTokenConfig", + "properties": { + "token": { + "description": "Required. The text token appended to the text `Bearer` to the request Authorization header. [Session parameters reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) can be used to pass the token dynamically, e.g. `$session.params.parameter-id`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig": { "description": "Config for authentication with OAuth.", "id": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig", @@ -13544,7 +13471,22 @@ "GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig": { "description": "Config for auth using [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).", "id": "GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig", - "properties": {}, + "properties": { + "serviceAgentAuth": { + "description": "Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.", + "enum": [ + "SERVICE_AGENT_AUTH_UNSPECIFIED", + "ID_TOKEN", + "ACCESS_TOKEN" + ], + "enumDescriptions": [ + "Service agent auth type unspecified. Default to ID_TOKEN.", + "Use [ID token](https://cloud.google.com/docs/authentication/token-types#id) generated from service agent. This can be used to access Cloud Function and Cloud Run after you grant Invoker role to `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`.", + "Use [access token](https://cloud.google.com/docs/authentication/token-types#access) generated from service agent. This can be used to access other Google Cloud APIs after you grant required roles to `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`." + ], + "type": "string" + } + }, "type": "object" }, "GoogleCloudDialogflowCxV3beta1ToolCall": { @@ -14043,17 +13985,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowCxV3beta1UserUtterance": { "description": "UserUtterance represents one message sent by the customer.", "id": "GoogleCloudDialogflowCxV3beta1UserUtterance", @@ -19160,7 +19091,7 @@ "id": "GoogleCloudDialogflowV2beta1ResponseMessageText", "properties": { "text": { - "description": "A collection of text responses.", + "description": "A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.", "items": { "type": "string" }, @@ -19550,88 +19481,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata": { - "description": "Metadata for CreateDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata": { - "description": "Metadata for DeleteDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata": { - "description": "Metadata in google::longrunning::Operation for Knowledge operations.", - "id": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "properties": { - "state": { - "description": "Required. Output only. The current state of this operation.", - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE" - ], - "enumDescriptions": [ - "State unspecified.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed." - ], - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata": { - "description": "Metadata for ImportDocuments operation.", - "id": "GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ImportDocumentsResponse": { - "description": "Response message for Documents.ImportDocuments.", - "id": "GoogleCloudDialogflowV3alpha1ImportDocumentsResponse", - "properties": { - "warnings": { - "description": "Includes details about skipped documents or any other warnings.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata": { - "description": "Metadata for ReloadDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudDialogflowV3alpha1TurnSignals": { "description": "Collection of all signals that were extracted for a single turn of the conversation.", "id": "GoogleCloudDialogflowV3alpha1TurnSignals", @@ -19701,17 +19550,6 @@ }, "type": "object" }, - "GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata": { - "description": "Metadata for UpdateDocument operation.", - "id": "GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata", - "properties": { - "genericMetadata": { - "$ref": "GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata", - "description": "The generic information of the operation." - } - }, - "type": "object" - }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", diff --git a/dialogflow/v3beta1/dialogflow-gen.go b/dialogflow/v3beta1/dialogflow-gen.go index 13e9e2d8838..3fef6e40933 100644 --- a/dialogflow/v3beta1/dialogflow-gen.go +++ b/dialogflow/v3beta1/dialogflow-gen.go @@ -959,29 +959,6 @@ func (s GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3CreateVersionOperationMetadata: Metadata associated // with the long running operation for Versions.CreateVersion. type GoogleCloudDialogflowCxV3CreateVersionOperationMetadata struct { @@ -1043,29 +1020,6 @@ func (s GoogleCloudDialogflowCxV3DataStoreConnection) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3DeployFlowMetadata: Metadata returned for the // Environments.DeployFlow long running operation. type GoogleCloudDialogflowCxV3DeployFlowMetadata struct { @@ -1797,81 +1751,6 @@ func (s GoogleCloudDialogflowCxV3GcsDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowCxV3ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowCxV3ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ImportEntityTypesMetadata: Metadata returned for // the EntityTypes.ImportEntityTypes long running operation. type GoogleCloudDialogflowCxV3ImportEntityTypesMetadata struct { @@ -2685,29 +2564,6 @@ func (s GoogleCloudDialogflowCxV3QueryInput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3ResponseMessage: Represents a response message that // can be returned by a conversational agent. Response messages are also used // for output audio synthesis. The approach is as follows: * If at least one @@ -3007,7 +2863,8 @@ type GoogleCloudDialogflowCxV3ResponseMessageText struct { // can be interrupted by the end user's speech and the client can then starts // the next Dialogflow request. AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` - // Text: Required. A collection of text responses. + // Text: Required. A collection of text response variants. If multiple variants + // are defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowPlaybackInterruption") // to unconditionally include in API requests. By default, fields with empty or @@ -3479,29 +3336,6 @@ func (s *GoogleCloudDialogflowCxV3TurnSignals) UnmarshalJSON(data []byte) error return nil } -// GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3Webhook: Webhooks host the developer's business // logic. During a session, webhooks allow the developer to use the data // extracted by Dialogflow's natural language processing to generate dynamic @@ -4173,6 +4007,9 @@ type GoogleCloudDialogflowCxV3beta1Agent struct { // (https://cloud.google.com/dialogflow/docs/integrations/web-demo) // integration. AvatarUri string `json:"avatarUri,omitempty"` + // ClientCertificateSettings: Optional. Settings for custom client + // certificates. + ClientCertificateSettings *GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings `json:"clientCertificateSettings,omitempty"` // DefaultLanguageCode: Required. Immutable. The default language of the agent // as a language tag. See Language Support // (https://cloud.google.com/dialogflow/cx/docs/reference/language) for a list @@ -4280,6 +4117,39 @@ func (s GoogleCloudDialogflowCxV3beta1AgentAnswerFeedbackSettings) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings: Settings for +// custom client certificates. +type GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings struct { + // Passphrase: Optional. The name of the SecretManager secret version resource + // storing the passphrase. 'passphrase' should be left unset if the private key + // is not encrypted. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + Passphrase string `json:"passphrase,omitempty"` + // PrivateKey: Required. The name of the SecretManager secret version resource + // storing the private key encoded in PEM format. Format: + // `projects/{project}/secrets/{secret}/versions/{version}` + PrivateKey string `json:"privateKey,omitempty"` + // SslCertificate: Required. The ssl certificate encoded in PEM format. This + // string must include the begin header and end footer lines. + SslCertificate string `json:"sslCertificate,omitempty"` + // ForceSendFields is a list of field names (e.g. "Passphrase") 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. "Passphrase") 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 GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1AgentClientCertificateSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings: Settings for Gen // App Builder. type GoogleCloudDialogflowCxV3beta1AgentGenAppBuilderSettings struct { @@ -4718,6 +4588,9 @@ type GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpec struct { // out completely. Setting to 0.0 means no boost applied. The boosting // condition is ignored. Boost float64 `json:"boost,omitempty"` + // BoostControlSpec: Optional. Complex specification for custom ranking based + // on customer defined attribute value. + BoostControlSpec *GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` // Condition: Optional. An expression which specifies a boost condition. The // syntax and supported fields are the same as a filter expression. Examples: * // To boost documents with document ID "doc_1" or "doc_2", and color "Red" or @@ -4755,6 +4628,107 @@ func (s *GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpec) UnmarshalJSO return nil } +// GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec: +// Specification for custom ranking based on customer specified attribute +// value. It provides more controls for customized ranking than the simple +// (condition, boost) combination above. +type GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: Optional. The attribute type to be used to determine the + // boost amount. The attribute value can be derived from the field value of the + // specified field_name. In the case of numerical it is straightforward i.e. + // attribute_value = numerical_field_value. In the case of freshness however, + // attribute_value = (time.now() - datetime_field_value). + // + // Possible values: + // "ATTRIBUTE_TYPE_UNSPECIFIED" - Unspecified AttributeType. + // "NUMERICAL" - The value of the numerical field will be used to dynamically + // update the boost amount. In this case, the attribute_value (the x value) of + // the control point will be the actual value of the numerical field for which + // the boost_amount is specified. + // "FRESHNESS" - For the freshness use case the attribute value will be the + // duration between the current time and the date in the datetime field + // specified. The value must be formatted as an XSD `dayTimeDuration` value (a + // restricted subset of an ISO 8601 duration value). The pattern for this is: + // `nDnM]`. E.g. `5D`, `3DT12H30M`, `T24H`. + AttributeType string `json:"attributeType,omitempty"` + // ControlPoints: Optional. The control points used to define the curve. The + // monotonic function (defined through the interpolation_type above) passes + // through the control points listed here. + ControlPoints []*GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + // FieldName: Optional. The name of the field whose value will be used to + // determine the boost amount. + FieldName string `json:"fieldName,omitempty"` + // InterpolationType: Optional. The interpolation type to be applied to connect + // the control points listed below. + // + // Possible values: + // "INTERPOLATION_TYPE_UNSPECIFIED" - Interpolation type is unspecified. In + // this case, it defaults to Linear. + // "LINEAR" - Piecewise linear interpolation will be applied. + InterpolationType string `json:"interpolationType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeType") 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. "AttributeType") 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 GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecCont +// rolPoint: The control points used to define the curve. The curve defined +// through these control points can only be monotonically increasing or +// decreasing(constant values are acceptable). +type GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: Optional. Can be one of: 1. The numerical field value. 2. + // The duration spec for freshness: The value must be formatted as an XSD + // `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). + // The pattern for this is: `nDnM]`. + AttributeValue string `json:"attributeValue,omitempty"` + // BoostAmount: Optional. The value between -1 to 1 by which to boost the score + // if the attribute_value evaluates to the value specified above. + BoostAmount float64 `json:"boostAmount,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeValue") 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. "AttributeValue") 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 GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDialogflowCxV3beta1BoostSpecConditionBoostSpecBoostControlSpecControlPoint + var s1 struct { + BoostAmount gensupport.JSONFloat64 `json:"boostAmount"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BoostAmount = float64(s1.BoostAmount) + return nil +} + // GoogleCloudDialogflowCxV3beta1BoostSpecs: Boost specifications for data // stores. type GoogleCloudDialogflowCxV3beta1BoostSpecs struct { @@ -5362,29 +5336,6 @@ func (s GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata: Metadata // associated with the long running operation for Versions.CreateVersion. type GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata struct { @@ -5705,29 +5656,6 @@ func (s GoogleCloudDialogflowCxV3beta1DataStoreConnectionSignalsSearchSnippet) M return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1DeployFlowMetadata: Metadata returned for the // Environments.DeployFlow long running operation. type GoogleCloudDialogflowCxV3beta1DeployFlowMetadata struct { @@ -7963,81 +7891,6 @@ func (s GoogleCloudDialogflowCxV3beta1GeneratorPlaceholder) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata: Metadata returned // for the EntityTypes.ImportEntityTypes long running operation. type GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata struct { @@ -10751,29 +10604,6 @@ func (s *GoogleCloudDialogflowCxV3beta1QueryResult) UnmarshalJSON(data []byte) e return nil } -// GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1ResourceName: Resource name and display name. type GoogleCloudDialogflowCxV3beta1ResourceName struct { // DisplayName: Display name. @@ -11092,7 +10922,8 @@ type GoogleCloudDialogflowCxV3beta1ResponseMessageText struct { // can be interrupted by the end user's speech and the client can then starts // the next Dialogflow request. AllowPlaybackInterruption bool `json:"allowPlaybackInterruption,omitempty"` - // Text: Required. A collection of text responses. + // Text: Required. A collection of text response variants. If multiple variants + // are defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowPlaybackInterruption") // to unconditionally include in API requests. By default, fields with empty or @@ -12208,6 +12039,8 @@ func (s GoogleCloudDialogflowCxV3beta1Tool) MarshalJSON() ([]byte, error) { type GoogleCloudDialogflowCxV3beta1ToolAuthentication struct { // ApiKeyConfig: Config for API key auth. ApiKeyConfig *GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig `json:"apiKeyConfig,omitempty"` + // BearerTokenConfig: Config for bearer token auth. + BearerTokenConfig *GoogleCloudDialogflowCxV3beta1ToolAuthenticationBearerTokenConfig `json:"bearerTokenConfig,omitempty"` // OauthConfig: Config for OAuth. OauthConfig *GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig `json:"oauthConfig,omitempty"` // ServiceAgentAuthConfig: Config for Diglogflow service agent @@ -12266,6 +12099,33 @@ func (s GoogleCloudDialogflowCxV3beta1ToolAuthenticationApiKeyConfig) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDialogflowCxV3beta1ToolAuthenticationBearerTokenConfig: Config +// for authentication using bearer token. +type GoogleCloudDialogflowCxV3beta1ToolAuthenticationBearerTokenConfig struct { + // Token: Required. The text token appended to the text `Bearer` to the request + // Authorization header. Session parameters reference + // (https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) + // can be used to pass the token dynamically, e.g. + // `$session.params.parameter-id`. + Token string `json:"token,omitempty"` + // ForceSendFields is a list of field names (e.g. "Token") 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. "Token") 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 GoogleCloudDialogflowCxV3beta1ToolAuthenticationBearerTokenConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolAuthenticationBearerTokenConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig: Config for // authentication with OAuth. type GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig struct { @@ -12305,6 +12165,41 @@ func (s GoogleCloudDialogflowCxV3beta1ToolAuthenticationOAuthConfig) MarshalJSON // Config for auth using Diglogflow service agent // (https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). type GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig struct { + // ServiceAgentAuth: Optional. Indicate the auth token type generated from the + // Diglogflow service agent + // (https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + // The generated token is sent in the Authorization header. + // + // Possible values: + // "SERVICE_AGENT_AUTH_UNSPECIFIED" - Service agent auth type unspecified. + // Default to ID_TOKEN. + // "ID_TOKEN" - Use [ID + // token](https://cloud.google.com/docs/authentication/token-types#id) + // generated from service agent. This can be used to access Cloud Function and + // Cloud Run after you grant Invoker role to + // `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + // "ACCESS_TOKEN" - Use [access + // token](https://cloud.google.com/docs/authentication/token-types#access) + // generated from service agent. This can be used to access other Google Cloud + // APIs after you grant required roles to + // `service-@gcp-sa-dialogflow.iam.gserviceaccount.com`. + ServiceAgentAuth string `json:"serviceAgentAuth,omitempty"` + // ForceSendFields is a list of field names (e.g. "ServiceAgentAuth") 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. "ServiceAgentAuth") 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 GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDialogflowCxV3beta1ToolAuthenticationServiceAgentAuthConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // GoogleCloudDialogflowCxV3beta1ToolCall: Represents a call of a specific @@ -13045,29 +12940,6 @@ func (s GoogleCloudDialogflowCxV3beta1TypeSchemaSchemaReference) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowCxV3beta1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowCxV3beta1UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowCxV3beta1UserUtterance: UserUtterance represents one // message sent by the customer. type GoogleCloudDialogflowCxV3beta1UserUtterance struct { @@ -19908,7 +19780,8 @@ func (s GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall) Marsha // GoogleCloudDialogflowV2beta1ResponseMessageText: The text response message. type GoogleCloudDialogflowV2beta1ResponseMessageText struct { - // Text: A collection of text responses. + // Text: A collection of text response variants. If multiple variants are + // defined, only one text response variant is returned at runtime. Text []string `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "Text") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -20500,150 +20373,6 @@ func (s GoogleCloudDialogflowV3alpha1ConversationSignals) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata: Metadata for -// CreateDocument operation. -type GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1CreateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata: Metadata for -// DeleteDocument operation. -type GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1DeleteDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata: Metadata in -// google::longrunning::Operation for Knowledge operations. -type GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata struct { - // State: Required. Output only. The current state of this operation. - // - // Possible values: - // "STATE_UNSPECIFIED" - State unspecified. - // "PENDING" - The operation has been created. - // "RUNNING" - The operation is currently running. - // "DONE" - The operation is done, either cancelled or completed. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") 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. "State") 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 GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata: Metadata for -// ImportDocuments operation. -type GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ImportDocumentsResponse: Response message for -// Documents.ImportDocuments. -type GoogleCloudDialogflowV3alpha1ImportDocumentsResponse struct { - // Warnings: Includes details about skipped documents or any other warnings. - Warnings []*GoogleRpcStatus `json:"warnings,omitempty"` - // ForceSendFields is a list of field names (e.g. "Warnings") 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. "Warnings") 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 GoogleCloudDialogflowV3alpha1ImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ImportDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata: Metadata for -// ReloadDocument operation. -type GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1ReloadDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDialogflowV3alpha1TurnSignals: Collection of all signals that // were extracted for a single turn of the conversation. type GoogleCloudDialogflowV3alpha1TurnSignals struct { @@ -20712,29 +20441,6 @@ func (s *GoogleCloudDialogflowV3alpha1TurnSignals) UnmarshalJSON(data []byte) er return nil } -// GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata: Metadata for -// UpdateDocument operation. -type GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata struct { - // GenericMetadata: The generic information of the operation. - GenericMetadata *GoogleCloudDialogflowV3alpha1GenericKnowledgeOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") 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. "GenericMetadata") 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 GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDialogflowV3alpha1UpdateDocumentOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 1ea9c272493..3bc00eb5359 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -454,10 +454,77 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "trainCustomModel": { + "description": "Trains a custom model.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:trainCustomModel", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.trainCustomModel", + "parameterOrder": [ + "dataStore" + ], + "parameters": { + "dataStore": { + "description": "Required. The resource name of the Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+dataStore}:trainCustomModel", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1TrainCustomModelRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.fhirMatcher.fhirResources": { + "description": "Required. The FHIR resources to match by. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "location": "query", + "repeated": true, + "type": "string" + }, + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -1189,6 +1256,35 @@ } } }, + "customModels": { + "methods": { + "list": { + "description": "Gets a list of all the custom models.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/customModels", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.customModels.list", + "parameterOrder": [ + "dataStore" + ], + "parameters": { + "dataStore": { + "description": "Required. The resource name of the parent Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to fetch the models from.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+dataStore}/customModels", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ListCustomModelsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "models": { "resources": { "operations": { @@ -3690,6 +3786,45 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.fhirMatcher.fhirResources": { + "description": "Required. The FHIR resources to match by. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "location": "query", + "repeated": true, + "type": "string" + }, + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -5851,7 +5986,7 @@ } } }, - "revision": "20240801", + "revision": "20240817", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6021,7 +6156,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the AlloyDB source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the AlloyDB source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -6045,7 +6180,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -6054,7 +6190,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -6946,6 +7083,71 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse": { + "description": "Response message for DocumentService.BatchGetDocumentsMetadata method.", + "id": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse", + "properties": { + "documentsMetadata": { + "description": "The metadata of the Documents.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata": { + "description": "The metadata of a Document.", + "id": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata", + "properties": { + "dataIngestionSource": { + "description": "The data ingestion source of the Document. Allowed values are: * `batch`: Data ingested via Batch API, e.g., ImportDocuments. * `streaming` Data ingested via Streaming API, e.g., FHIR streaming.", + "type": "string" + }, + "lastRefreshedTime": { + "description": "The timestamp of the last time the Document was last indexed.", + "format": "google-datetime", + "type": "string" + }, + "matcherValue": { + "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "description": "The value of the matcher that was used to match the Document." + }, + "status": { + "description": "The status of the document.", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_INDEXED", + "STATUS_NOT_IN_TARGET_SITE", + "STATUS_NOT_IN_INDEX" + ], + "enumDescriptions": [ + "Should never be set.", + "The Document is indexed.", + "The Document is not indexed because its URI is not in the TargetSite.", + "The Document is not indexed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue": { + "description": "The value of the matcher that was used to match the Document.", + "id": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "properties": { + "fhirResource": { + "description": "Required. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "type": "string" + }, + "uri": { + "description": "If match by URI, the URI of the Document.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest": { "description": "Request message for SiteSearchEngineService.BatchVerifyTargetSites method.", "id": "GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest", @@ -6973,7 +7175,7 @@ "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." }, "projectId": { - "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID or the project number that contains the BigQuery source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -7124,7 +7326,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Bigtable source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -7214,6 +7416,11 @@ "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, and anti_citation_indices should not be returned.", "type": "boolean" }, + "score": { + "description": "Confidence score for the claim in the answer candidate, in the range of [0, 1].", + "format": "double", + "type": "number" + }, "startPos": { "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", "format": "int32", @@ -7363,7 +7570,7 @@ "type": "boolean" }, "projectId": { - "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Cloud SQL source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -7524,7 +7731,7 @@ "id": "GoogleCloudDiscoveryengineV1Control", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -7916,6 +8123,69 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1CustomTuningModel": { + "description": "Metadata that describes a custom tuned model.", + "id": "GoogleCloudDiscoveryengineV1CustomTuningModel", + "properties": { + "createTime": { + "deprecated": true, + "description": "Timestamp the Model was created at.", + "format": "google-datetime", + "type": "string" + }, + "displayName": { + "description": "The display name of the model.", + "type": "string" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelState": { + "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", + "enum": [ + "MODEL_STATE_UNSPECIFIED", + "TRAINING_PAUSED", + "TRAINING", + "TRAINING_COMPLETE", + "READY_FOR_SERVING", + "TRAINING_FAILED", + "NO_IMPROVEMENT", + "INPUT_VALIDATION_FAILED" + ], + "enumDescriptions": [ + "Default value.", + "The model is in a paused training state.", + "The model is currently training.", + "The model has successfully completed training.", + "The model is ready for serving.", + "The model training failed.", + "The model training finished successfully but metrics did not improve.", + "Input data validation failed. Model training didn't start." + ], + "type": "string" + }, + "modelVersion": { + "description": "The version of the model.", + "format": "int64", + "type": "string" + }, + "name": { + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "type": "string" + }, + "trainingStartTime": { + "description": "Timestamp the model training was initiated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1DataStore": { "description": "DataStore captures global settings and configs at the DataStore level.", "id": "GoogleCloudDiscoveryengineV1DataStore", @@ -7926,13 +8196,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -7999,6 +8271,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1Schema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -9110,6 +9386,20 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ListCustomModelsResponse": { + "description": "Response message for SearchTuningService.ListCustomModels method.", + "id": "GoogleCloudDiscoveryengineV1ListCustomModelsResponse", + "properties": { + "models": { + "description": "List of custom tuning models.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1CustomTuningModel" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1ListDataStoresResponse": { "description": "Response message for DataStoreService.ListDataStores method.", "id": "GoogleCloudDiscoveryengineV1ListDataStoresResponse", @@ -10335,7 +10625,7 @@ "id": "GoogleCloudDiscoveryengineV1SearchResponse", "properties": { "attributionToken": { - "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", + "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. This also helps to identify a request during the customer support scenarios.", "type": "string" }, "correctedQuery": { @@ -10495,7 +10785,8 @@ "POTENTIAL_POLICY_VIOLATION", "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", @@ -10505,7 +10796,8 @@ "The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -10774,7 +11066,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Spanner source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Spanner source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -10926,6 +11218,103 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelRequest": { + "description": "Request message for SearchTuningService.TrainCustomModel method.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelRequest", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "The desired location of errors incurred during the data ingestion and training." + }, + "gcsTrainingInput": { + "$ref": "GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput", + "description": "Cloud Storage training input." + }, + "modelId": { + "description": "If not provided, a UUID will be generated.", + "type": "string" + }, + "modelType": { + "description": "Model to be trained. Supported values are: * **search-tuning**: Fine tuning the search system based on data provided.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput": { + "description": "Cloud Storage training data input.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput", + "properties": { + "corpusDataPath": { + "description": "The Cloud Storage corpus data which could be associated in train data. The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For search-tuning model, each line should have the _id, title and text. Example: `{\"_id\": \"doc1\", title: \"relevant doc\", \"text\": \"relevant text\"}`", + "type": "string" + }, + "queryDataPath": { + "description": "The gcs query data which could be associated in train data. The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For search-tuning model, each line should have the _id and text. Example: {\"_id\": \"query1\", \"text\": \"example query\"}", + "type": "string" + }, + "testDataPath": { + "description": "Cloud Storage test data. Same format as train_data_path. If not provided, a random 80/20 train/test split will be performed on train_data_path.", + "type": "string" + }, + "trainDataPath": { + "description": "Cloud Storage training data path whose format should be `gs:///`. The file should be in tsv format. Each line should have the doc_id and query_id and score (number). For search-tuning model, it should have the query-id corpus-id score as tsv file header. The score should be a number in `[0, inf+)`. The larger the number is, the more relevant the pair is. Example: * `query-id\\tcorpus-id\\tscore` * `query1\\tdoc1\\t1`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the data.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelName": { + "description": "Fully qualified name of the CustomTuningModel.", + "type": "string" + }, + "modelStatus": { + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1TransactionInfo": { "description": "A transaction represents the entire purchase transaction.", "id": "GoogleCloudDiscoveryengineV1TransactionInfo", @@ -11110,6 +11499,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1WorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAclConfig": { "description": "Access Control Configuration.", "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", @@ -11139,7 +11559,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -11148,7 +11569,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -11690,7 +12112,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -11942,7 +12364,8 @@ "TRAINING_COMPLETE", "READY_FOR_SERVING", "TRAINING_FAILED", - "NO_IMPROVEMENT" + "NO_IMPROVEMENT", + "INPUT_VALIDATION_FAILED" ], "enumDescriptions": [ "Default value.", @@ -11951,7 +12374,8 @@ "The model has successfully completed training.", "The model is ready for serving.", "The model training failed.", - "The model training finished successfully but metrics did not improve." + "The model training finished successfully but metrics did not improve.", + "Input data validation failed. Model training didn't start." ], "type": "string" }, @@ -11986,13 +12410,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -12068,6 +12494,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -14678,6 +15108,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata", @@ -14767,7 +15228,7 @@ "id": "GoogleCloudDiscoveryengineV1betaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -15008,7 +15469,8 @@ "TRAINING_COMPLETE", "READY_FOR_SERVING", "TRAINING_FAILED", - "NO_IMPROVEMENT" + "NO_IMPROVEMENT", + "INPUT_VALIDATION_FAILED" ], "enumDescriptions": [ "Default value.", @@ -15017,7 +15479,8 @@ "The model has successfully completed training.", "The model is ready for serving.", "The model training failed.", - "The model training finished successfully but metrics did not improve." + "The model training finished successfully but metrics did not improve.", + "Input data validation failed. Model training didn't start." ], "type": "string" }, @@ -15048,13 +15511,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -15125,6 +15590,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1betaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -16274,6 +16743,24 @@ "description": "The Unicode country/region code (CLDR) of a location, such as \"US\" and \"419\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.", "type": "string" }, + "relevanceThreshold": { + "description": "The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information.", + "enum": [ + "RELEVANCE_THRESHOLD_UNSPECIFIED", + "LOWEST", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Default value. In this case, server behavior defaults to Google defined threshold.", + "Lowest relevance threshold.", + "Low relevance threshold.", + "Medium relevance threshold.", + "High relevance threshold." + ], + "type": "string" + }, "safeSearch": { "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" @@ -17070,6 +17557,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 115e9f2e142..eb1ded85029 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -247,6 +247,7 @@ func NewProjectsLocationsCollectionsDataStoresService(s *Service) *ProjectsLocat rs.CompletionSuggestions = NewProjectsLocationsCollectionsDataStoresCompletionSuggestionsService(s) rs.Controls = NewProjectsLocationsCollectionsDataStoresControlsService(s) rs.Conversations = NewProjectsLocationsCollectionsDataStoresConversationsService(s) + rs.CustomModels = NewProjectsLocationsCollectionsDataStoresCustomModelsService(s) rs.Models = NewProjectsLocationsCollectionsDataStoresModelsService(s) rs.Operations = NewProjectsLocationsCollectionsDataStoresOperationsService(s) rs.Schemas = NewProjectsLocationsCollectionsDataStoresSchemasService(s) @@ -269,6 +270,8 @@ type ProjectsLocationsCollectionsDataStoresService struct { Conversations *ProjectsLocationsCollectionsDataStoresConversationsService + CustomModels *ProjectsLocationsCollectionsDataStoresCustomModelsService + Models *ProjectsLocationsCollectionsDataStoresModelsService Operations *ProjectsLocationsCollectionsDataStoresOperationsService @@ -346,6 +349,15 @@ type ProjectsLocationsCollectionsDataStoresConversationsService struct { s *Service } +func NewProjectsLocationsCollectionsDataStoresCustomModelsService(s *Service) *ProjectsLocationsCollectionsDataStoresCustomModelsService { + rs := &ProjectsLocationsCollectionsDataStoresCustomModelsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresCustomModelsService struct { + s *Service +} + func NewProjectsLocationsCollectionsDataStoresModelsService(s *Service) *ProjectsLocationsCollectionsDataStoresModelsService { rs := &ProjectsLocationsCollectionsDataStoresModelsService{s: s} rs.Operations = NewProjectsLocationsCollectionsDataStoresModelsOperationsService(s) @@ -1104,9 +1116,9 @@ type GoogleCloudDiscoveryengineV1AlloyDbSource struct { // LocationId: Required. The AlloyDB location to copy the data from with a // length limit of 256 characters. LocationId string `json:"locationId,omitempty"` - // ProjectId: The project ID that the AlloyDB source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the AlloyDB source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The AlloyDB table to copy the data from with a length // limit of 256 characters. @@ -1150,6 +1162,9 @@ type GoogleCloudDiscoveryengineV1Answer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -2387,6 +2402,98 @@ func (s GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse: Response +// message for DocumentService.BatchGetDocumentsMetadata method. +type GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse struct { + // DocumentsMetadata: The metadata of the Documents. + DocumentsMetadata []*GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata `json:"documentsMetadata,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DocumentsMetadata") 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. "DocumentsMetadata") 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 GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata +// : The metadata of a Document. +type GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata struct { + // DataIngestionSource: The data ingestion source of the Document. Allowed + // values are: * `batch`: Data ingested via Batch API, e.g., ImportDocuments. * + // `streaming` Data ingested via Streaming API, e.g., FHIR streaming. + DataIngestionSource string `json:"dataIngestionSource,omitempty"` + // LastRefreshedTime: The timestamp of the last time the Document was last + // indexed. + LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` + // MatcherValue: The value of the matcher that was used to match the Document. + MatcherValue *GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` + // Status: The status of the document. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Should never be set. + // "STATUS_INDEXED" - The Document is indexed. + // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI + // is not in the TargetSite. + // "STATUS_NOT_IN_INDEX" - The Document is not indexed. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataIngestionSource") 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. "DataIngestionSource") 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 GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadata +// MatcherValue: The value of the matcher that was used to match the Document. +type GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue struct { + // FhirResource: Required. Format: + // projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s + // tore}/fhir/{resource_type}/{fhir_resource_id} + FhirResource string `json:"fhirResource,omitempty"` + // Uri: If match by URI, the URI of the Document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "FhirResource") 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. "FhirResource") 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 GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest: Request message // for SiteSearchEngineService.BatchVerifyTargetSites method. type GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest struct { @@ -2414,8 +2521,8 @@ type GoogleCloudDiscoveryengineV1BigQuerySource struct { // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in // YYYY-MM-DD format. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` - // ProjectId: The project ID (can be project # or ID) that the BigQuery source - // is in with a length limit of 128 characters. If not specified, inherits the + // ProjectId: The project ID or the project number that contains the BigQuery + // source. Has a length limit of 128 characters. If not specified, inherits the // project ID from the parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The BigQuery table to copy the data from with a length @@ -2587,9 +2694,9 @@ type GoogleCloudDiscoveryengineV1BigtableSource struct { // InstanceId: Required. The instance ID of the Cloud Bigtable that needs to be // imported. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Bigtable source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Bigtable source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table ID of the Cloud Bigtable that needs to be // imported. @@ -2722,6 +2829,9 @@ type GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim struct { // done for the claim and therefore citation_indices, and anti_citation_indices // should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // Score: Confidence score for the claim in the answer candidate, in the range + // of [0, 1]. + Score float64 `json:"score,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. StartPos int64 `json:"startPos,omitempty"` @@ -2743,6 +2853,20 @@ func (s GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1CheckGroundingResponseClaim + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + // GoogleCloudDiscoveryengineV1CheckGroundingSpec: Specification for the // grounding check. type GoogleCloudDiscoveryengineV1CheckGroundingSpec struct { @@ -2943,7 +3067,7 @@ type GoogleCloudDiscoveryengineV1CloudSqlSource struct { // additional cost. More info can be found here // (https://cloud.google.com/sql/pricing#serverless). Offload bool `json:"offload,omitempty"` - // ProjectId: The project ID that the Cloud SQL source is in with a length + // ProjectId: The project ID that contains the Cloud SQL source. Has a length // limit of 128 characters. If not specified, inherits the project ID from the // parent request. ProjectId string `json:"projectId,omitempty"` @@ -3192,7 +3316,7 @@ func (s GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, e // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1Control struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -3771,6 +3895,57 @@ func (s *GoogleCloudDiscoveryengineV1CustomAttribute) UnmarshalJSON(data []byte) return nil } +// GoogleCloudDiscoveryengineV1CustomTuningModel: Metadata that describes a +// custom tuned model. +type GoogleCloudDiscoveryengineV1CustomTuningModel struct { + // CreateTime: Timestamp the Model was created at. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: The display name of the model. + DisplayName string `json:"displayName,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + // ModelState: The state that the model is in (e.g.`TRAINING` or + // `TRAINING_FAILED`). + // + // Possible values: + // "MODEL_STATE_UNSPECIFIED" - Default value. + // "TRAINING_PAUSED" - The model is in a paused training state. + // "TRAINING" - The model is currently training. + // "TRAINING_COMPLETE" - The model has successfully completed training. + // "READY_FOR_SERVING" - The model is ready for serving. + // "TRAINING_FAILED" - The model training failed. + // "NO_IMPROVEMENT" - The model training finished successfully but metrics + // did not improve. + // "INPUT_VALIDATION_FAILED" - Input data validation failed. Model training + // didn't start. + ModelState string `json:"modelState,omitempty"` + // ModelVersion: The version of the model. + ModelVersion int64 `json:"modelVersion,omitempty,string"` + // Name: Required. The fully qualified resource name of the model. Format: + // `projects/{project_number}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be + // an alpha-numerical string with limit of 40 characters. + Name string `json:"name,omitempty"` + // TrainingStartTime: Timestamp the model training was initiated. + TrainingStartTime string `json:"trainingStartTime,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 GoogleCloudDiscoveryengineV1CustomTuningModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1CustomTuningModel + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1DataStore: DataStore captures global settings // and configs at the DataStore level. type GoogleCloudDiscoveryengineV1DataStore struct { @@ -3782,6 +3957,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -3835,6 +4012,10 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1Schema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1WorkspaceConfig `json:"workspaceConfig,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -5422,6 +5603,32 @@ func (s GoogleCloudDiscoveryengineV1ListConversationsResponse) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1ListCustomModelsResponse: Response message for +// SearchTuningService.ListCustomModels method. +type GoogleCloudDiscoveryengineV1ListCustomModelsResponse struct { + // Models: List of custom tuning models. + Models []*GoogleCloudDiscoveryengineV1CustomTuningModel `json:"models,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Models") 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. "Models") 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 GoogleCloudDiscoveryengineV1ListCustomModelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ListCustomModelsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1ListDataStoresResponse: Response message for // DataStoreService.ListDataStores method. type GoogleCloudDiscoveryengineV1ListDataStoresResponse struct { @@ -7421,7 +7628,8 @@ func (s GoogleCloudDiscoveryengineV1SearchRequestSpellCorrectionSpec) MarshalJSO type GoogleCloudDiscoveryengineV1SearchResponse struct { // AttributionToken: A unique search token. This should be included in the // UserEvent logs resulting from this search, which enables accurate - // attribution of search model performance. + // attribution of search model performance. This also helps to identify a + // request during the customer support scenarios. AttributionToken string `json:"attributionToken,omitempty"` // CorrectedQuery: Contains the spell corrected query, if found. If the spell // correction type is AUTOMATIC, then the search results are based on @@ -7645,6 +7853,9 @@ type GoogleCloudDiscoveryengineV1SearchResponseSummary struct { // example, "Reply in the tone of a competing company's CEO". Only used when // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is // set to `true`. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -8010,9 +8221,9 @@ type GoogleCloudDiscoveryengineV1SpannerSource struct { EnableDataBoost bool `json:"enableDataBoost,omitempty"` // InstanceId: Required. The instance ID of the source Spanner table. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Spanner source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Spanner source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table name of the Spanner database that needs to be // imported. @@ -8214,6 +8425,146 @@ func (s GoogleCloudDiscoveryengineV1TextInput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1TrainCustomModelMetadata: Metadata related to +// the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1TrainCustomModelMetadata 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 GoogleCloudDiscoveryengineV1TrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelRequest: Request message for +// SearchTuningService.TrainCustomModel method. +type GoogleCloudDiscoveryengineV1TrainCustomModelRequest struct { + // ErrorConfig: The desired location of errors incurred during the data + // ingestion and training. + ErrorConfig *GoogleCloudDiscoveryengineV1ImportErrorConfig `json:"errorConfig,omitempty"` + // GcsTrainingInput: Cloud Storage training input. + GcsTrainingInput *GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput `json:"gcsTrainingInput,omitempty"` + // ModelId: If not provided, a UUID will be generated. + ModelId string `json:"modelId,omitempty"` + // ModelType: Model to be trained. Supported values are: * **search-tuning**: + // Fine tuning the search system based on data provided. + ModelType string `json:"modelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 GoogleCloudDiscoveryengineV1TrainCustomModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput: Cloud +// Storage training data input. +type GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput struct { + // CorpusDataPath: The Cloud Storage corpus data which could be associated in + // train data. The data path format is `gs:///`. A newline delimited + // jsonl/ndjson file. For search-tuning model, each line should have the _id, + // title and text. Example: `{"_id": "doc1", title: "relevant doc", "text": + // "relevant text"}` + CorpusDataPath string `json:"corpusDataPath,omitempty"` + // QueryDataPath: The gcs query data which could be associated in train data. + // The data path format is `gs:///`. A newline delimited jsonl/ndjson file. For + // search-tuning model, each line should have the _id and text. Example: + // {"_id": "query1", "text": "example query"} + QueryDataPath string `json:"queryDataPath,omitempty"` + // TestDataPath: Cloud Storage test data. Same format as train_data_path. If + // not provided, a random 80/20 train/test split will be performed on + // train_data_path. + TestDataPath string `json:"testDataPath,omitempty"` + // TrainDataPath: Cloud Storage training data path whose format should be + // `gs:///`. The file should be in tsv format. Each line should have the doc_id + // and query_id and score (number). For search-tuning model, it should have the + // query-id corpus-id score as tsv file header. The score should be a number in + // `[0, inf+)`. The larger the number is, the more relevant the pair is. + // Example: * `query-id\tcorpus-id\tscore` * `query1\tdoc1\t1` + TrainDataPath string `json:"trainDataPath,omitempty"` + // ForceSendFields is a list of field names (e.g. "CorpusDataPath") 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. "CorpusDataPath") 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 GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelRequestGcsTrainingInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1TrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1ImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + // ModelName: Fully qualified name of the CustomTuningModel. + ModelName string `json:"modelName,omitempty"` + // ModelStatus: The trained model status. Possible values are: * **bad-data**: + // The training data quality is bad. * **no-improvement**: Tuning didn't + // improve performance. Won't deploy. * **in-progress**: Model training job + // creation is in progress. * **training**: Model is actively training. * + // **evaluating**: The model is evaluating trained metrics. * **indexing**: The + // model trained metrics are indexing. * **ready**: The model is ready for + // serving. + ModelStatus string `json:"modelStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 GoogleCloudDiscoveryengineV1TrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1TransactionInfo: A transaction represents the // entire purchase transaction. type GoogleCloudDiscoveryengineV1TransactionInfo struct { @@ -8522,6 +8873,43 @@ func (s GoogleCloudDiscoveryengineV1UserInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1WorkspaceConfig: Config to store data store type +// configuration for workspace data +type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1WorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAclConfig: Access Control Configuration. type GoogleCloudDiscoveryengineV1alphaAclConfig struct { // IdpConfig: Identity provider config. @@ -8569,6 +8957,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -9267,7 +9658,7 @@ func (s GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]by // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1alphaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -9621,6 +10012,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // "TRAINING_FAILED" - The model training failed. // "NO_IMPROVEMENT" - The model training finished successfully but metrics // did not improve. + // "INPUT_VALIDATION_FAILED" - Input data validation failed. Model training + // didn't start. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -9668,6 +10061,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -9725,6 +10120,10 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1alphaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "AclEnabled") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -13465,13 +13864,50 @@ func (s GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.BatchCreateTargetSites operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1alphaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.BatchCreateTargetSites operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata 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"` @@ -13599,7 +14035,7 @@ func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byt // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1betaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -13929,6 +14365,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // "TRAINING_FAILED" - The model training failed. // "NO_IMPROVEMENT" - The model training finished successfully but metrics // did not improve. + // "INPUT_VALIDATION_FAILED" - Input data validation failed. Model training + // didn't start. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -13968,6 +14406,8 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -14023,6 +14463,10 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1betaWorkspaceConfig `json:"workspaceConfig,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 @@ -15614,6 +16058,19 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // (https://cloud.google.com/apis/design/standard_fields). If set, then results // will be boosted based on the region_code provided. RegionCode string `json:"regionCode,omitempty"` + // RelevanceThreshold: The relevance threshold of the search results. Default + // to Google defined threshold, leveraging a balance of precision and recall to + // deliver both highly accurate results and comprehensive coverage of relevant + // information. + // + // Possible values: + // "RELEVANCE_THRESHOLD_UNSPECIFIED" - Default value. In this case, server + // behavior defaults to Google defined threshold. + // "LOWEST" - Lowest relevance threshold. + // "LOW" - Low relevance threshold. + // "MEDIUM" - Medium relevance threshold. + // "HIGH" - High relevance threshold. + RelevanceThreshold string `json:"relevanceThreshold,omitempty"` // SafeSearch: Whether to turn on safe search. This is only supported for // website search. SafeSearch bool `json:"safeSearch,omitempty"` @@ -16927,6 +17384,43 @@ func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1betaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -18351,6 +18845,239 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C return ret, nil } +type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { + s *Service + dataStore string + googleclouddiscoveryenginev1traincustommodelrequest *GoogleCloudDiscoveryengineV1TrainCustomModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TrainCustomModel: Trains a custom model. +// +// - dataStore: The resource name of the Data Store, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. This field is used to identify the data store where to +// train the models. +func (r *ProjectsLocationsCollectionsDataStoresService) TrainCustomModel(dataStore string, googleclouddiscoveryenginev1traincustommodelrequest *GoogleCloudDiscoveryengineV1TrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + c.googleclouddiscoveryenginev1traincustommodelrequest = googleclouddiscoveryenginev1traincustommodelrequest + 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 *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + 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 *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1traincustommodelrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+dataStore}:trainCustomModel") + 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{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.trainCustomModel" 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 *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherFhirMatcherFhirResources sets the optional parameter +// "matcher.fhirMatcher.fhirResources": Required. The FHIR resources to match +// by. Format: +// projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s +// tore}/fhir/{resource_type}/{fhir_resource_id} +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherFhirMatcherFhirResources(matcherFhirMatcherFhirResources ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.fhirMatcher.fhirResources", append([]string{}, matcherFhirMatcherFhirResources...)) + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchGetDocumentsMetadata") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse.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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string @@ -21044,6 +21771,117 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . return ret, nil } +type ProjectsLocationsCollectionsDataStoresCustomModelsListCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of all the custom models. +// +// - dataStore: The resource name of the parent Data Store, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. This field is used to identify the data store where to +// fetch the models from. +func (r *ProjectsLocationsCollectionsDataStoresCustomModelsService) List(dataStore string) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + c := &ProjectsLocationsCollectionsDataStoresCustomModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + 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 *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + 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 *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + 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 *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+dataStore}/customModels") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.customModels.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ListCustomModelsResponse.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 *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListCustomModelsResponse, 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 := &GoogleCloudDiscoveryengineV1ListCustomModelsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { s *Service name string @@ -30245,6 +31083,134 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherFhirMatcherFhirResources sets the optional parameter +// "matcher.fhirMatcher.fhirResources": Required. The FHIR resources to match +// by. Format: +// projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s +// tore}/fhir/{resource_type}/{fhir_resource_id} +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherFhirMatcherFhirResources(matcherFhirMatcherFhirResources ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.fhirMatcher.fhirResources", append([]string{}, matcherFhirMatcherFhirResources...)) + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchGetDocumentsMetadata") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse.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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index b1d715facca..060b8e64baa 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -246,7 +246,7 @@ ] }, "updateAclConfig": { - "description": "Default Acl Configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", + "description": "Default ACL configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", "httpMethod": "PATCH", "id": "discoveryengine.projects.locations.updateAclConfig", @@ -681,6 +681,45 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.fhirMatcher.fhirResources": { + "description": "Required. The FHIR resources to match by. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "location": "query", + "repeated": true, + "type": "string" + }, + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -4450,6 +4489,45 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.fhirMatcher.fhirResources": { + "description": "Required. The FHIR resources to match by. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "location": "query", + "repeated": true, + "type": "string" + }, + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -7289,6 +7367,80 @@ ] } } + }, + "userStores": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userStores/{userStoresId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userStores.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/userStores/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userStores/{userStoresId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userStores.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/userStores/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } } } }, @@ -7365,7 +7517,7 @@ } } }, - "revision": "20240801", + "revision": "20240817", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -7789,7 +7941,7 @@ "id": "GoogleCloudDiscoveryengineV1Control", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -8003,13 +8155,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -8076,6 +8230,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1Schema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -9034,6 +9192,57 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the data.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelName": { + "description": "Fully qualified name of the CustomTuningModel.", + "type": "string" + }, + "modelStatus": { + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", @@ -9068,6 +9277,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1WorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAclConfig": { "description": "Access Control Configuration.", "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", @@ -9104,7 +9344,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the AlloyDB source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the AlloyDB source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -9128,7 +9368,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -9137,7 +9378,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -10033,6 +10275,71 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse": { + "description": "Response message for DocumentService.BatchGetDocumentsMetadata method.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse", + "properties": { + "documentsMetadata": { + "description": "The metadata of the Documents.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata": { + "description": "The metadata of a Document.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata", + "properties": { + "dataIngestionSource": { + "description": "The data ingestion source of the Document. Allowed values are: * `batch`: Data ingested via Batch API, e.g., ImportDocuments. * `streaming` Data ingested via Streaming API, e.g., FHIR streaming.", + "type": "string" + }, + "lastRefreshedTime": { + "description": "The timestamp of the last time the Document was last indexed.", + "format": "google-datetime", + "type": "string" + }, + "matcherValue": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "description": "The value of the matcher that was used to match the Document." + }, + "status": { + "description": "The status of the document.", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_INDEXED", + "STATUS_NOT_IN_TARGET_SITE", + "STATUS_NOT_IN_INDEX" + ], + "enumDescriptions": [ + "Should never be set.", + "The Document is indexed.", + "The Document is not indexed because its URI is not in the TargetSite.", + "The Document is not indexed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue": { + "description": "The value of the matcher that was used to match the Document.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "properties": { + "fhirResource": { + "description": "Required. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "type": "string" + }, + "uri": { + "description": "If match by URI, the URI of the Document.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest": { "description": "Request message for SiteSearchEngineService.BatchVerifyTargetSites method.", "id": "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest", @@ -10060,7 +10367,7 @@ "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." }, "projectId": { - "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID or the project number that contains the BigQuery source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -10211,7 +10518,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Bigtable source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -10301,6 +10608,11 @@ "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, and anti_citation_indices should not be returned.", "type": "boolean" }, + "score": { + "description": "Confidence score for the claim in the answer candidate, in the range of [0, 1].", + "format": "double", + "type": "number" + }, "startPos": { "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", "format": "int32", @@ -10539,7 +10851,7 @@ "type": "boolean" }, "projectId": { - "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Cloud SQL source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -10700,7 +11012,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -11147,7 +11459,8 @@ "TRAINING_COMPLETE", "READY_FOR_SERVING", "TRAINING_FAILED", - "NO_IMPROVEMENT" + "NO_IMPROVEMENT", + "INPUT_VALIDATION_FAILED" ], "enumDescriptions": [ "Default value.", @@ -11156,7 +11469,8 @@ "The model has successfully completed training.", "The model is ready for serving.", "The model training failed.", - "The model training finished successfully but metrics did not improve." + "The model training finished successfully but metrics did not improve.", + "Input data validation failed. Model training didn't start." ], "type": "string" }, @@ -11191,13 +11505,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -11273,6 +11589,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -15144,7 +15464,7 @@ "type": "array" }, "attributionToken": { - "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", + "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. This also helps to identify a request during the customer support scenarios.", "type": "string" }, "correctedQuery": { @@ -15436,6 +15756,10 @@ "description": "Name of the numerical field as defined in the schema.", "type": "string" }, + "querySegment": { + "description": "Identifies the keywords within the search query that match a filter.", + "type": "string" + }, "value": { "description": "The value specified in the numerical constraint.", "format": "double", @@ -15466,6 +15790,10 @@ "description": "Name of the string field as defined in the schema.", "type": "string" }, + "querySegment": { + "description": "Identifies the keywords within the search query that match a filter.", + "type": "string" + }, "values": { "description": "Values of the string field. The record will only be returned if the field value matches one of the values specified here.", "items": { @@ -15582,7 +15910,8 @@ "POTENTIAL_POLICY_VIOLATION", "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", @@ -15592,7 +15921,8 @@ "The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -16084,7 +16414,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Spanner source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Spanner source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -16540,6 +16870,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata", @@ -16629,7 +16990,7 @@ "id": "GoogleCloudDiscoveryengineV1betaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -16870,7 +17231,8 @@ "TRAINING_COMPLETE", "READY_FOR_SERVING", "TRAINING_FAILED", - "NO_IMPROVEMENT" + "NO_IMPROVEMENT", + "INPUT_VALIDATION_FAILED" ], "enumDescriptions": [ "Default value.", @@ -16879,7 +17241,8 @@ "The model has successfully completed training.", "The model is ready for serving.", "The model training failed.", - "The model training finished successfully but metrics did not improve." + "The model training finished successfully but metrics did not improve.", + "Input data validation failed. Model training didn't start." ], "type": "string" }, @@ -16910,13 +17273,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -16987,6 +17352,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1betaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -18136,6 +18505,24 @@ "description": "The Unicode country/region code (CLDR) of a location, such as \"US\" and \"419\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.", "type": "string" }, + "relevanceThreshold": { + "description": "The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information.", + "enum": [ + "RELEVANCE_THRESHOLD_UNSPECIFIED", + "LOWEST", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Default value. In this case, server behavior defaults to Google defined threshold.", + "Lowest relevance threshold.", + "Low relevance threshold.", + "Medium relevance threshold.", + "High relevance threshold." + ], + "type": "string" + }, "safeSearch": { "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" @@ -18932,6 +19319,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 911b0337829..4516d8a755a 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -181,6 +181,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Requirements = NewProjectsLocationsRequirementsService(s) rs.SampleQuerySets = NewProjectsLocationsSampleQuerySetsService(s) rs.UserEvents = NewProjectsLocationsUserEventsService(s) + rs.UserStores = NewProjectsLocationsUserStoresService(s) return rs } @@ -206,6 +207,8 @@ type ProjectsLocationsService struct { SampleQuerySets *ProjectsLocationsSampleQuerySetsService UserEvents *ProjectsLocationsUserEventsService + + UserStores *ProjectsLocationsUserStoresService } func NewProjectsLocationsCollectionsService(s *Service) *ProjectsLocationsCollectionsService { @@ -958,6 +961,27 @@ type ProjectsLocationsUserEventsService struct { s *Service } +func NewProjectsLocationsUserStoresService(s *Service) *ProjectsLocationsUserStoresService { + rs := &ProjectsLocationsUserStoresService{s: s} + rs.Operations = NewProjectsLocationsUserStoresOperationsService(s) + return rs +} + +type ProjectsLocationsUserStoresService struct { + s *Service + + Operations *ProjectsLocationsUserStoresOperationsService +} + +func NewProjectsLocationsUserStoresOperationsService(s *Service) *ProjectsLocationsUserStoresOperationsService { + rs := &ProjectsLocationsUserStoresOperationsService{s: s} + return rs +} + +type ProjectsLocationsUserStoresOperationsService struct { + s *Service +} + func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { rs := &ProjectsOperationsService{s: s} return rs @@ -1718,7 +1742,7 @@ func (s GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, e // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1Control struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -2033,6 +2057,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -2086,6 +2112,10 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1Schema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1WorkspaceConfig `json:"workspaceConfig,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 @@ -3378,6 +3408,72 @@ func (s GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1TrainCustomModelMetadata: Metadata related to +// the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1TrainCustomModelMetadata 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 GoogleCloudDiscoveryengineV1TrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1TrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1ImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + // ModelName: Fully qualified name of the CustomTuningModel. + ModelName string `json:"modelName,omitempty"` + // ModelStatus: The trained model status. Possible values are: * **bad-data**: + // The training data quality is bad. * **no-improvement**: Tuning didn't + // improve performance. Won't deploy. * **in-progress**: Model training job + // creation is in progress. * **training**: Model is actively training. * + // **evaluating**: The model is evaluating trained metrics. * **indexing**: The + // model trained metrics are indexing. * **ready**: The model is ready for + // serving. + ModelStatus string `json:"modelStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 GoogleCloudDiscoveryengineV1TrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1UpdateSchemaMetadata: Metadata for UpdateSchema // LRO. type GoogleCloudDiscoveryengineV1UpdateSchemaMetadata struct { @@ -3431,6 +3527,43 @@ func (s GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1WorkspaceConfig: Config to store data store type +// configuration for workspace data +type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1WorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAclConfig: Access Control Configuration. type GoogleCloudDiscoveryengineV1alphaAclConfig struct { // IdpConfig: Identity provider config. @@ -3478,9 +3611,9 @@ type GoogleCloudDiscoveryengineV1alphaAlloyDbSource struct { // LocationId: Required. The AlloyDB location to copy the data from with a // length limit of 256 characters. LocationId string `json:"locationId,omitempty"` - // ProjectId: The project ID that the AlloyDB source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the AlloyDB source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The AlloyDB table to copy the data from with a length // limit of 256 characters. @@ -3524,6 +3657,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -4766,6 +4902,99 @@ func (s GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse: Response +// message for DocumentService.BatchGetDocumentsMetadata method. +type GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse struct { + // DocumentsMetadata: The metadata of the Documents. + DocumentsMetadata []*GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata `json:"documentsMetadata,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DocumentsMetadata") 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. "DocumentsMetadata") 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 GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMet +// adata: The metadata of a Document. +type GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata struct { + // DataIngestionSource: The data ingestion source of the Document. Allowed + // values are: * `batch`: Data ingested via Batch API, e.g., ImportDocuments. * + // `streaming` Data ingested via Streaming API, e.g., FHIR streaming. + DataIngestionSource string `json:"dataIngestionSource,omitempty"` + // LastRefreshedTime: The timestamp of the last time the Document was last + // indexed. + LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` + // MatcherValue: The value of the matcher that was used to match the Document. + MatcherValue *GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` + // Status: The status of the document. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Should never be set. + // "STATUS_INDEXED" - The Document is indexed. + // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI + // is not in the TargetSite. + // "STATUS_NOT_IN_INDEX" - The Document is not indexed. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataIngestionSource") 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. "DataIngestionSource") 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 GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMet +// adataMatcherValue: The value of the matcher that was used to match the +// Document. +type GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue struct { + // FhirResource: Required. Format: + // projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s + // tore}/fhir/{resource_type}/{fhir_resource_id} + FhirResource string `json:"fhirResource,omitempty"` + // Uri: If match by URI, the URI of the Document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "FhirResource") 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. "FhirResource") 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 GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest: Request // message for SiteSearchEngineService.BatchVerifyTargetSites method. type GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest struct { @@ -4793,8 +5022,8 @@ type GoogleCloudDiscoveryengineV1alphaBigQuerySource struct { // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in // YYYY-MM-DD format. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` - // ProjectId: The project ID (can be project # or ID) that the BigQuery source - // is in with a length limit of 128 characters. If not specified, inherits the + // ProjectId: The project ID or the project number that contains the BigQuery + // source. Has a length limit of 128 characters. If not specified, inherits the // project ID from the parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The BigQuery table to copy the data from with a length @@ -4966,9 +5195,9 @@ type GoogleCloudDiscoveryengineV1alphaBigtableSource struct { // InstanceId: Required. The instance ID of the Cloud Bigtable that needs to be // imported. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Bigtable source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Bigtable source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table ID of the Cloud Bigtable that needs to be // imported. @@ -5101,6 +5330,9 @@ type GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim struct { // done for the claim and therefore citation_indices, and anti_citation_indices // should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // Score: Confidence score for the claim in the answer candidate, in the range + // of [0, 1]. + Score float64 `json:"score,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. StartPos int64 `json:"startPos,omitempty"` @@ -5122,6 +5354,20 @@ func (s GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + // GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec: Specification for the // grounding check. type GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec struct { @@ -5443,7 +5689,7 @@ type GoogleCloudDiscoveryengineV1alphaCloudSqlSource struct { // additional cost. More info can be found here // (https://cloud.google.com/sql/pricing#serverless). Offload bool `json:"offload,omitempty"` - // ProjectId: The project ID that the Cloud SQL source is in with a length + // ProjectId: The project ID that contains the Cloud SQL source. Has a length // limit of 128 characters. If not specified, inherits the project ID from the // parent request. ProjectId string `json:"projectId,omitempty"` @@ -5693,7 +5939,7 @@ func (s GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]by // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1alphaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -6324,6 +6570,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // "TRAINING_FAILED" - The model training failed. // "NO_IMPROVEMENT" - The model training finished successfully but metrics // did not improve. + // "INPUT_VALIDATION_FAILED" - Input data validation failed. Model training + // didn't start. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -6371,6 +6619,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -6428,6 +6678,10 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1alphaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -12227,7 +12481,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponse struct { AppliedControls []string `json:"appliedControls,omitempty"` // AttributionToken: A unique search token. This should be included in the // UserEvent logs resulting from this search, which enables accurate - // attribution of search model performance. + // attribution of search model performance. This also helps to identify a + // request during the customer support scenarios. AttributionToken string `json:"attributionToken,omitempty"` // CorrectedQuery: Contains the spell corrected query, if found. If the spell // correction type is AUTOMATIC, then the search results are based on @@ -12604,6 +12859,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUndersta Comparison string `json:"comparison,omitempty"` // FieldName: Name of the numerical field as defined in the schema. FieldName string `json:"fieldName,omitempty"` + // QuerySegment: Identifies the keywords within the search query that match a + // filter. + QuerySegment string `json:"querySegment,omitempty"` // Value: The value specified in the numerical constraint. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Comparison") to @@ -12667,6 +12925,9 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnder type GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint struct { // FieldName: Name of the string field as defined in the schema. FieldName string `json:"fieldName,omitempty"` + // QuerySegment: Identifies the keywords within the search query that match a + // filter. + QuerySegment string `json:"querySegment,omitempty"` // Values: Values of the string field. The record will only be returned if the // field value matches one of the values specified here. Values []string `json:"values,omitempty"` @@ -12841,6 +13102,9 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { // example, "Reply in the tone of a competing company's CEO". Only used when // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is // set to `true`. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -13495,9 +13759,9 @@ type GoogleCloudDiscoveryengineV1alphaSpannerSource struct { EnableDataBoost bool `json:"enableDataBoost,omitempty"` // InstanceId: Required. The instance ID of the source Spanner table. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Spanner source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Spanner source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table name of the Spanner database that needs to be // imported. @@ -14184,6 +14448,43 @@ func (s GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1alphaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: Metadata // related to the progress of the // SiteSearchEngineService.BatchCreateTargetSites operation. This will be @@ -14318,7 +14619,7 @@ func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byt // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1betaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -14648,6 +14949,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // "TRAINING_FAILED" - The model training failed. // "NO_IMPROVEMENT" - The model training finished successfully but metrics // did not improve. + // "INPUT_VALIDATION_FAILED" - Input data validation failed. Model training + // didn't start. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -14687,6 +14990,8 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -14742,6 +15047,10 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1betaWorkspaceConfig `json:"workspaceConfig,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 @@ -16333,6 +16642,19 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // (https://cloud.google.com/apis/design/standard_fields). If set, then results // will be boosted based on the region_code provided. RegionCode string `json:"regionCode,omitempty"` + // RelevanceThreshold: The relevance threshold of the search results. Default + // to Google defined threshold, leveraging a balance of precision and recall to + // deliver both highly accurate results and comprehensive coverage of relevant + // information. + // + // Possible values: + // "RELEVANCE_THRESHOLD_UNSPECIFIED" - Default value. In this case, server + // behavior defaults to Google defined threshold. + // "LOWEST" - Lowest relevance threshold. + // "LOW" - Low relevance threshold. + // "MEDIUM" - Medium relevance threshold. + // "HIGH" - High relevance threshold. + RelevanceThreshold string `json:"relevanceThreshold,omitempty"` // SafeSearch: Whether to turn on safe search. This is only supported for // website search. SafeSearch bool `json:"safeSearch,omitempty"` @@ -17646,6 +17968,43 @@ func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1betaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -18446,7 +18805,7 @@ type ProjectsLocationsUpdateAclConfigCall struct { header_ http.Header } -// UpdateAclConfig: Default Acl Configuration for use in a location of a +// UpdateAclConfig: Default ACL configuration for use in a location of a // customer's project. Updates will only reflect to new data stores. Existing // data stores will still use the old value. // @@ -20031,6 +20390,134 @@ func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCal return ret, nil } +type ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherFhirMatcherFhirResources sets the optional parameter +// "matcher.fhirMatcher.fhirResources": Required. The FHIR resources to match +// by. Format: +// projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s +// tore}/fhir/{resource_type}/{fhir_resource_id} +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherFhirMatcherFhirResources(matcherFhirMatcherFhirResources ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.fhirMatcher.fhirResources", append([]string{}, matcherFhirMatcherFhirResources...)) + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/batchGetDocumentsMetadata") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse.ServerRes +// ponse.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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string @@ -33951,6 +34438,134 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts return ret, nil } +type ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherFhirMatcherFhirResources sets the optional parameter +// "matcher.fhirMatcher.fhirResources": Required. The FHIR resources to match +// by. Format: +// projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s +// tore}/fhir/{resource_type}/{fhir_resource_id} +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherFhirMatcherFhirResources(matcherFhirMatcherFhirResources ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.fhirMatcher.fhirResources", append([]string{}, matcherFhirMatcherFhirResources...)) + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/batchGetDocumentsMetadata") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse.ServerRes +// ponse.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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string @@ -44376,6 +44991,266 @@ func (c *ProjectsLocationsUserEventsWriteCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsUserStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsUserStoresOperationsService) Get(name string) *ProjectsLocationsUserStoresOperationsGetCall { + c := &ProjectsLocationsUserStoresOperationsGetCall{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 *ProjectsLocationsUserStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserStoresOperationsGetCall { + 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 *ProjectsLocationsUserStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsUserStoresOperationsGetCall { + 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 *ProjectsLocationsUserStoresOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.userStores.operations.get" 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 *ProjectsLocationsUserStoresOperationsGetCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsUserStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsUserStoresOperationsService) List(name string) *ProjectsLocationsUserStoresOperationsListCall { + c := &ProjectsLocationsUserStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsUserStoresOperationsListCall) Filter(filter string) *ProjectsLocationsUserStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsUserStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsUserStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsUserStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsUserStoresOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsUserStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsUserStoresOperationsListCall { + 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 *ProjectsLocationsUserStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsUserStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUserStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsUserStoresOperationsListCall { + 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 *ProjectsLocationsUserStoresOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUserStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.userStores.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningListOperationsResponse.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 *ProjectsLocationsUserStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsUserStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) 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 ProjectsOperationsGetCall struct { s *Service name string diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 31200a9968d..29c0a7f570d 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -486,6 +486,45 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.fhirMatcher.fhirResources": { + "description": "Required. The FHIR resources to match by. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "location": "query", + "repeated": true, + "type": "string" + }, + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -4021,6 +4060,45 @@ }, "resources": { "branches": { + "methods": { + "batchGetDocumentsMetadata": { + "description": "Gets index freshness metadata for Documents. Supported for website search only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/batchGetDocumentsMetadata", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata", + "parameterOrder": [ + "parent" + ], + "parameters": { + "matcher.fhirMatcher.fhirResources": { + "description": "Required. The FHIR resources to match by. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "location": "query", + "repeated": true, + "type": "string" + }, + "matcher.urisMatcher.uris": { + "description": "The exact URIs to match by.", + "location": "query", + "repeated": true, + "type": "string" + }, + "parent": { + "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/batchGetDocumentsMetadata", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "documents": { "methods": { @@ -6708,7 +6786,7 @@ } } }, - "revision": "20240801", + "revision": "20240817", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6946,7 +7024,7 @@ "id": "GoogleCloudDiscoveryengineV1Control", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -7160,13 +7238,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -7233,6 +7313,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1Schema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -8191,6 +8275,57 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1TrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1TrainCustomModelResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the data.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelName": { + "description": "Fully qualified name of the CustomTuningModel.", + "type": "string" + }, + "modelStatus": { + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { "description": "Metadata for UpdateSchema LRO.", "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", @@ -8225,6 +8360,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1WorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1WorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAclConfig": { "description": "Access Control Configuration.", "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", @@ -8254,7 +8420,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -8263,7 +8430,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -8805,7 +8973,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -9057,7 +9225,8 @@ "TRAINING_COMPLETE", "READY_FOR_SERVING", "TRAINING_FAILED", - "NO_IMPROVEMENT" + "NO_IMPROVEMENT", + "INPUT_VALIDATION_FAILED" ], "enumDescriptions": [ "Default value.", @@ -9066,7 +9235,8 @@ "The model has successfully completed training.", "The model is ready for serving.", "The model training failed.", - "The model training finished successfully but metrics did not improve." + "The model training finished successfully but metrics did not improve.", + "Input data validation failed. Model training didn't start." ], "type": "string" }, @@ -9101,13 +9271,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -9183,6 +9355,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -11793,6 +11969,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1alphaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaAlloyDbSource": { "description": "AlloyDB source import data from.", "id": "GoogleCloudDiscoveryengineV1betaAlloyDbSource", @@ -11814,7 +12021,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the AlloyDB source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the AlloyDB source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -11838,7 +12045,8 @@ "OUT_OF_DOMAIN_QUERY_IGNORED", "POTENTIAL_POLICY_VIOLATION", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The answer skipped reason is not specified.", @@ -11847,7 +12055,8 @@ "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The no relevant content case. Google skips the answer if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Google skips the answer if the query is classified as a jail-breaking query.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -12739,6 +12948,71 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse": { + "description": "Response message for DocumentService.BatchGetDocumentsMetadata method.", + "id": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse", + "properties": { + "documentsMetadata": { + "description": "The metadata of the Documents.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata": { + "description": "The metadata of a Document.", + "id": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata", + "properties": { + "dataIngestionSource": { + "description": "The data ingestion source of the Document. Allowed values are: * `batch`: Data ingested via Batch API, e.g., ImportDocuments. * `streaming` Data ingested via Streaming API, e.g., FHIR streaming.", + "type": "string" + }, + "lastRefreshedTime": { + "description": "The timestamp of the last time the Document was last indexed.", + "format": "google-datetime", + "type": "string" + }, + "matcherValue": { + "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "description": "The value of the matcher that was used to match the Document." + }, + "status": { + "description": "The status of the document.", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_INDEXED", + "STATUS_NOT_IN_TARGET_SITE", + "STATUS_NOT_IN_INDEX" + ], + "enumDescriptions": [ + "Should never be set.", + "The Document is indexed.", + "The Document is not indexed because its URI is not in the TargetSite.", + "The Document is not indexed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue": { + "description": "The value of the matcher that was used to match the Document.", + "id": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", + "properties": { + "fhirResource": { + "description": "Required. Format: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}", + "type": "string" + }, + "uri": { + "description": "If match by URI, the URI of the Document.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest": { "description": "Request message for SiteSearchEngineService.BatchVerifyTargetSites method.", "id": "GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest", @@ -12766,7 +13040,7 @@ "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." }, "projectId": { - "description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID or the project number that contains the BigQuery source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -12917,7 +13191,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Bigtable source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -13007,6 +13281,11 @@ "description": "Indicates that this claim required grounding check. When the system decided this claim doesn't require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore citation_indices, and anti_citation_indices should not be returned.", "type": "boolean" }, + "score": { + "description": "Confidence score for the claim in the answer candidate, in the range of [0, 1].", + "format": "double", + "type": "number" + }, "startPos": { "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", "format": "int32", @@ -13156,7 +13435,7 @@ "type": "boolean" }, "projectId": { - "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Cloud SQL source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -13317,7 +13596,7 @@ "id": "GoogleCloudDiscoveryengineV1betaControl", "properties": { "associatedServingConfigIds": { - "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "description": "Output only. List of all ServingConfig IDs this control is attached to. May take up to 10 minutes to update after changes.", "items": { "type": "string" }, @@ -13753,7 +14032,8 @@ "TRAINING_COMPLETE", "READY_FOR_SERVING", "TRAINING_FAILED", - "NO_IMPROVEMENT" + "NO_IMPROVEMENT", + "INPUT_VALIDATION_FAILED" ], "enumDescriptions": [ "Default value.", @@ -13762,7 +14042,8 @@ "The model has successfully completed training.", "The model is ready for serving.", "The model training failed.", - "The model training finished successfully but metrics did not improve." + "The model training finished successfully but metrics did not improve.", + "Input data validation failed. Model training didn't start." ], "type": "string" }, @@ -13793,13 +14074,15 @@ "CONTENT_CONFIG_UNSPECIFIED", "NO_CONTENT", "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "PUBLIC_WEBSITE", + "GOOGLE_WORKSPACE" ], "enumDescriptions": [ "Default value.", "Only contains documents without any Document.content.", "Only contains documents with Document.content.", - "The data store is used for public website search." + "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." ], "type": "string" }, @@ -13870,6 +14153,10 @@ "startingSchema": { "$ref": "GoogleCloudDiscoveryengineV1betaSchema", "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + }, + "workspaceConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "description": "Config to store data store type configuration for workspace data. This must be set when DataStore.content_config is set as DataStore.ContentConfig.GOOGLE_WORKSPACE." } }, "type": "object" @@ -16305,6 +16592,24 @@ "description": "The Unicode country/region code (CLDR) of a location, such as \"US\" and \"419\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). If set, then results will be boosted based on the region_code provided.", "type": "string" }, + "relevanceThreshold": { + "description": "The relevance threshold of the search results. Default to Google defined threshold, leveraging a balance of precision and recall to deliver both highly accurate results and comprehensive coverage of relevant information.", + "enum": [ + "RELEVANCE_THRESHOLD_UNSPECIFIED", + "LOWEST", + "LOW", + "MEDIUM", + "HIGH" + ], + "enumDescriptions": [ + "Default value. In this case, server behavior defaults to Google defined threshold.", + "Lowest relevance threshold.", + "Low relevance threshold.", + "Medium relevance threshold.", + "High relevance threshold." + ], + "type": "string" + }, "safeSearch": { "description": "Whether to turn on safe search. This is only supported for website search.", "type": "boolean" @@ -16866,7 +17171,7 @@ "type": "array" }, "attributionToken": { - "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", + "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. This also helps to identify a request during the customer support scenarios.", "type": "string" }, "correctedQuery": { @@ -17158,6 +17463,10 @@ "description": "Name of the numerical field as defined in the schema.", "type": "string" }, + "querySegment": { + "description": "Identifies the keywords within the search query that match a filter.", + "type": "string" + }, "value": { "description": "The value specified in the numerical constraint.", "format": "double", @@ -17188,6 +17497,10 @@ "description": "Name of the string field as defined in the schema.", "type": "string" }, + "querySegment": { + "description": "Identifies the keywords within the search query that match a filter.", + "type": "string" + }, "values": { "description": "Values of the string field. The record will only be returned if the field value matches one of the values specified here.", "items": { @@ -17304,7 +17617,8 @@ "POTENTIAL_POLICY_VIOLATION", "LLM_ADDON_NOT_ENABLED", "NO_RELEVANT_CONTENT", - "JAIL_BREAKING_QUERY_IGNORED" + "JAIL_BREAKING_QUERY_IGNORED", + "CUSTOMER_POLICY_VIOLATION" ], "enumDescriptions": [ "Default value. The summary skipped reason is not specified.", @@ -17314,7 +17628,8 @@ "The potential policy violation case. Google skips the summary if there is a potential policy violation detected. This includes content that may be violent or toxic.", "The LLM addon not enabled case. Google skips the summary if the LLM addon is not enabled.", "The no relevant content case. Google skips the summary if there is no relevant content in the retrieved search results.", - "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`." + "The jail-breaking query ignored case. For example, \"Reply in the tone of a competing company's CEO\". Only used when [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is set to `true`.", + "The customer policy violation case. Google skips the summary if there is a customer policy violation detected. The policy is defined by the customer." ], "type": "string" }, @@ -17745,7 +18060,7 @@ "type": "string" }, "projectId": { - "description": "The project ID that the Spanner source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that contains the Spanner source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -18201,6 +18516,37 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaWorkspaceConfig": { + "description": "Config to store data store type configuration for workspace data", + "id": "GoogleCloudDiscoveryengineV1betaWorkspaceConfig", + "properties": { + "dasherCustomerId": { + "description": "Obfuscated Dasher customer ID.", + "type": "string" + }, + "type": { + "description": "The Google Workspace data source.", + "enum": [ + "TYPE_UNSPECIFIED", + "GOOGLE_DRIVE", + "GOOGLE_MAIL", + "GOOGLE_SITES", + "GOOGLE_CALENDAR", + "GOOGLE_GROUPS" + ], + "enumDescriptions": [ + "Default value.", + "The data store is used to store content from Google Drive.", + "The data store is used to store content from Gmail.", + "The data store is used to store content from Google Sites.", + "The data store is used to store content from Google Calendar.", + "The data store is used to store content from Google Groups." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleLongrunningCancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "GoogleLongrunningCancelOperationRequest", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 2e08a729962..3e6f0c03b83 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -1269,7 +1269,7 @@ func (s GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, e // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1Control struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -1584,6 +1584,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -1637,6 +1639,10 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1Schema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1WorkspaceConfig `json:"workspaceConfig,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 @@ -2929,6 +2935,72 @@ func (s GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1TrainCustomModelMetadata: Metadata related to +// the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1TrainCustomModelMetadata 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 GoogleCloudDiscoveryengineV1TrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1TrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1TrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1ImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + // ModelName: Fully qualified name of the CustomTuningModel. + ModelName string `json:"modelName,omitempty"` + // ModelStatus: The trained model status. Possible values are: * **bad-data**: + // The training data quality is bad. * **no-improvement**: Tuning didn't + // improve performance. Won't deploy. * **in-progress**: Model training job + // creation is in progress. * **training**: Model is actively training. * + // **evaluating**: The model is evaluating trained metrics. * **indexing**: The + // model trained metrics are indexing. * **ready**: The model is ready for + // serving. + ModelStatus string `json:"modelStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorConfig") 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. "ErrorConfig") 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 GoogleCloudDiscoveryengineV1TrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1TrainCustomModelResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1UpdateSchemaMetadata: Metadata for UpdateSchema // LRO. type GoogleCloudDiscoveryengineV1UpdateSchemaMetadata struct { @@ -2982,6 +3054,43 @@ func (s GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1WorkspaceConfig: Config to store data store type +// configuration for workspace data +type GoogleCloudDiscoveryengineV1WorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1WorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1WorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAclConfig: Access Control Configuration. type GoogleCloudDiscoveryengineV1alphaAclConfig struct { // IdpConfig: Identity provider config. @@ -3029,6 +3138,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -3727,7 +3839,7 @@ func (s GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]by // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1alphaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -4081,6 +4193,8 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // "TRAINING_FAILED" - The model training failed. // "NO_IMPROVEMENT" - The model training finished successfully but metrics // did not improve. + // "INPUT_VALIDATION_FAILED" - Input data validation failed. Model training + // didn't start. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -4128,6 +4242,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -4185,6 +4301,10 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1alphaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "AclEnabled") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -7925,6 +8045,43 @@ func (s GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1alphaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1alphaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaAlloyDbSource: AlloyDB source import data // from. type GoogleCloudDiscoveryengineV1betaAlloyDbSource struct { @@ -7943,9 +8100,9 @@ type GoogleCloudDiscoveryengineV1betaAlloyDbSource struct { // LocationId: Required. The AlloyDB location to copy the data from with a // length limit of 256 characters. LocationId string `json:"locationId,omitempty"` - // ProjectId: The project ID that the AlloyDB source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the AlloyDB source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The AlloyDB table to copy the data from with a length // limit of 256 characters. @@ -7989,6 +8146,9 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { // "JAIL_BREAKING_QUERY_IGNORED" - The jail-breaking query ignored case. For // example, "Reply in the tone of a competing company's CEO". Google skips the // answer if the query is classified as a jail-breaking query. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` // AnswerText: The textual answer. AnswerText string `json:"answerText,omitempty"` @@ -9227,6 +9387,99 @@ func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse: Response +// message for DocumentService.BatchGetDocumentsMetadata method. +type GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse struct { + // DocumentsMetadata: The metadata of the Documents. + DocumentsMetadata []*GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata `json:"documentsMetadata,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DocumentsMetadata") 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. "DocumentsMetadata") 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 GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMeta +// data: The metadata of a Document. +type GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata struct { + // DataIngestionSource: The data ingestion source of the Document. Allowed + // values are: * `batch`: Data ingested via Batch API, e.g., ImportDocuments. * + // `streaming` Data ingested via Streaming API, e.g., FHIR streaming. + DataIngestionSource string `json:"dataIngestionSource,omitempty"` + // LastRefreshedTime: The timestamp of the last time the Document was last + // indexed. + LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` + // MatcherValue: The value of the matcher that was used to match the Document. + MatcherValue *GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` + // Status: The status of the document. + // + // Possible values: + // "STATUS_UNSPECIFIED" - Should never be set. + // "STATUS_INDEXED" - The Document is indexed. + // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI + // is not in the TargetSite. + // "STATUS_NOT_IN_INDEX" - The Document is not indexed. + Status string `json:"status,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataIngestionSource") 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. "DataIngestionSource") 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 GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMeta +// dataMatcherValue: The value of the matcher that was used to match the +// Document. +type GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue struct { + // FhirResource: Required. Format: + // projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s + // tore}/fhir/{resource_type}/{fhir_resource_id} + FhirResource string `json:"fhirResource,omitempty"` + // Uri: If match by URI, the URI of the Document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "FhirResource") 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. "FhirResource") 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 GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest: Request // message for SiteSearchEngineService.BatchVerifyTargetSites method. type GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest struct { @@ -9254,8 +9507,8 @@ type GoogleCloudDiscoveryengineV1betaBigQuerySource struct { // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in // YYYY-MM-DD format. PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` - // ProjectId: The project ID (can be project # or ID) that the BigQuery source - // is in with a length limit of 128 characters. If not specified, inherits the + // ProjectId: The project ID or the project number that contains the BigQuery + // source. Has a length limit of 128 characters. If not specified, inherits the // project ID from the parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The BigQuery table to copy the data from with a length @@ -9427,9 +9680,9 @@ type GoogleCloudDiscoveryengineV1betaBigtableSource struct { // InstanceId: Required. The instance ID of the Cloud Bigtable that needs to be // imported. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Bigtable source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Bigtable source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table ID of the Cloud Bigtable that needs to be // imported. @@ -9562,6 +9815,9 @@ type GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim struct { // done for the claim and therefore citation_indices, and anti_citation_indices // should not be returned. GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // Score: Confidence score for the claim in the answer candidate, in the range + // of [0, 1]. + Score float64 `json:"score,omitempty"` // StartPos: Position indicating the start of the claim in the answer // candidate, measured in bytes. StartPos int64 `json:"startPos,omitempty"` @@ -9583,6 +9839,20 @@ func (s GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + // GoogleCloudDiscoveryengineV1betaCheckGroundingSpec: Specification for the // grounding check. type GoogleCloudDiscoveryengineV1betaCheckGroundingSpec struct { @@ -9783,7 +10053,7 @@ type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { // additional cost. More info can be found here // (https://cloud.google.com/sql/pricing#serverless). Offload bool `json:"offload,omitempty"` - // ProjectId: The project ID that the Cloud SQL source is in with a length + // ProjectId: The project ID that contains the Cloud SQL source. Has a length // limit of 128 characters. If not specified, inherits the project ID from the // parent request. ProjectId string `json:"projectId,omitempty"` @@ -10033,7 +10303,7 @@ func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byt // employ during serving. Must be attached to a ServingConfig to be considered // at serving time. Permitted actions dependent on `SolutionType`. type GoogleCloudDiscoveryengineV1betaControl struct { - // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // AssociatedServingConfigIds: Output only. List of all ServingConfig IDs this // control is attached to. May take up to 10 minutes to update after changes. AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` // BoostAction: Defines a boost-type control @@ -10640,6 +10910,8 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // "TRAINING_FAILED" - The model training failed. // "NO_IMPROVEMENT" - The model training finished successfully but metrics // did not improve. + // "INPUT_VALIDATION_FAILED" - Input data validation failed. Model training + // didn't start. ModelState string `json:"modelState,omitempty"` // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` @@ -10679,6 +10951,8 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // "NO_CONTENT" - Only contains documents without any Document.content. // "CONTENT_REQUIRED" - Only contains documents with Document.content. // "PUBLIC_WEBSITE" - The data store is used for public website search. + // "GOOGLE_WORKSPACE" - The data store is used for workspace search. Details + // of workspace data store are specified in the WorkspaceConfig. ContentConfig string `json:"contentConfig,omitempty"` // CreateTime: Output only. Timestamp the DataStore was created at. CreateTime string `json:"createTime,omitempty"` @@ -10734,6 +11008,10 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // against certain rules on schema. Learn more from this doc // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // WorkspaceConfig: Config to store data store type configuration for workspace + // data. This must be set when DataStore.content_config is set as + // DataStore.ContentConfig.GOOGLE_WORKSPACE. + WorkspaceConfig *GoogleCloudDiscoveryengineV1betaWorkspaceConfig `json:"workspaceConfig,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -14340,6 +14618,19 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // (https://cloud.google.com/apis/design/standard_fields). If set, then results // will be boosted based on the region_code provided. RegionCode string `json:"regionCode,omitempty"` + // RelevanceThreshold: The relevance threshold of the search results. Default + // to Google defined threshold, leveraging a balance of precision and recall to + // deliver both highly accurate results and comprehensive coverage of relevant + // information. + // + // Possible values: + // "RELEVANCE_THRESHOLD_UNSPECIFIED" - Default value. In this case, server + // behavior defaults to Google defined threshold. + // "LOWEST" - Lowest relevance threshold. + // "LOW" - Low relevance threshold. + // "MEDIUM" - Medium relevance threshold. + // "HIGH" - High relevance threshold. + RelevanceThreshold string `json:"relevanceThreshold,omitempty"` // SafeSearch: Whether to turn on safe search. This is only supported for // website search. SafeSearch bool `json:"safeSearch,omitempty"` @@ -15325,7 +15616,8 @@ type GoogleCloudDiscoveryengineV1betaSearchResponse struct { AppliedControls []string `json:"appliedControls,omitempty"` // AttributionToken: A unique search token. This should be included in the // UserEvent logs resulting from this search, which enables accurate - // attribution of search model performance. + // attribution of search model performance. This also helps to identify a + // request during the customer support scenarios. AttributionToken string `json:"attributionToken,omitempty"` // CorrectedQuery: Contains the spell corrected query, if found. If the spell // correction type is AUTOMATIC, then the search results are based on @@ -15702,6 +15994,9 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstan Comparison string `json:"comparison,omitempty"` // FieldName: Name of the numerical field as defined in the schema. FieldName string `json:"fieldName,omitempty"` + // QuerySegment: Identifies the keywords within the search query that match a + // filter. + QuerySegment string `json:"querySegment,omitempty"` // Value: The value specified in the numerical constraint. Value float64 `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Comparison") to @@ -15765,6 +16060,9 @@ func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnders type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint struct { // FieldName: Name of the string field as defined in the schema. FieldName string `json:"fieldName,omitempty"` + // QuerySegment: Identifies the keywords within the search query that match a + // filter. + QuerySegment string `json:"querySegment,omitempty"` // Values: Values of the string field. The record will only be returned if the // field value matches one of the values specified here. Values []string `json:"values,omitempty"` @@ -15939,6 +16237,9 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { // example, "Reply in the tone of a competing company's CEO". Only used when // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query] is // set to `true`. + // "CUSTOMER_POLICY_VIOLATION" - The customer policy violation case. Google + // skips the summary if there is a customer policy violation detected. The + // policy is defined by the customer. SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` // SummaryText: The summary content. SummaryText string `json:"summaryText,omitempty"` @@ -16520,9 +16821,9 @@ type GoogleCloudDiscoveryengineV1betaSpannerSource struct { EnableDataBoost bool `json:"enableDataBoost,omitempty"` // InstanceId: Required. The instance ID of the source Spanner table. InstanceId string `json:"instanceId,omitempty"` - // ProjectId: The project ID that the Spanner source is in with a length limit - // of 128 characters. If not specified, inherits the project ID from the parent - // request. + // ProjectId: The project ID that contains the Spanner source. Has a length + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. ProjectId string `json:"projectId,omitempty"` // TableId: Required. The table name of the Spanner database that needs to be // imported. @@ -17209,6 +17510,43 @@ func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaWorkspaceConfig: Config to store data store +// type configuration for workspace data +type GoogleCloudDiscoveryengineV1betaWorkspaceConfig struct { + // DasherCustomerId: Obfuscated Dasher customer ID. + DasherCustomerId string `json:"dasherCustomerId,omitempty"` + // Type: The Google Workspace data source. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "GOOGLE_DRIVE" - The data store is used to store content from Google + // Drive. + // "GOOGLE_MAIL" - The data store is used to store content from Gmail. + // "GOOGLE_SITES" - The data store is used to store content from Google + // Sites. + // "GOOGLE_CALENDAR" - The data store is used to store content from Google + // Calendar. + // "GOOGLE_GROUPS" - The data store is used to store content from Google + // Groups. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "DasherCustomerId") 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. "DasherCustomerId") 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 GoogleCloudDiscoveryengineV1betaWorkspaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaWorkspaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -18740,6 +19078,134 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... return ret, nil } +type ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherFhirMatcherFhirResources sets the optional parameter +// "matcher.fhirMatcher.fhirResources": Required. The FHIR resources to match +// by. Format: +// projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s +// tore}/fhir/{resource_type}/{fhir_resource_id} +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherFhirMatcherFhirResources(matcherFhirMatcherFhirResources ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.fhirMatcher.fhirResources", append([]string{}, matcherFhirMatcherFhirResources...)) + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/batchGetDocumentsMetadata") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse.ServerResp +// onse.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 *ProjectsLocationsCollectionsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string @@ -31804,6 +32270,134 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } +type ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// BatchGetDocumentsMetadata: Gets index freshness metadata for Documents. +// Supported for website search only. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesService) BatchGetDocumentsMetadata(parent string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c := &ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// MatcherFhirMatcherFhirResources sets the optional parameter +// "matcher.fhirMatcher.fhirResources": Required. The FHIR resources to match +// by. Format: +// projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_s +// tore}/fhir/{resource_type}/{fhir_resource_id} +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherFhirMatcherFhirResources(matcherFhirMatcherFhirResources ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.urlParams_.SetMulti("matcher.fhirMatcher.fhirResources", append([]string{}, matcherFhirMatcherFhirResources...)) + return c +} + +// MatcherUrisMatcherUris sets the optional parameter +// "matcher.urisMatcher.uris": The exact URIs to match by. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) MatcherUrisMatcherUris(matcherUrisMatcherUris ...string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall { + 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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/batchGetDocumentsMetadata") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.batchGetDocumentsMetadata" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse.ServerResp +// onse.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 *ProjectsLocationsDataStoresBranchesBatchGetDocumentsMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse, 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 := &GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { s *Service parent string diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index 0214ede2934..d9c1608026c 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -9267,7 +9267,7 @@ } } }, - "revision": "20240618", + "revision": "20240808", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -14105,7 +14105,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14189,7 +14190,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" } @@ -14298,7 +14300,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14382,7 +14385,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, @@ -14492,7 +14496,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14576,7 +14581,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, @@ -14687,7 +14693,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14771,7 +14778,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "readOnly": true, "type": "string" @@ -15733,7 +15741,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15817,7 +15826,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, @@ -16644,7 +16654,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -16728,7 +16739,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, @@ -18903,8 +18915,8 @@ "Advertiser ID. If selected, all filter IDs must be Advertiser IDs that belong to the Partner specified in CreateSdfDownloadTaskRequest.", "Campaign ID. If selected, all filter IDs must be Campaign IDs that belong to the Advertiser or Partner specified in CreateSdfDownloadTaskRequest.", "Media Product ID. If selected, all filter IDs must be Media Product IDs that belong to the Advertiser or Partner specified in CreateSdfDownloadTaskRequest. Can only be used for downloading `FILE_TYPE_MEDIA_PRODUCT`.", - "Insertion Order ID. If selected, all filter IDs must be Insertion Order IDs that belong to the Advertiser or Partner specified in CreateSdfDownloadTaskRequest. Can only be used for downloading `FILE_TYPE_INSERTION_ORDER`, `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_AD_GROUP`, and `FILE_TYPE_AD`.", - "Line Item ID. If selected, all filter IDs must be Line Item IDs that belong to the Advertiser or Partner specified in CreateSdfDownloadTaskRequest. Can only be used for downloading `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_AD_GROUP`, and `FILE_TYPE_AD`." + "Insertion Order ID. If selected, all filter IDs must be Insertion Order IDs that belong to the Advertiser or Partner specified in CreateSdfDownloadTaskRequest. Can only be used for downloading `FILE_TYPE_INSERTION_ORDER`, `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_LINE_ITEM_QA`, `FILE_TYPE_AD_GROUP`, `FILE_TYPE_AD_GROUP_QA`, and `FILE_TYPE_AD`.", + "Line Item ID. If selected, all filter IDs must be Line Item IDs that belong to the Advertiser or Partner specified in CreateSdfDownloadTaskRequest. Can only be used for downloading `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_LINE_ITEM_QA`,`FILE_TYPE_AD_GROUP`, `FILE_TYPE_AD_GROUP_QA`, and `FILE_TYPE_AD`." ], "type": "string" } @@ -19760,7 +19772,8 @@ "type": "array" }, "publisherReviewStatuses": { - "description": "Publisher review statuses for the creative. **Warning:** This field will be deprecated on June 26th, 2024. After this date, this field will be empty. Read our [feature deprecation announcement](/display-video/api/deprecations#features.creative_publisher_review_statuses) for more information.", + "deprecated": true, + "description": "Publisher review statuses for the creative.", "items": { "$ref": "PublisherReviewStatus" }, diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index b85770516a1..a3b6eea601c 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -6829,6 +6829,7 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to // unconditionally include in API requests. By default, fields with empty or @@ -6961,6 +6962,7 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. The // field is only relevant when Google Ad Manager is the enabled exchange. @@ -7077,6 +7079,7 @@ type ExchangeReviewStatus struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. // @@ -7196,6 +7199,7 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to // unconditionally include in API requests. By default, fields with empty or @@ -8228,6 +8232,7 @@ type GuaranteedOrder struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the guaranteed // order. The guaranteed order IDs have the format @@ -9010,6 +9015,7 @@ type InventorySource struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that this // inventory source belongs to. Only applicable when commitment is @@ -11968,11 +11974,13 @@ type ParentEntityFilter struct { // filter IDs must be Insertion Order IDs that belong to the Advertiser or // Partner specified in CreateSdfDownloadTaskRequest. Can only be used for // downloading `FILE_TYPE_INSERTION_ORDER`, `FILE_TYPE_LINE_ITEM`, - // `FILE_TYPE_AD_GROUP`, and `FILE_TYPE_AD`. + // `FILE_TYPE_LINE_ITEM_QA`, `FILE_TYPE_AD_GROUP`, `FILE_TYPE_AD_GROUP_QA`, and + // `FILE_TYPE_AD`. // "FILTER_TYPE_LINE_ITEM_ID" - Line Item ID. If selected, all filter IDs // must be Line Item IDs that belong to the Advertiser or Partner specified in // CreateSdfDownloadTaskRequest. Can only be used for downloading - // `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_AD_GROUP`, and `FILE_TYPE_AD`. + // `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_LINE_ITEM_QA`,`FILE_TYPE_AD_GROUP`, + // `FILE_TYPE_AD_GROUP_QA`, and `FILE_TYPE_AD`. FilterType string `json:"filterType,omitempty"` // ForceSendFields is a list of field names (e.g. "FileType") to // unconditionally include in API requests. By default, fields with empty or @@ -13105,10 +13113,6 @@ type ReviewStatusInfo struct { // ExchangeReviewStatuses: Exchange review statuses for the creative. ExchangeReviewStatuses []*ExchangeReviewStatus `json:"exchangeReviewStatuses,omitempty"` // PublisherReviewStatuses: Publisher review statuses for the creative. - // **Warning:** This field will be deprecated on June 26th, 2024. After this - // date, this field will be empty. Read our feature deprecation announcement - // (/display-video/api/deprecations#features.creative_publisher_review_statuses) - // for more information. PublisherReviewStatuses []*PublisherReviewStatus `json:"publisherReviewStatuses,omitempty"` // ForceSendFields is a list of field names (e.g. "ApprovalStatus") to // unconditionally include in API requests. By default, fields with empty or diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index 49f74318f5f..3f440fcf0cb 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -9222,7 +9222,7 @@ } } }, - "revision": "20240717", + "revision": "20240808", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -10048,7 +10048,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -10132,7 +10133,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, @@ -14819,7 +14821,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -14903,7 +14906,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" } @@ -15012,7 +15016,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15096,7 +15101,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, @@ -15206,7 +15212,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15290,7 +15297,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, @@ -15401,7 +15409,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -15485,7 +15494,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "readOnly": true, "type": "string" @@ -16447,7 +16457,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -16531,7 +16542,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, @@ -17372,7 +17384,8 @@ "EXCHANGE_UNITY_GBID", "EXCHANGE_CHARTBOOST_GBID", "EXCHANGE_ADMOST_GBID", - "EXCHANGE_TOPON_GBID" + "EXCHANGE_TOPON_GBID", + "EXCHANGE_NETFLIX" ], "enumDescriptions": [ "Exchange is not specified or is unknown in this version.", @@ -17456,7 +17469,8 @@ "Unity LevelPlay.", "Chartboost Mediation.", "AdMost.", - "TopOn." + "TopOn.", + "Netflix." ], "type": "string" }, diff --git a/displayvideo/v3/displayvideo-gen.go b/displayvideo/v3/displayvideo-gen.go index 22b43a5ad0f..6658a26a2e9 100644 --- a/displayvideo/v3/displayvideo-gen.go +++ b/displayvideo/v3/displayvideo-gen.go @@ -1682,6 +1682,7 @@ type AlgorithmRulesComparisonValue struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. ExchangeValue string `json:"exchangeValue,omitempty"` // Int64Value: Integer value. Int64Value int64 `json:"int64Value,omitempty,string"` @@ -7604,6 +7605,7 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to // unconditionally include in API requests. By default, fields with empty or @@ -7736,6 +7738,7 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. The // field is only relevant when Google Ad Manager is the enabled exchange. @@ -7852,6 +7855,7 @@ type ExchangeReviewStatus struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. // @@ -7971,6 +7975,7 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to // unconditionally include in API requests. By default, fields with empty or @@ -9003,6 +9008,7 @@ type GuaranteedOrder struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the guaranteed // order. The guaranteed order IDs have the format @@ -9801,6 +9807,7 @@ type InventorySource struct { // "EXCHANGE_CHARTBOOST_GBID" - Chartboost Mediation. // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. + // "EXCHANGE_NETFLIX" - Netflix. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that this // inventory source belongs to. Only applicable when commitment is diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 38994d2ccbe..7bee9dccb9a 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -347,7 +347,7 @@ "type": "string" }, "parent": { - "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", + "description": "The parent resource name. The format of this value is as follows: `locations/{location_id}`", "location": "query", "type": "string" } @@ -391,7 +391,7 @@ "type": "string" }, "parent": { - "description": "The parent resource name. The format of this value is as follows: locations/ LOCATION_ID", + "description": "The parent resource name. The format of this value is as follows: `locations/{location_id}`", "location": "path", "pattern": "^locations/[^/]+$", "required": true, @@ -424,7 +424,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -523,7 +523,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -580,7 +580,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -679,7 +679,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -813,7 +813,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Organizations scope: `organizations/`ORG_ID`/locations/`LOCATION_ID", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: `projects/{project_id}/locations/{location_id}` + Organizations scope: `organizations/{org_id}/locations/{location_id}`", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1005,7 +1005,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1104,7 +1104,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1161,7 +1161,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Organizations scope: `organizations/`ORG_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: `projects/{project_id}/locations/{location_id}` + Organizations scope: `organizations/{org_id}/locations/{location_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1255,7 +1255,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value is as follows: `projects/{project_id}/locations/{location_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1338,7 +1338,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1432,7 +1432,7 @@ ], "parameters": { "filter": { - "description": "Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `project_id` - The Google Cloud project ID. - `file_store_path` - The path like \"gs://bucket\". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path = \"gs://mybucket\"` The length of this field should be no more than 500 characters.", + "description": "Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `project_id` - The Google Cloud project ID. - `file_store_path` - The path like \"gs://bucket\". - `data_source_type` - The profile's data source type, like \"google/storage/bucket\". - `data_storage_location` - The location where the file store's data is stored, like \"us-central1\". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path = \"gs://mybucket\"` The length of this field should be no more than 500 characters.", "location": "query", "type": "string" }, @@ -1482,7 +1482,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1581,7 +1581,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1638,7 +1638,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1742,7 +1742,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1889,7 +1889,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -1988,7 +1988,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+/locations/[^/]+$", "required": true, @@ -2147,7 +2147,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -2246,7 +2246,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^organizations/[^/]+$", "required": true, @@ -2307,7 +2307,7 @@ ], "parameters": { "parent": { - "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2335,7 +2335,7 @@ ], "parameters": { "parent": { - "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2363,7 +2363,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2395,7 +2395,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2494,7 +2494,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2579,7 +2579,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2683,7 +2683,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2727,7 +2727,7 @@ ], "parameters": { "parent": { - "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2759,7 +2759,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2858,7 +2858,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -2943,7 +2943,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -3047,7 +3047,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -3196,7 +3196,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Organizations scope: `organizations/`ORG_ID`/locations/`LOCATION_ID", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: `projects/{project_id}/locations/{location_id}` + Organizations scope: `organizations/{org_id}/locations/{location_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3388,7 +3388,7 @@ ], "parameters": { "parent": { - "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3416,7 +3416,7 @@ ], "parameters": { "parent": { - "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3444,7 +3444,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3476,7 +3476,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3575,7 +3575,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3632,7 +3632,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: `projects/`PROJECT_ID`/locations/`LOCATION_ID + Organizations scope: `organizations/`ORG_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization): + Projects scope: `projects/{project_id}/locations/{location_id}` + Organizations scope: `organizations/{org_id}/locations/{location_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3726,7 +3726,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value is as follows: `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value is as follows: `projects/{project_id}/locations/{location_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3811,7 +3811,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -3971,7 +3971,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4065,7 +4065,7 @@ ], "parameters": { "filter": { - "description": "Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `project_id` - The Google Cloud project ID. - `file_store_path` - The path like \"gs://bucket\". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path = \"gs://mybucket\"` The length of this field should be no more than 500 characters.", + "description": "Optional. Allows filtering. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * Supported fields/values: - `project_id` - The Google Cloud project ID. - `file_store_path` - The path like \"gs://bucket\". - `data_source_type` - The profile's data source type, like \"google/storage/bucket\". - `data_storage_location` - The location where the file store's data is stored, like \"us-central1\". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status code as defined in https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * `project_id = 12345 AND resource_visibility = PUBLIC` * `file_store_path = \"gs://mybucket\"` The length of this field should be no more than 500 characters.", "location": "query", "type": "string" }, @@ -4115,7 +4115,7 @@ ], "parameters": { "parent": { - "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4147,7 +4147,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4246,7 +4246,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4331,7 +4331,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4463,7 +4463,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4610,7 +4610,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4709,7 +4709,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -4868,7 +4868,7 @@ ], "parameters": { "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID + Organizations scope, location specified: `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no location specified (defaults to global): `organizations/`ORG_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` + Organizations scope, location specified: `organizations/{org_id}/locations/{location_id}` + Organizations scope, no location specified (defaults to global): `organizations/{org_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -4967,7 +4967,7 @@ "type": "string" }, "parent": { - "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/`PROJECT_ID`/locations/` LOCATION_ID + Projects scope, no location specified (defaults to global): `projects/`PROJECT_ID The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", + "description": "Required. Parent resource name. The format of this value varies depending on the scope of the request (project or organization) and whether you have [specified a processing location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + Projects scope, location specified: `projects/{project_id}/locations/{location_id}` + Projects scope, no location specified (defaults to global): `projects/{project_id}` The following example `parent` string specifies a parent project with the identifier `example-project`, and specifies the `europe-west3` location for processing data: parent=projects/example-project/locations/europe-west3", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -5015,7 +5015,7 @@ } } }, - "revision": "20240805", + "revision": "20240818", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -6428,7 +6428,7 @@ "description": "Required. The key used by the encryption algorithm." }, "customAlphabet": { - "description": "This is supported by mapping these to the alphanumeric characters that the FFX mode natively supports. This happens before/after encryption/decryption. Each character listed must appear only once. Number of characters must be in the range [2, 95]. This must be encoded as ASCII. The order of characters does not matter. The full list of allowed characters is: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ~`!@#$%^\u0026*()_-+={[}]|\\:;\"'\u003c,\u003e.?/", + "description": "This is supported by mapping these to the alphanumeric characters that the FFX mode natively supports. This happens before/after encryption/decryption. Each character listed must appear only once. Number of characters must be in the range [2, 95]. This must be encoded as ASCII. The order of characters does not matter. The full list of allowed characters is: ``0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~`!@#$%^\u0026*()_-+={[}]|\\:;\"'\u003c,\u003e.?/``", "type": "string" }, "radix": { @@ -6524,6 +6524,10 @@ "pubSubNotification": { "$ref": "GooglePrivacyDlpV2PubSubNotification", "description": "Publish a message into the Pub/Sub topic." + }, + "tagResources": { + "$ref": "GooglePrivacyDlpV2TagResources", + "description": "Tags the profiled resources with the specified tag values." } }, "type": "object" @@ -7305,6 +7309,10 @@ "description": "How often existing tables should have their profiles refreshed. New tables are scanned as quickly as possible depending on system capacity.", "id": "GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence", "properties": { + "inspectTemplateModifiedCadence": { + "$ref": "GooglePrivacyDlpV2DiscoveryInspectTemplateModifiedCadence", + "description": "Governs when to update data profiles when the inspection rules defined by the `InspectTemplate` change. If not set, changing the template will not cause a data profile to update." + }, "refreshFrequency": { "description": "Data changes (non-schema changes) in Cloud SQL tables can't trigger reprofiling. If you set this field, profiles are refreshed at this frequency regardless of whether the underlying tables have changed. Defaults to never.", "enum": [ @@ -8014,14 +8022,14 @@ "description": "The file cluster type." }, "fileExtensionsScanned": { - "description": "A sample of file types scanned in this cluster. Empty if no files were scanned.", + "description": "A sample of file types scanned in this cluster. Empty if no files were scanned. File extensions can be derived from the file name or the file content.", "items": { "$ref": "GooglePrivacyDlpV2FileExtensionInfo" }, "type": "array" }, "fileExtensionsSeen": { - "description": "A sample of file types seen in this cluster. Empty if no files were seen.", + "description": "A sample of file types seen in this cluster. Empty if no files were seen. File extensions can be derived from the file name or the file content.", "items": { "$ref": "GooglePrivacyDlpV2FileExtensionInfo" }, @@ -11442,6 +11450,67 @@ }, "type": "object" }, + "GooglePrivacyDlpV2TagCondition": { + "description": "The tag to attach to profiles matching the condition. At most one `TagCondition` can be specified per sensitivity level.", + "id": "GooglePrivacyDlpV2TagCondition", + "properties": { + "sensitivityScore": { + "$ref": "GooglePrivacyDlpV2SensitivityScore", + "description": "Conditions attaching the tag to a resource on its profile having this sensitivity score." + }, + "tag": { + "$ref": "GooglePrivacyDlpV2TagValue", + "description": "The tag value to attach to resources." + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2TagResources": { + "description": "If set, attaches the [tags] (https://cloud.google.com/resource-manager/docs/tags/tags-overview) provided to profiled resources. Tags support [access control](https://cloud.google.com/iam/docs/tags-access-control). You can conditionally grant or deny access to a resource based on whether the resource has a specific tag.", + "id": "GooglePrivacyDlpV2TagResources", + "properties": { + "lowerDataRiskToLow": { + "description": "Whether applying a tag to a resource should lower the risk of the profile for that resource. For example, in conjunction with an [IAM deny policy](https://cloud.google.com/iam/docs/deny-overview), you can deny all principals a permission if a tag value is present, mitigating the risk of the resource. This also lowers the data risk of resources at the lower levels of the resource hierarchy. For example, reducing the data risk of a table data profile also reduces the data risk of the constituent column data profiles.", + "type": "boolean" + }, + "profileGenerationsToTag": { + "description": "The profile generations for which the tag should be attached to resources. If you attach a tag to only new profiles, then if the sensitivity score of a profile subsequently changes, its tag doesn't change. By default, this field includes only new profiles. To include both new and updated profiles for tagging, this field should explicitly include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`.", + "items": { + "enum": [ + "PROFILE_GENERATION_UNSPECIFIED", + "PROFILE_GENERATION_NEW", + "PROFILE_GENERATION_UPDATE" + ], + "enumDescriptions": [ + "Unused.", + "The profile is the first profile for the resource.", + "The profile is an update to a previous profile." + ], + "type": "string" + }, + "type": "array" + }, + "tagConditions": { + "description": "The tags to associate with different conditions.", + "items": { + "$ref": "GooglePrivacyDlpV2TagCondition" + }, + "type": "array" + } + }, + "type": "object" + }, + "GooglePrivacyDlpV2TagValue": { + "description": "A value of a tag.", + "id": "GooglePrivacyDlpV2TagValue", + "properties": { + "namespacedValue": { + "description": "The namespaced name for the tag value to attach to resources. Must be in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for example, \"123456/environment/prod\".", + "type": "string" + } + }, + "type": "object" + }, "GooglePrivacyDlpV2TaggedField": { "description": "A column with a semantic tag attached.", "id": "GooglePrivacyDlpV2TaggedField", @@ -11532,7 +11601,7 @@ }, "timestampField": { "$ref": "GooglePrivacyDlpV2FieldId", - "description": "Specification of the field containing the timestamp of scanned items. Used for data sources like Datastore and BigQuery. *For BigQuery* If this value is not specified and the table was modified between the given start and end times, the entire table will be scanned. If this value is specified, then rows are filtered based on the given start and end times. Rows with a `NULL` value in the provided BigQuery column are skipped. Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and `DATETIME`. If your BigQuery table is [partitioned at ingestion time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), you can use any of the following pseudo-columns as your timestamp field. When used with Cloud DLP, these pseudo-column names are case sensitive. - _PARTITIONTIME - _PARTITIONDATE - _PARTITION_LOAD_TIME *For Datastore* If this value is specified, then entities are filtered based on the given start and end times. If an entity does not contain the provided timestamp property or contains empty or invalid values, then it is included. Valid data types of the provided timestamp property are: `TIMESTAMP`. See the [known issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan) related to this operation." + "description": "Specification of the field containing the timestamp of scanned items. Used for data sources like Datastore and BigQuery. **For BigQuery** If this value is not specified and the table was modified between the given start and end times, the entire table will be scanned. If this value is specified, then rows are filtered based on the given start and end times. Rows with a `NULL` value in the provided BigQuery column are skipped. Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, `TIMESTAMP`, and `DATETIME`. If your BigQuery table is [partitioned at ingestion time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), you can use any of the following pseudo-columns as your timestamp field. When used with Cloud DLP, these pseudo-column names are case sensitive. - `_PARTITIONTIME` - `_PARTITIONDATE` - `_PARTITION_LOAD_TIME` **For Datastore** If this value is specified, then entities are filtered based on the given start and end times. If an entity does not contain the provided timestamp property or contains empty or invalid values, then it is included. Valid data types of the provided timestamp property are: `TIMESTAMP`. See the [known issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan) related to this operation." } }, "type": "object" diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 09341ec9e22..5a4ffaebdae 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -2568,8 +2568,9 @@ type GooglePrivacyDlpV2CryptoReplaceFfxFpeConfig struct { // encryption/decryption. Each character listed must appear only once. Number // of characters must be in the range [2, 95]. This must be encoded as ASCII. // The order of characters does not matter. The full list of allowed characters - // is: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - // ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/ + // is: + // ``0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~`!@#$%^&*()_ + // -+={[}]|\:;"'<,>.?/`` CustomAlphabet string `json:"customAlphabet,omitempty"` // Radix: The native way to select the alphabet. Must be in the range [2, 95]. Radix int64 `json:"radix,omitempty"` @@ -2690,6 +2691,8 @@ type GooglePrivacyDlpV2DataProfileAction struct { ExportData *GooglePrivacyDlpV2Export `json:"exportData,omitempty"` // PubSubNotification: Publish a message into the Pub/Sub topic. PubSubNotification *GooglePrivacyDlpV2PubSubNotification `json:"pubSubNotification,omitempty"` + // TagResources: Tags the profiled resources with the specified tag values. + TagResources *GooglePrivacyDlpV2TagResources `json:"tagResources,omitempty"` // ForceSendFields is a list of field names (e.g. "ExportData") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3903,6 +3906,10 @@ func (s GooglePrivacyDlpV2DiscoveryCloudSqlFilter) MarshalJSON() ([]byte, error) // tables should have their profiles refreshed. New tables are scanned as // quickly as possible depending on system capacity. type GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence struct { + // InspectTemplateModifiedCadence: Governs when to update data profiles when + // the inspection rules defined by the `InspectTemplate` change. If not set, + // changing the template will not cause a data profile to update. + InspectTemplateModifiedCadence *GooglePrivacyDlpV2DiscoveryInspectTemplateModifiedCadence `json:"inspectTemplateModifiedCadence,omitempty"` // RefreshFrequency: Data changes (non-schema changes) in Cloud SQL tables // can't trigger reprofiling. If you set this field, profiles are refreshed at // this frequency regardless of whether the underlying tables have changed. @@ -3919,15 +3926,16 @@ type GooglePrivacyDlpV2DiscoveryCloudSqlGenerationCadence struct { RefreshFrequency string `json:"refreshFrequency,omitempty"` // SchemaModifiedCadence: When to reprofile if the schema has changed. SchemaModifiedCadence *GooglePrivacyDlpV2SchemaModifiedCadence `json:"schemaModifiedCadence,omitempty"` - // ForceSendFields is a list of field names (e.g. "RefreshFrequency") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. + // "InspectTemplateModifiedCadence") 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. "RefreshFrequency") 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. "InspectTemplateModifiedCadence") + // 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:"-"` } @@ -4787,10 +4795,12 @@ type GooglePrivacyDlpV2FileClusterSummary struct { // FileClusterType: The file cluster type. FileClusterType *GooglePrivacyDlpV2FileClusterType `json:"fileClusterType,omitempty"` // FileExtensionsScanned: A sample of file types scanned in this cluster. Empty - // if no files were scanned. + // if no files were scanned. File extensions can be derived from the file name + // or the file content. FileExtensionsScanned []*GooglePrivacyDlpV2FileExtensionInfo `json:"fileExtensionsScanned,omitempty"` // FileExtensionsSeen: A sample of file types seen in this cluster. Empty if no - // files were seen. + // files were seen. File extensions can be derived from the file name or the + // file content. FileExtensionsSeen []*GooglePrivacyDlpV2FileExtensionInfo `json:"fileExtensionsSeen,omitempty"` // FileStoreInfoTypeSummaries: InfoTypes detected in this cluster. FileStoreInfoTypeSummaries []*GooglePrivacyDlpV2FileStoreInfoTypeSummary `json:"fileStoreInfoTypeSummaries,omitempty"` @@ -9384,6 +9394,108 @@ func (s GooglePrivacyDlpV2TableReference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GooglePrivacyDlpV2TagCondition: The tag to attach to profiles matching the +// condition. At most one `TagCondition` can be specified per sensitivity +// level. +type GooglePrivacyDlpV2TagCondition struct { + // SensitivityScore: Conditions attaching the tag to a resource on its profile + // having this sensitivity score. + SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` + // Tag: The tag value to attach to resources. + Tag *GooglePrivacyDlpV2TagValue `json:"tag,omitempty"` + // ForceSendFields is a list of field names (e.g. "SensitivityScore") 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. "SensitivityScore") 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 GooglePrivacyDlpV2TagCondition) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TagCondition + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2TagResources: If set, attaches the [tags] +// (https://cloud.google.com/resource-manager/docs/tags/tags-overview) provided +// to profiled resources. Tags support access control +// (https://cloud.google.com/iam/docs/tags-access-control). You can +// conditionally grant or deny access to a resource based on whether the +// resource has a specific tag. +type GooglePrivacyDlpV2TagResources struct { + // LowerDataRiskToLow: Whether applying a tag to a resource should lower the + // risk of the profile for that resource. For example, in conjunction with an + // IAM deny policy (https://cloud.google.com/iam/docs/deny-overview), you can + // deny all principals a permission if a tag value is present, mitigating the + // risk of the resource. This also lowers the data risk of resources at the + // lower levels of the resource hierarchy. For example, reducing the data risk + // of a table data profile also reduces the data risk of the constituent column + // data profiles. + LowerDataRiskToLow bool `json:"lowerDataRiskToLow,omitempty"` + // ProfileGenerationsToTag: The profile generations for which the tag should be + // attached to resources. If you attach a tag to only new profiles, then if the + // sensitivity score of a profile subsequently changes, its tag doesn't change. + // By default, this field includes only new profiles. To include both new and + // updated profiles for tagging, this field should explicitly include both + // `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`. + // + // Possible values: + // "PROFILE_GENERATION_UNSPECIFIED" - Unused. + // "PROFILE_GENERATION_NEW" - The profile is the first profile for the + // resource. + // "PROFILE_GENERATION_UPDATE" - The profile is an update to a previous + // profile. + ProfileGenerationsToTag []string `json:"profileGenerationsToTag,omitempty"` + // TagConditions: The tags to associate with different conditions. + TagConditions []*GooglePrivacyDlpV2TagCondition `json:"tagConditions,omitempty"` + // ForceSendFields is a list of field names (e.g. "LowerDataRiskToLow") 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. "LowerDataRiskToLow") 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 GooglePrivacyDlpV2TagResources) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TagResources + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GooglePrivacyDlpV2TagValue: A value of a tag. +type GooglePrivacyDlpV2TagValue struct { + // NamespacedValue: The namespaced name for the tag value to attach to + // resources. Must be in the format + // `{parent_id}/{tag_key_short_name}/{short_name}`, for example, + // "123456/environment/prod". + NamespacedValue string `json:"namespacedValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "NamespacedValue") 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. "NamespacedValue") 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 GooglePrivacyDlpV2TagValue) MarshalJSON() ([]byte, error) { + type NoMethod GooglePrivacyDlpV2TagValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GooglePrivacyDlpV2TaggedField: A column with a semantic tag attached. type GooglePrivacyDlpV2TaggedField struct { // CustomTag: A column can be tagged with a custom tag. In this case, the user @@ -9503,8 +9615,8 @@ type GooglePrivacyDlpV2TimespanConfig struct { // no lower time limit is applied. StartTime string `json:"startTime,omitempty"` // TimestampField: Specification of the field containing the timestamp of - // scanned items. Used for data sources like Datastore and BigQuery. *For - // BigQuery* If this value is not specified and the table was modified between + // scanned items. Used for data sources like Datastore and BigQuery. **For + // BigQuery** If this value is not specified and the table was modified between // the given start and end times, the entire table will be scanned. If this // value is specified, then rows are filtered based on the given start and end // times. Rows with a `NULL` value in the provided BigQuery column are skipped. @@ -9514,11 +9626,12 @@ type GooglePrivacyDlpV2TimespanConfig struct { // (https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), // you can use any of the following pseudo-columns as your timestamp field. // When used with Cloud DLP, these pseudo-column names are case sensitive. - - // _PARTITIONTIME - _PARTITIONDATE - _PARTITION_LOAD_TIME *For Datastore* If - // this value is specified, then entities are filtered based on the given start - // and end times. If an entity does not contain the provided timestamp property - // or contains empty or invalid values, then it is included. Valid data types - // of the provided timestamp property are: `TIMESTAMP`. See the known issue + // `_PARTITIONTIME` - `_PARTITIONDATE` - `_PARTITION_LOAD_TIME` **For + // Datastore** If this value is specified, then entities are filtered based on + // the given start and end times. If an entity does not contain the provided + // timestamp property or contains empty or invalid values, then it is included. + // Valid data types of the provided timestamp property are: `TIMESTAMP`. See + // the known issue // (https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan) // related to this operation. TimestampField *GooglePrivacyDlpV2FieldId `json:"timestampField,omitempty"` @@ -10411,7 +10524,7 @@ func (c *InfoTypesListCall) LocationId(locationId string) *InfoTypesListCall { } // Parent sets the optional parameter "parent": The parent resource name. The -// format of this value is as follows: locations/ LOCATION_ID +// format of this value is as follows: `locations/{location_id}` func (c *InfoTypesListCall) Parent(parent string) *InfoTypesListCall { c.urlParams_.Set("parent", parent) return c @@ -10519,7 +10632,7 @@ type LocationsInfoTypesListCall struct { // to learn more. // // - parent: The parent resource name. The format of this value is as follows: -// locations/ LOCATION_ID. +// `locations/{location_id}`. func (r *LocationsInfoTypesService) List(parent string) *LocationsInfoTypesListCall { c := &LocationsInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -10656,11 +10769,12 @@ type OrganizationsDeidentifyTemplatesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -10985,11 +11099,12 @@ type OrganizationsDeidentifyTemplatesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -11270,11 +11385,12 @@ type OrganizationsInspectTemplatesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -11598,11 +11714,12 @@ type OrganizationsInspectTemplatesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -12172,8 +12289,8 @@ type OrganizationsLocationsConnectionsCreateCall struct { // // - parent: Parent resource name. The format of this value varies depending on // the scope of the request (project or organization): + Projects scope: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Organizations scope: -// `organizations/`ORG_ID`/locations/`LOCATION_ID. +// `projects/{project_id}/locations/{location_id}` + Organizations scope: +// `organizations/{org_id}/locations/{location_id}`. func (r *OrganizationsLocationsConnectionsService) Create(parent string, googleprivacydlpv2createconnectionrequest *GooglePrivacyDlpV2CreateConnectionRequest) *OrganizationsLocationsConnectionsCreateCall { c := &OrganizationsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -12898,11 +13015,12 @@ type OrganizationsLocationsDeidentifyTemplatesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -13227,11 +13345,12 @@ type OrganizationsLocationsDeidentifyTemplatesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -13507,8 +13626,8 @@ type OrganizationsLocationsDiscoveryConfigsCreateCall struct { // // - parent: Parent resource name. The format of this value varies depending on // the scope of the request (project or organization): + Projects scope: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Organizations scope: -// `organizations/`ORG_ID`/locations/`LOCATION_ID The following example +// `projects/{project_id}/locations/{location_id}` + Organizations scope: +// `organizations/{org_id}/locations/{location_id}` The following example // `parent` string specifies a parent project with the identifier // `example-project`, and specifies the `europe-west3` location for // processing data: parent=projects/example-project/locations/europe-west3. @@ -13820,7 +13939,7 @@ type OrganizationsLocationsDiscoveryConfigsListCall struct { // List: Lists discovery configurations. // // - parent: Parent resource name. The format of this value is as follows: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example +// `projects/{project_id}/locations/{location_id}` The following example // `parent` string specifies a parent project with the identifier // `example-project`, and specifies the `europe-west3` location for // processing data: parent=projects/example-project/locations/europe-west3. @@ -14089,11 +14208,12 @@ type OrganizationsLocationsDlpJobsListCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *OrganizationsLocationsDlpJobsService) List(parentid string) *OrganizationsLocationsDlpJobsListCall { c := &OrganizationsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -14513,9 +14633,12 @@ func (r *OrganizationsLocationsFileStoreDataProfilesService) List(parent string) // of restrictions implicitly uses `AND`. * A restriction has the form of // `{field} {operator} {value}`. * Supported fields/values: - `project_id` - // The Google Cloud project ID. - `file_store_path` - The path like -// "gs://bucket". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` -// - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - -// `status_code` - an RPC status code as defined in +// "gs://bucket". - `data_source_type` - The profile's data source type, like +// "google/storage/bucket". - `data_storage_location` - The location where the +// file store's data is stored, like "us-central1". - `sensitivity_level` - +// HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - +// `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status +// code as defined in // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * // The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND // status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * @@ -14689,11 +14812,12 @@ type OrganizationsLocationsInspectTemplatesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -15017,11 +15141,12 @@ type OrganizationsLocationsInspectTemplatesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -15301,11 +15426,12 @@ type OrganizationsLocationsJobTriggersCreateCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *OrganizationsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *OrganizationsLocationsJobTriggersCreateCall { c := &OrganizationsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -15623,11 +15749,12 @@ type OrganizationsLocationsJobTriggersListCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *OrganizationsLocationsJobTriggersService) List(parentid string) *OrganizationsLocationsJobTriggersListCall { c := &OrganizationsLocationsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -16221,11 +16348,12 @@ type OrganizationsLocationsStoredInfoTypesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -16549,11 +16677,12 @@ type OrganizationsLocationsStoredInfoTypesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *OrganizationsLocationsStoredInfoTypesService) List(parentid string) *OrganizationsLocationsStoredInfoTypesListCall { c := &OrganizationsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -17221,11 +17350,12 @@ type OrganizationsStoredInfoTypesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -17549,11 +17679,12 @@ type OrganizationsStoredInfoTypesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *OrganizationsStoredInfoTypesService) List(parentid string) *OrganizationsStoredInfoTypesListCall { c := &OrganizationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -17834,11 +17965,12 @@ type ProjectsContentDeidentifyCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsContentDeidentifyCall { c := &ProjectsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -17950,11 +18082,12 @@ type ProjectsContentInspectCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsContentInspectCall { c := &ProjectsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -18062,11 +18195,12 @@ type ProjectsContentReidentifyCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsContentReidentifyCall { c := &ProjectsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -18176,11 +18310,12 @@ type ProjectsDeidentifyTemplatesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -18505,11 +18640,12 @@ type ProjectsDeidentifyTemplatesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -18900,11 +19036,12 @@ type ProjectsDlpJobsCreateCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsDlpJobsCreateCall { c := &ProjectsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -19228,11 +19365,12 @@ type ProjectsDlpJobsListCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsDlpJobsService) List(parentid string) *ProjectsDlpJobsListCall { c := &ProjectsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -19439,11 +19577,12 @@ type ProjectsImageRedactCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsImageRedactCall { c := &ProjectsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -19553,11 +19692,12 @@ type ProjectsInspectTemplatesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -19881,11 +20021,12 @@ type ProjectsInspectTemplatesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -20269,11 +20410,12 @@ type ProjectsJobTriggersCreateCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsJobTriggersCreateCall { c := &ProjectsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -20591,11 +20733,12 @@ type ProjectsJobTriggersListCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsJobTriggersService) List(parentid string) *ProjectsJobTriggersListCall { c := &ProjectsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -21196,8 +21339,8 @@ type ProjectsLocationsConnectionsCreateCall struct { // // - parent: Parent resource name. The format of this value varies depending on // the scope of the request (project or organization): + Projects scope: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Organizations scope: -// `organizations/`ORG_ID`/locations/`LOCATION_ID. +// `projects/{project_id}/locations/{location_id}` + Organizations scope: +// `organizations/{org_id}/locations/{location_id}`. func (r *ProjectsLocationsConnectionsService) Create(parent string, googleprivacydlpv2createconnectionrequest *GooglePrivacyDlpV2CreateConnectionRequest) *ProjectsLocationsConnectionsCreateCall { c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -21924,11 +22067,12 @@ type ProjectsLocationsContentDeidentifyCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsContentService) Deidentify(parentid string, googleprivacydlpv2deidentifycontentrequest *GooglePrivacyDlpV2DeidentifyContentRequest) *ProjectsLocationsContentDeidentifyCall { c := &ProjectsLocationsContentDeidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -22040,11 +22184,12 @@ type ProjectsLocationsContentInspectCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsContentService) Inspect(parentid string, googleprivacydlpv2inspectcontentrequest *GooglePrivacyDlpV2InspectContentRequest) *ProjectsLocationsContentInspectCall { c := &ProjectsLocationsContentInspectCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -22152,11 +22297,12 @@ type ProjectsLocationsContentReidentifyCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsContentService) Reidentify(parentid string, googleprivacydlpv2reidentifycontentrequest *GooglePrivacyDlpV2ReidentifyContentRequest) *ProjectsLocationsContentReidentifyCall { c := &ProjectsLocationsContentReidentifyCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -22266,11 +22412,12 @@ type ProjectsLocationsDeidentifyTemplatesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -22595,11 +22742,12 @@ type ProjectsLocationsDeidentifyTemplatesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -22875,8 +23023,8 @@ type ProjectsLocationsDiscoveryConfigsCreateCall struct { // // - parent: Parent resource name. The format of this value varies depending on // the scope of the request (project or organization): + Projects scope: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID + Organizations scope: -// `organizations/`ORG_ID`/locations/`LOCATION_ID The following example +// `projects/{project_id}/locations/{location_id}` + Organizations scope: +// `organizations/{org_id}/locations/{location_id}` The following example // `parent` string specifies a parent project with the identifier // `example-project`, and specifies the `europe-west3` location for // processing data: parent=projects/example-project/locations/europe-west3. @@ -23188,7 +23336,7 @@ type ProjectsLocationsDiscoveryConfigsListCall struct { // List: Lists discovery configurations. // // - parent: Parent resource name. The format of this value is as follows: -// `projects/`PROJECT_ID`/locations/`LOCATION_ID The following example +// `projects/{project_id}/locations/{location_id}` The following example // `parent` string specifies a parent project with the identifier // `example-project`, and specifies the `europe-west3` location for // processing data: parent=projects/example-project/locations/europe-west3. @@ -23567,11 +23715,12 @@ type ProjectsLocationsDlpJobsCreateCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsDlpJobsService) Create(parentid string, googleprivacydlpv2createdlpjobrequest *GooglePrivacyDlpV2CreateDlpJobRequest) *ProjectsLocationsDlpJobsCreateCall { c := &ProjectsLocationsDlpJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -24102,11 +24251,12 @@ type ProjectsLocationsDlpJobsListCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsDlpJobsService) List(parentid string) *ProjectsLocationsDlpJobsListCall { c := &ProjectsLocationsDlpJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -24526,9 +24676,12 @@ func (r *ProjectsLocationsFileStoreDataProfilesService) List(parent string) *Pro // of restrictions implicitly uses `AND`. * A restriction has the form of // `{field} {operator} {value}`. * Supported fields/values: - `project_id` - // The Google Cloud project ID. - `file_store_path` - The path like -// "gs://bucket". - `sensitivity_level` - HIGH|MODERATE|LOW - `data_risk_level` -// - HIGH|MODERATE|LOW - `resource_visibility`: PUBLIC|RESTRICTED - -// `status_code` - an RPC status code as defined in +// "gs://bucket". - `data_source_type` - The profile's data source type, like +// "google/storage/bucket". - `data_storage_location` - The location where the +// file store's data is stored, like "us-central1". - `sensitivity_level` - +// HIGH|MODERATE|LOW - `data_risk_level` - HIGH|MODERATE|LOW - +// `resource_visibility`: PUBLIC|RESTRICTED - `status_code` - an RPC status +// code as defined in // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto * // The operator must be `=` or `!=`. Examples: * `project_id = 12345 AND // status_code = 1` * `project_id = 12345 AND sensitivity_level = HIGH` * @@ -24704,11 +24857,12 @@ type ProjectsLocationsImageRedactCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsImageService) Redact(parentid string, googleprivacydlpv2redactimagerequest *GooglePrivacyDlpV2RedactImageRequest) *ProjectsLocationsImageRedactCall { c := &ProjectsLocationsImageRedactCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -24818,11 +24972,12 @@ type ProjectsLocationsInspectTemplatesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -25146,11 +25301,12 @@ type ProjectsLocationsInspectTemplatesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -25534,11 +25690,12 @@ type ProjectsLocationsJobTriggersCreateCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsJobTriggersService) Create(parentid string, googleprivacydlpv2createjobtriggerrequest *GooglePrivacyDlpV2CreateJobTriggerRequest) *ProjectsLocationsJobTriggersCreateCall { c := &ProjectsLocationsJobTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -25961,11 +26118,12 @@ type ProjectsLocationsJobTriggersListCall struct { // - parent: Parent resource name. The format of this value varies depending on // whether you have specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsJobTriggersService) List(parentid string) *ProjectsLocationsJobTriggersListCall { c := &ProjectsLocationsJobTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -26559,11 +26717,12 @@ type ProjectsLocationsStoredInfoTypesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -26887,11 +27046,12 @@ type ProjectsLocationsStoredInfoTypesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsLocationsStoredInfoTypesService) List(parentid string) *ProjectsLocationsStoredInfoTypesListCall { c := &ProjectsLocationsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27559,11 +27719,12 @@ type ProjectsStoredInfoTypesCreateCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID + Organizations scope, location specified: -// `organizations/`ORG_ID`/locations/`LOCATION_ID + Organizations scope, no -// location specified (defaults to global): `organizations/`ORG_ID The +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` + +// Organizations scope, location specified: +// `organizations/{org_id}/locations/{location_id}` + Organizations scope, no +// location specified (defaults to global): `organizations/{org_id}` The // following example `parent` string specifies a parent project with the // identifier `example-project`, and specifies the `europe-west3` location // for processing data: @@ -27887,11 +28048,12 @@ type ProjectsStoredInfoTypesListCall struct { // the scope of the request (project or organization) and whether you have // specified a processing location // (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): -// - Projects scope, location specified: `projects/`PROJECT_ID`/locations/` -// LOCATION_ID + Projects scope, no location specified (defaults to global): -// `projects/`PROJECT_ID The following example `parent` string specifies a -// parent project with the identifier `example-project`, and specifies the -// `europe-west3` location for processing data: +// - Projects scope, location specified: +// `projects/{project_id}/locations/{location_id}` + Projects scope, no +// location specified (defaults to global): `projects/{project_id}` The +// following example `parent` string specifies a parent project with the +// identifier `example-project`, and specifies the `europe-west3` location +// for processing data: // parent=projects/example-project/locations/europe-west3. func (r *ProjectsStoredInfoTypesService) List(parentid string) *ProjectsStoredInfoTypesListCall { c := &ProjectsStoredInfoTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index b35165ed3eb..aaf83d7070d 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20240716", + "revision": "20240813", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -4471,6 +4471,10 @@ "$ref": "GoogleCloudDocumentaiV1GcsDocument", "description": "A raw document on Google Cloud Storage." }, + "imagelessMode": { + "description": "Optional. Option to remove images from the document.", + "type": "boolean" + }, "inlineDocument": { "$ref": "GoogleCloudDocumentaiV1Document", "description": "An inline document proto." diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index d942a0a2fe8..46af4f9b57f 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -4839,6 +4839,8 @@ type GoogleCloudDocumentaiV1ProcessRequest struct { FieldMask string `json:"fieldMask,omitempty"` // GcsDocument: A raw document on Google Cloud Storage. GcsDocument *GoogleCloudDocumentaiV1GcsDocument `json:"gcsDocument,omitempty"` + // ImagelessMode: Optional. Option to remove images from the document. + ImagelessMode bool `json:"imagelessMode,omitempty"` // InlineDocument: An inline document proto. InlineDocument *GoogleCloudDocumentaiV1Document `json:"inlineDocument,omitempty"` // Labels: Optional. The labels with user-defined metadata for the request. diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 2f94a28dca8..90f48fb6a5f 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1284,7 +1284,7 @@ } } }, - "revision": "20240716", + "revision": "20240813", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -9073,6 +9073,10 @@ "$ref": "GoogleCloudDocumentaiV1beta3GcsDocument", "description": "A raw document on Google Cloud Storage." }, + "imagelessMode": { + "description": "Optional. Option to remove images from the document.", + "type": "boolean" + }, "inlineDocument": { "$ref": "GoogleCloudDocumentaiV1beta3Document", "description": "An inline document proto." diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index d43435983d5..dac275c3bc6 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -10565,6 +10565,8 @@ type GoogleCloudDocumentaiV1beta3ProcessRequest struct { FieldMask string `json:"fieldMask,omitempty"` // GcsDocument: A raw document on Google Cloud Storage. GcsDocument *GoogleCloudDocumentaiV1beta3GcsDocument `json:"gcsDocument,omitempty"` + // ImagelessMode: Optional. Option to remove images from the document. + ImagelessMode bool `json:"imagelessMode,omitempty"` // InlineDocument: An inline document proto. InlineDocument *GoogleCloudDocumentaiV1beta3Document `json:"inlineDocument,omitempty"` // Labels: Optional. The labels with user-defined metadata for the request. diff --git a/drive/v2/drive-api.json b/drive/v2/drive-api.json index d4542a7873e..137b4ec21ad 100644 --- a/drive/v2/drive-api.json +++ b/drive/v2/drive-api.json @@ -3869,7 +3869,7 @@ } } }, - "revision": "20240730", + "revision": "20240809", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -5469,7 +5469,7 @@ }, "lastModifyingUser": { "$ref": "User", - "description": "Output only. The last user to modify this file." + "description": "Output only. The last user to modify this file. This field is only populated when the last modification was performed by a signed-in user." }, "lastModifyingUserName": { "description": "Output only. Name of the last user to modify this file.", @@ -5547,7 +5547,7 @@ "type": "array" }, "parents": { - "description": "Collection of parent folders which contain this file. If not specified as part of an insert request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests can also use the `addParents` and `removeParents` parameters to modify the parents list.", + "description": "The ID of the parent folder containing the file. A file can only have one parent folder; specifying multiple parents isn't supported. If not specified as part of an insert request, the file is placed directly in the user's My Drive folder. If not specified as part of a copy request, the file inherits any discoverable parent of the source file. Update requests must use the `addParents` and `removeParents` parameters to modify the parents list.", "items": { "$ref": "ParentReference" }, @@ -6049,7 +6049,7 @@ "type": "object" }, "ParentReference": { - "description": "A reference to a file's parent. Some resource methods (such as `parents.get`) require a `parentId`. Use the `parents.list` method to retrieve the ID for a parent.", + "description": "A reference to a file's parent. A file can only have one parent folder; specifying multiple parents isn't supported. Some resource methods (such as `parents.get`) require a `parentId`. Use the `parents.list` method to retrieve the ID for a parent.", "id": "ParentReference", "properties": { "id": { @@ -6394,7 +6394,7 @@ }, "lastModifyingUser": { "$ref": "User", - "description": "Output only. The last user to modify this revision." + "description": "Output only. The last user to modify this revision. This field is only populated when the last modification was performed by a signed-in user." }, "lastModifyingUserName": { "description": "Output only. Name of the last user to modify this revision.", diff --git a/drive/v2/drive-gen.go b/drive/v2/drive-gen.go index 8ed6e50e3fb..aa0ea731906 100644 --- a/drive/v2/drive-gen.go +++ b/drive/v2/drive-gen.go @@ -1697,7 +1697,9 @@ type File struct { LabelInfo *FileLabelInfo `json:"labelInfo,omitempty"` // Labels: A group of labels for the file. Labels *FileLabels `json:"labels,omitempty"` - // LastModifyingUser: Output only. The last user to modify this file. + // LastModifyingUser: Output only. The last user to modify this file. This + // field is only populated when the last modification was performed by a + // signed-in user. LastModifyingUser *User `json:"lastModifyingUser,omitempty"` // LastModifyingUserName: Output only. Name of the last user to modify this // file. @@ -1744,12 +1746,13 @@ type File struct { // have more than one owner. This field isn't populated for items in shared // drives. Owners []*User `json:"owners,omitempty"` - // Parents: Collection of parent folders which contain this file. If not - // specified as part of an insert request, the file will be placed directly in - // the user's My Drive folder. If not specified as part of a copy request, the - // file will inherit any discoverable parents of the source file. Update - // requests can also use the `addParents` and `removeParents` parameters to - // modify the parents list. + // Parents: The ID of the parent folder containing the file. A file can only + // have one parent folder; specifying multiple parents isn't supported. If not + // specified as part of an insert request, the file is placed directly in the + // user's My Drive folder. If not specified as part of a copy request, the file + // inherits any discoverable parent of the source file. Update requests must + // use the `addParents` and `removeParents` parameters to modify the parents + // list. Parents []*ParentReference `json:"parents,omitempty"` // PermissionIds: Output only. List of permission IDs for users with access to // this file. @@ -2677,9 +2680,10 @@ func (s ParentList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ParentReference: A reference to a file's parent. Some resource methods (such -// as `parents.get`) require a `parentId`. Use the `parents.list` method to -// retrieve the ID for a parent. +// ParentReference: A reference to a file's parent. A file can only have one +// parent folder; specifying multiple parents isn't supported. Some resource +// methods (such as `parents.get`) require a `parentId`. Use the `parents.list` +// method to retrieve the ID for a parent. type ParentReference struct { // Id: The ID of the parent. Id string `json:"id,omitempty"` @@ -3035,7 +3039,9 @@ type Revision struct { Id string `json:"id,omitempty"` // Kind: Output only. This is always `drive#revision`. Kind string `json:"kind,omitempty"` - // LastModifyingUser: Output only. The last user to modify this revision. + // LastModifyingUser: Output only. The last user to modify this revision. This + // field is only populated when the last modification was performed by a + // signed-in user. LastModifyingUser *User `json:"lastModifyingUser,omitempty"` // LastModifyingUserName: Output only. Name of the last user to modify this // revision. diff --git a/drive/v3/drive-api.json b/drive/v3/drive-api.json index 609829fe586..703e7117889 100644 --- a/drive/v3/drive-api.json +++ b/drive/v3/drive-api.json @@ -2523,7 +2523,7 @@ } } }, - "revision": "20240730", + "revision": "20240809", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -3735,7 +3735,7 @@ }, "lastModifyingUser": { "$ref": "User", - "description": "Output only. The last user to modify the file." + "description": "Output only. The last user to modify the file. This field is only populated when the last modification was performed by a signed-in user." }, "linkShareMetadata": { "description": "Contains details about the link URLs that clients are using to refer to this item.", @@ -3793,7 +3793,7 @@ "type": "array" }, "parents": { - "description": "The IDs of the parent folders which contain the file. If not specified as part of a create request, the file is placed directly in the user's My Drive folder. If not specified as part of a copy request, the file inherits any discoverable parents of the source file. Update requests must use the `addParents` and `removeParents` parameters to modify the parents list.", + "description": "The ID of the parent folder containing the file. A file can only have one parent folder; specifying multiple parents isn't supported. If not specified as part of a create request, the file is placed directly in the user's My Drive folder. If not specified as part of a copy request, the file inherits any discoverable parent of the source file. Update requests must use the `addParents` and `removeParents` parameters to modify the parents list.", "items": { "type": "string" }, @@ -4494,7 +4494,7 @@ }, "lastModifyingUser": { "$ref": "User", - "description": "Output only. The last user to modify this revision." + "description": "Output only. The last user to modify this revision. This field is only populated when the last modification was performed by a signed-in user." }, "md5Checksum": { "description": "Output only. The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.", diff --git a/drive/v3/drive-gen.go b/drive/v3/drive-gen.go index 3f4042bf8a1..5a35b65a854 100644 --- a/drive/v3/drive-gen.go +++ b/drive/v3/drive-gen.go @@ -1286,7 +1286,9 @@ type File struct { Kind string `json:"kind,omitempty"` // LabelInfo: Output only. An overview of the labels on the file. LabelInfo *FileLabelInfo `json:"labelInfo,omitempty"` - // LastModifyingUser: Output only. The last user to modify the file. + // LastModifyingUser: Output only. The last user to modify the file. This field + // is only populated when the last modification was performed by a signed-in + // user. LastModifyingUser *User `json:"lastModifyingUser,omitempty"` // LinkShareMetadata: Contains details about the link URLs that clients are // using to refer to this item. @@ -1325,10 +1327,11 @@ type File struct { // have more than one owner. This field isn't populated for items in shared // drives. Owners []*User `json:"owners,omitempty"` - // Parents: The IDs of the parent folders which contain the file. If not + // Parents: The ID of the parent folder containing the file. A file can only + // have one parent folder; specifying multiple parents isn't supported. If not // specified as part of a create request, the file is placed directly in the // user's My Drive folder. If not specified as part of a copy request, the file - // inherits any discoverable parents of the source file. Update requests must + // inherits any discoverable parent of the source file. Update requests must // use the `addParents` and `removeParents` parameters to modify the parents // list. Parents []string `json:"parents,omitempty"` @@ -2487,7 +2490,9 @@ type Revision struct { // Kind: Output only. Identifies what kind of resource this is. Value: the // fixed string "drive#revision". Kind string `json:"kind,omitempty"` - // LastModifyingUser: Output only. The last user to modify this revision. + // LastModifyingUser: Output only. The last user to modify this revision. This + // field is only populated when the last modification was performed by a + // signed-in user. LastModifyingUser *User `json:"lastModifyingUser,omitempty"` // Md5Checksum: Output only. The MD5 checksum of the revision's content. This // is only applicable to files with binary content in Drive. diff --git a/firebasedynamiclinks/v1/firebasedynamiclinks-api.json b/firebasedynamiclinks/v1/firebasedynamiclinks-api.json index 20fa37dc523..fbb46feb7dd 100644 --- a/firebasedynamiclinks/v1/firebasedynamiclinks-api.json +++ b/firebasedynamiclinks/v1/firebasedynamiclinks-api.json @@ -224,7 +224,7 @@ } } }, - "revision": "20231107", + "revision": "20240821", "rootUrl": "https://firebasedynamiclinks.googleapis.com/", "schemas": { "AnalyticsInfo": { @@ -520,6 +520,13 @@ "$ref": "DynamicLinkEventStat" }, "type": "array" + }, + "warnings": { + "description": "Optional warnings associated this API request.", + "items": { + "$ref": "DynamicLinkWarning" + }, + "type": "array" } }, "type": "object" @@ -559,7 +566,8 @@ "BAD_URI_SCHEME_SOCIAL_URL", "LINK_LENGTH_TOO_LONG", "LINK_WITH_FRAGMENTS", - "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" + "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID", + "API_DEPRECATED" ], "enumDescriptions": [ "Unknown code.", @@ -582,15 +590,16 @@ "Debug param format is incorrect.", "isAd param format is incorrect.", "Indicates a certain param is deprecated.", - "Indicates certain paramater is not recognized.", - "Indicates certain paramater is too long.", + "Indicates certain parameter is not recognized.", + "Indicates certain parameter is too long.", "Social meta tag image link is not a valid URI.", "Social meta tag image link has an invalid (non http/https) URI scheme.", "", "", "Dynamic Link URL length is too long.", "Dynamic Link URL contains fragments.", - "The iOS bundle ID does not match with the given iOS store ID." + "The iOS bundle ID does not match with the given iOS store ID.", + "The API is deprecated." ], "type": "string" }, @@ -818,6 +827,13 @@ "utmTerm": { "description": "Scion term value to be propagated by iSDK to Scion at app-reopen.", "type": "string" + }, + "warning": { + "description": "Optional warnings associated this API request.", + "items": { + "$ref": "DynamicLinkWarning" + }, + "type": "array" } }, "type": "object" @@ -930,7 +946,7 @@ ], "enumDescriptions": [ "Indicates that no attributes were found for this short url.", - "Indicates that short url has been flagged by AbuseIAm team as spam." + "Indicates that short url has been flagged as spam." ], "type": "string" }, diff --git a/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go b/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go index 0e803d2e5ce..38429447bd0 100644 --- a/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go +++ b/firebasedynamiclinks/v1/firebasedynamiclinks-gen.go @@ -544,6 +544,8 @@ func (s DynamicLinkInfo) MarshalJSON() ([]byte, error) { type DynamicLinkStats struct { // LinkEventStats: Dynamic Link event stats. LinkEventStats []*DynamicLinkEventStat `json:"linkEventStats,omitempty"` + // Warnings: Optional warnings associated this API request. + Warnings []*DynamicLinkWarning `json:"warnings,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -602,8 +604,8 @@ type DynamicLinkWarning struct { // "BAD_DEBUG_PARAM" - Debug param format is incorrect. // "BAD_AD_PARAM" - isAd param format is incorrect. // "DEPRECATED_PARAM" - Indicates a certain param is deprecated. - // "UNRECOGNIZED_PARAM" - Indicates certain paramater is not recognized. - // "TOO_LONG_PARAM" - Indicates certain paramater is too long. + // "UNRECOGNIZED_PARAM" - Indicates certain parameter is not recognized. + // "TOO_LONG_PARAM" - Indicates certain parameter is too long. // "NOT_URI_SOCIAL_IMAGE_LINK" - Social meta tag image link is not a valid // URI. // "BAD_URI_SCHEME_SOCIAL_IMAGE_LINK" - Social meta tag image link has an @@ -614,6 +616,7 @@ type DynamicLinkWarning struct { // "LINK_WITH_FRAGMENTS" - Dynamic Link URL contains fragments. // "NOT_MATCHING_IOS_BUNDLE_ID_AND_STORE_ID" - The iOS bundle ID does not // match with the given iOS store ID. + // "API_DEPRECATED" - The API is deprecated. WarningCode string `json:"warningCode,omitempty"` // WarningDocumentLink: The document describing the warning, and helps resolve. WarningDocumentLink string `json:"warningDocumentLink,omitempty"` @@ -853,6 +856,8 @@ type GetIosReopenAttributionResponse struct { UtmSource string `json:"utmSource,omitempty"` // UtmTerm: Scion term value to be propagated by iSDK to Scion at app-reopen. UtmTerm string `json:"utmTerm,omitempty"` + // Warning: Optional warnings associated this API request. + Warning []*DynamicLinkWarning `json:"warning,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -989,8 +994,7 @@ type ManagedShortLink struct { // Possible values: // "UNSPECIFIED_ATTRIBUTE" - Indicates that no attributes were found for this // short url. - // "SPAM" - Indicates that short url has been flagged by AbuseIAm team as - // spam. + // "SPAM" - Indicates that short url has been flagged as spam. FlaggedAttribute []string `json:"flaggedAttribute,omitempty"` // Info: Full Dyamic Link info Info *DynamicLinkInfo `json:"info,omitempty"` diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index f33346d3a6c..2cd463a3edf 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240808", + "revision": "20240821", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -290,7 +290,7 @@ "The finish reason is unspecified.", "Token generation reached a natural stopping point or a configured stop sequence.", "Token generation reached the configured maximum output tokens.", - "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, Candidate.content is empty if content filters blocks the output.", + "Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, content is empty if content filters blocks the output.", "Token generation stopped because the content potentially contains copyright violations.", "All other reasons that stopped the token generation.", "Token generation stopped because the content contains forbidden terms.", @@ -503,9 +503,9 @@ ], "enumDescriptions": [ "Unspecified function calling mode. This value should not be used.", - "Default model behavior, model decides to predict either a function call or a natural language response.", - "Model is constrained to always predicting a function call only. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\".", - "Model will not predict any function call. Model behavior is same as when not passing any function declarations." + "Default model behavior, model decides to predict either function calls or natural language response.", + "Model is constrained to always predicting function calls only. If \"allowed_function_names\" are set, the predicted function calls will be limited to any one of \"allowed_function_names\", else the predicted function calls will be any one of the provided \"function_declarations\".", + "Model will not predict any function calls. Model behavior is same as when not passing any function declarations." ], "type": "string" } @@ -548,7 +548,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Required. The function response in JSON object format.", + "description": "Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output.", "type": "object" } }, @@ -665,6 +665,12 @@ "description": "Usage metadata about response(s).", "id": "GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata", "properties": { + "cachedContentTokenCount": { + "description": "Output only. Number of tokens in the cached part in the input (the cached content).", + "format": "int32", + "readOnly": true, + "type": "integer" + }, "candidatesTokenCount": { "description": "Number of tokens in the response(s).", "format": "int32", @@ -676,6 +682,7 @@ "type": "integer" }, "totalTokenCount": { + "description": "Total token count for prompt and response candidates.", "format": "int32", "type": "integer" } @@ -1104,7 +1111,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1Schema": { - "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed.", + "description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may be added in the future as needed.", "id": "GoogleCloudAiplatformV1beta1Schema", "properties": { "default": { @@ -1305,11 +1312,11 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1VertexAISearch": { - "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/vertex-ai-search-and-conversation", + "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder", "id": "GoogleCloudAiplatformV1beta1VertexAISearch", "properties": { "datastore": { - "description": "Required. Fully-qualified Vertex AI Search's datastore resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", + "description": "Required. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`", "type": "string" } }, diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index 0495747aa68..b00236e16c4 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -284,8 +284,8 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // "MAX_TOKENS" - Token generation reached the configured maximum output // tokens. // "SAFETY" - Token generation stopped because the content potentially - // contains safety violations. NOTE: When streaming, Candidate.content is empty - // if content filters blocks the output. + // contains safety violations. NOTE: When streaming, content is empty if + // content filters blocks the output. // "RECITATION" - Token generation stopped because the content potentially // contains copyright violations. // "OTHER" - All other reasons that stopped the token generation. @@ -557,13 +557,13 @@ type GoogleCloudAiplatformV1beta1FunctionCallingConfig struct { // Possible values: // "MODE_UNSPECIFIED" - Unspecified function calling mode. This value should // not be used. - // "AUTO" - Default model behavior, model decides to predict either a - // function call or a natural language response. - // "ANY" - Model is constrained to always predicting a function call only. If - // "allowed_function_names" are set, the predicted function call will be + // "AUTO" - Default model behavior, model decides to predict either function + // calls or natural language response. + // "ANY" - Model is constrained to always predicting function calls only. If + // "allowed_function_names" are set, the predicted function calls will be // limited to any one of "allowed_function_names", else the predicted function - // call will be any one of the provided "function_declarations". - // "NONE" - Model will not predict any function call. Model behavior is same + // calls will be any one of the provided "function_declarations". + // "NONE" - Model will not predict any function calls. Model behavior is same // as when not passing any function declarations. Mode string `json:"mode,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowedFunctionNames") to @@ -639,7 +639,10 @@ type GoogleCloudAiplatformV1beta1FunctionResponse struct { // Name: Required. The name of the function to call. Matches // [FunctionDeclaration.name] and [FunctionCall.name]. Name string `json:"name,omitempty"` - // Response: Required. The function response in JSON object format. + // Response: Required. The function response in JSON object format. Use + // "output" key to specify function output and "error" key to specify error + // details (if any). If "output" and "error" keys are not specified, then whole + // "response" is treated as function output. Response googleapi.RawMessage `json:"response,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -778,22 +781,26 @@ func (s GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback) Marsh // GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata: Usage // metadata about response(s). type GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata struct { + // CachedContentTokenCount: Output only. Number of tokens in the cached part in + // the input (the cached content). + CachedContentTokenCount int64 `json:"cachedContentTokenCount,omitempty"` // CandidatesTokenCount: Number of tokens in the response(s). CandidatesTokenCount int64 `json:"candidatesTokenCount,omitempty"` // PromptTokenCount: Number of tokens in the request. When `cached_content` is // set, this is still the total effective prompt size meaning this includes the // number of tokens in the cached content. PromptTokenCount int64 `json:"promptTokenCount,omitempty"` - TotalTokenCount int64 `json:"totalTokenCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "CandidatesTokenCount") to + // TotalTokenCount: Total token count for prompt and response candidates. + TotalTokenCount int64 `json:"totalTokenCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "CachedContentTokenCount") 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. "CandidatesTokenCount") 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. "CachedContentTokenCount") 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:"-"` } @@ -1316,8 +1323,8 @@ func (s GoogleCloudAiplatformV1beta1SafetySetting) MarshalJSON() ([]byte, error) // GoogleCloudAiplatformV1beta1Schema: Schema is used to define the format of // input/output data. Represents a select subset of an OpenAPI 3.0 schema -// object (https://spec.openapis.org/oas/v3.0.3#schema). More fields may be -// added in the future as needed. +// object (https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may +// be added in the future as needed. type GoogleCloudAiplatformV1beta1Schema struct { // Default: Optional. Default value of the data. Default interface{} `json:"default,omitempty"` @@ -1532,10 +1539,9 @@ func (s GoogleCloudAiplatformV1beta1ToolConfig) MarshalJSON() ([]byte, error) { } // GoogleCloudAiplatformV1beta1VertexAISearch: Retrieve from Vertex AI Search -// datastore for grounding. See -// https://cloud.google.com/vertex-ai-search-and-conversation +// datastore for grounding. See https://cloud.google.com/products/agent-builder type GoogleCloudAiplatformV1beta1VertexAISearch struct { - // Datastore: Required. Fully-qualified Vertex AI Search's datastore resource + // Datastore: Required. Fully-qualified Vertex AI Search data store resource // ID. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ // {dataStore}` diff --git a/gkehub/v1/gkehub-api.json b/gkehub/v1/gkehub-api.json index 95f38398cf2..e19ed30457e 100644 --- a/gkehub/v1/gkehub-api.json +++ b/gkehub/v1/gkehub-api.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240727", + "revision": "20240815", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AppDevExperienceFeatureSpec": { @@ -2520,7 +2520,7 @@ "type": "object" }, "CommonFeatureSpec": { - "description": "CommonFeatureSpec contains Hub-wide configuration information", + "description": "CommonFeatureSpec contains Fleet-wide configuration information", "id": "CommonFeatureSpec", "properties": { "appdevexperience": { @@ -2547,7 +2547,7 @@ "type": "object" }, "CommonFeatureState": { - "description": "CommonFeatureState contains Hub-wide Feature status information.", + "description": "CommonFeatureState contains Fleet-wide Feature status information.", "id": "CommonFeatureState", "properties": { "appdevexperience": { @@ -2564,7 +2564,7 @@ }, "state": { "$ref": "FeatureState", - "description": "Output only. The \"running state\" of the Feature in this Hub.", + "description": "Output only. The \"running state\" of the Feature in this Fleet.", "readOnly": true } }, @@ -2593,6 +2593,44 @@ }, "type": "object" }, + "CompliancePostureConfig": { + "description": "CompliancePostureConfig defines the settings needed to enable/disable features for the Compliance Posture.", + "id": "CompliancePostureConfig", + "properties": { + "complianceStandards": { + "description": "List of enabled compliance standards.", + "items": { + "$ref": "ComplianceStandard" + }, + "type": "array" + }, + "mode": { + "description": "Defines the enablement mode for Compliance Posture.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value not specified.", + "Disables Compliance Posture features on the cluster.", + "Enables Compliance Posture features on the cluster." + ], + "type": "string" + } + }, + "type": "object" + }, + "ComplianceStandard": { + "id": "ComplianceStandard", + "properties": { + "standard": { + "description": "Name of the compliance standard.", + "type": "string" + } + }, + "type": "object" + }, "ConfigManagementConfigSync": { "description": "Configuration for Config Sync", "id": "ConfigManagementConfigSync", @@ -3192,7 +3230,7 @@ }, "hierarchyController": { "$ref": "ConfigManagementHierarchyControllerConfig", - "description": "Hierarchy Controller configuration for the cluster." + "description": "Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead." }, "management": { "description": "Enables automatic Feature management.", @@ -3559,6 +3597,10 @@ "$ref": "BinaryAuthorizationConfig", "description": "Optional. Enable/Disable binary authorization features for the cluster." }, + "compliancePostureConfig": { + "$ref": "CompliancePostureConfig", + "description": "Optional. Enable/Disable Compliance Posture features for the cluster. Note that on UpdateFleet, only full replacement of this field is allowed. Users are not allowed for partial updates through field mask." + }, "securityPostureConfig": { "$ref": "SecurityPostureConfig", "description": "Enable/Disable Security Posture features for the cluster." @@ -3607,7 +3649,7 @@ "type": "object" }, "Feature": { - "description": "Feature represents the settings and status of any Hub Feature.", + "description": "Feature represents the settings and status of any Fleet Feature.", "id": "Feature", "properties": { "createTime": { @@ -3675,11 +3717,11 @@ }, "spec": { "$ref": "CommonFeatureSpec", - "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + "description": "Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused." }, "state": { "$ref": "CommonFeatureState", - "description": "Output only. The Hub-wide Feature state.", + "description": "Output only. The Fleet-wide Feature state.", "readOnly": true }, "unreachable": { @@ -3700,7 +3742,7 @@ "type": "object" }, "FeatureResourceState": { - "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Fleet and across Memberships.", "id": "FeatureResourceState", "properties": { "state": { @@ -3715,9 +3757,9 @@ ], "enumDescriptions": [ "State is unknown or not set.", - "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", - "The Feature is enabled in this Hub, and the Feature resource is fully available.", - "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Fleet.", + "The Feature is enabled in this Fleet, and the Feature resource is fully available.", + "The Feature is being disabled in this Fleet, and the Feature resource is being deleted.", "The Feature resource is being updated.", "The Feature resource is being updated by the Hub Service." ], @@ -4965,7 +5007,7 @@ "type": "object" }, "MembershipFeatureSpec": { - "description": "MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name.", + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", "id": "MembershipFeatureSpec", "properties": { "configmanagement": { @@ -6032,6 +6074,7 @@ "enum": [ "CODE_UNSPECIFIED", "MESH_IAM_PERMISSION_DENIED", + "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED", "CNI_CONFIG_UNSUPPORTED", "GKE_SANDBOX_UNSUPPORTED", "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", @@ -6061,6 +6104,7 @@ "enumDescriptions": [ "Default Unspecified code", "Mesh IAM permission denied error code", + "Permission denied error code for cross-project", "CNI config unsupported error code", "GKE sandbox unsupported error code", "Nodepool workload identity federation required error code", diff --git a/gkehub/v1/gkehub-gen.go b/gkehub/v1/gkehub-gen.go index 50024af0dc1..3ac963f76b0 100644 --- a/gkehub/v1/gkehub-gen.go +++ b/gkehub/v1/gkehub-gen.go @@ -973,7 +973,7 @@ func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureSpec: CommonFeatureSpec contains Hub-wide configuration +// CommonFeatureSpec: CommonFeatureSpec contains Fleet-wide configuration // information type CommonFeatureSpec struct { // Appdevexperience: Appdevexperience specific spec. @@ -1004,7 +1004,7 @@ func (s CommonFeatureSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureState: CommonFeatureState contains Hub-wide Feature status +// CommonFeatureState: CommonFeatureState contains Fleet-wide Feature status // information. type CommonFeatureState struct { // Appdevexperience: Appdevexperience specific state. @@ -1013,7 +1013,7 @@ type CommonFeatureState struct { Clusterupgrade *ClusterUpgradeFleetState `json:"clusterupgrade,omitempty"` // Fleetobservability: FleetObservability feature state. Fleetobservability *FleetObservabilityFeatureState `json:"fleetobservability,omitempty"` - // State: Output only. The "running state" of the Feature in this Hub. + // State: Output only. The "running state" of the Feature in this Fleet. State *FeatureState `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "Appdevexperience") to // unconditionally include in API requests. By default, fields with empty or @@ -1062,6 +1062,57 @@ func (s CommonFleetDefaultMemberConfigSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CompliancePostureConfig: CompliancePostureConfig defines the settings needed +// to enable/disable features for the Compliance Posture. +type CompliancePostureConfig struct { + // ComplianceStandards: List of enabled compliance standards. + ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"` + // Mode: Defines the enablement mode for Compliance Posture. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value not specified. + // "DISABLED" - Disables Compliance Posture features on the cluster. + // "ENABLED" - Enables Compliance Posture features on the cluster. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComplianceStandards") 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. "ComplianceStandards") 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 CompliancePostureConfig) MarshalJSON() ([]byte, error) { + type NoMethod CompliancePostureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ComplianceStandard struct { + // Standard: Name of the compliance standard. + Standard string `json:"standard,omitempty"` + // ForceSendFields is a list of field names (e.g. "Standard") 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. "Standard") 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 ComplianceStandard) MarshalJSON() ([]byte, error) { + type NoMethod ComplianceStandard + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConfigManagementConfigSync: Configuration for Config Sync type ConfigManagementConfigSync struct { // AllowVerticalScale: Set to true to allow the vertical scaling. Defaults to @@ -1634,6 +1685,9 @@ type ConfigManagementMembershipSpec struct { // ConfigSync: Config Sync configuration for the cluster. ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"` // HierarchyController: Hierarchy Controller configuration for the cluster. + // Deprecated: Configuring Hierarchy Controller through the configmanagement + // feature is no longer recommended. Use + // https://github.com/kubernetes-sigs/hierarchical-namespaces instead. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` // Management: Enables automatic Feature management. // @@ -2059,6 +2113,11 @@ type DefaultClusterConfig struct { // BinaryAuthorizationConfig: Optional. Enable/Disable binary authorization // features for the cluster. BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"` + // CompliancePostureConfig: Optional. Enable/Disable Compliance Posture + // features for the cluster. Note that on UpdateFleet, only full replacement of + // this field is allowed. Users are not allowed for partial updates through + // field mask. + CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"` // SecurityPostureConfig: Enable/Disable Security Posture features for the // cluster. SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` @@ -2163,7 +2222,7 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Feature: Feature represents the settings and status of any Hub Feature. +// Feature: Feature represents the settings and status of any Fleet Feature. type Feature struct { // CreateTime: Output only. When the Feature resource was created. CreateTime string `json:"createTime,omitempty"` @@ -2217,10 +2276,10 @@ type Feature struct { // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is // a valid Scope in this project. {p} WILL match the Feature's project. ScopeStates map[string]ScopeFeatureState `json:"scopeStates,omitempty"` - // Spec: Optional. Hub-wide Feature configuration. If this Feature does not - // support any Hub-wide configuration, this field may be unused. + // Spec: Optional. Fleet-wide Feature configuration. If this Feature does not + // support any Fleet-wide configuration, this field may be unused. Spec *CommonFeatureSpec `json:"spec,omitempty"` - // State: Output only. The Hub-wide Feature state. + // State: Output only. The Fleet-wide Feature state. State *CommonFeatureState `json:"state,omitempty"` // Unreachable: Output only. List of locations that could not be reached while // fetching this feature. @@ -2250,7 +2309,7 @@ func (s Feature) MarshalJSON() ([]byte, error) { // FeatureResourceState: FeatureResourceState describes the state of a Feature // *resource* in the GkeHub API. See `FeatureState` for the "running state" of -// the Feature in the Hub and across Memberships. +// the Feature in the Fleet and across Memberships. type FeatureResourceState struct { // State: The current state of the Feature resource in the Hub API. // @@ -2258,10 +2317,10 @@ type FeatureResourceState struct { // "STATE_UNSPECIFIED" - State is unknown or not set. // "ENABLING" - The Feature is being enabled, and the Feature resource is // being created. Once complete, the corresponding Feature will be enabled in - // this Hub. - // "ACTIVE" - The Feature is enabled in this Hub, and the Feature resource is - // fully available. - // "DISABLING" - The Feature is being disabled in this Hub, and the Feature + // this Fleet. + // "ACTIVE" - The Feature is enabled in this Fleet, and the Feature resource + // is fully available. + // "DISABLING" - The Feature is being disabled in this Fleet, and the Feature // resource is being deleted. // "UPDATING" - The Feature resource is being updated. // "SERVICE_UPDATING" - The Feature resource is being updated by the Hub @@ -3905,8 +3964,7 @@ func (s MembershipEndpoint) MarshalJSON() ([]byte, error) { } // MembershipFeatureSpec: MembershipFeatureSpec contains configuration -// information for a single Membership. NOTE: Please use snake case in your -// feature name. +// information for a single Membership. type MembershipFeatureSpec struct { // Configmanagement: Config Management-specific spec. Configmanagement *ConfigManagementMembershipSpec `json:"configmanagement,omitempty"` @@ -5263,6 +5321,8 @@ type ServiceMeshCondition struct { // Possible values: // "CODE_UNSPECIFIED" - Default Unspecified code // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code + // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code + // for cross-project // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index e0663e2dbc7..bdaeb7199a3 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -2185,7 +2185,7 @@ } } }, - "revision": "20240727", + "revision": "20240815", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2720,7 +2720,7 @@ "type": "object" }, "CommonFeatureSpec": { - "description": "CommonFeatureSpec contains Hub-wide configuration information", + "description": "CommonFeatureSpec contains Fleet-wide configuration information", "id": "CommonFeatureSpec", "properties": { "anthosobservability": { @@ -2763,7 +2763,7 @@ "type": "object" }, "CommonFeatureState": { - "description": "CommonFeatureState contains Hub-wide Feature status information.", + "description": "CommonFeatureState contains Fleet-wide Feature status information.", "id": "CommonFeatureState", "properties": { "appdevexperience": { @@ -2788,7 +2788,7 @@ }, "state": { "$ref": "FeatureState", - "description": "Output only. The \"running state\" of the Feature in this Hub.", + "description": "Output only. The \"running state\" of the Feature in this Fleet.", "readOnly": true } }, @@ -2817,6 +2817,44 @@ }, "type": "object" }, + "CompliancePostureConfig": { + "description": "CompliancePostureConfig defines the settings needed to enable/disable features for the Compliance Posture.", + "id": "CompliancePostureConfig", + "properties": { + "complianceStandards": { + "description": "List of enabled compliance standards.", + "items": { + "$ref": "ComplianceStandard" + }, + "type": "array" + }, + "mode": { + "description": "Defines the enablement mode for Compliance Posture.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value not specified.", + "Disables Compliance Posture features on the cluster.", + "Enables Compliance Posture features on the cluster." + ], + "type": "string" + } + }, + "type": "object" + }, + "ComplianceStandard": { + "id": "ComplianceStandard", + "properties": { + "standard": { + "description": "Name of the compliance standard.", + "type": "string" + } + }, + "type": "object" + }, "ConfigManagementBinauthzConfig": { "description": "Configuration for Binauthz", "id": "ConfigManagementBinauthzConfig", @@ -3472,7 +3510,7 @@ }, "hierarchyController": { "$ref": "ConfigManagementHierarchyControllerConfig", - "description": "Hierarchy Controller configuration for the cluster." + "description": "Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead." }, "management": { "description": "Enables automatic Feature management.", @@ -3843,6 +3881,10 @@ "$ref": "BinaryAuthorizationConfig", "description": "Optional. Enable/Disable binary authorization features for the cluster." }, + "compliancePostureConfig": { + "$ref": "CompliancePostureConfig", + "description": "Optional. Enable/Disable Compliance Posture features for the cluster. Note that on UpdateFleet, only full replacement of this field is allowed. Users are not allowed for partial updates through field mask." + }, "securityPostureConfig": { "$ref": "SecurityPostureConfig", "description": "Enable/Disable Security Posture features for the cluster." @@ -3891,7 +3933,7 @@ "type": "object" }, "Feature": { - "description": "Feature represents the settings and status of any Hub Feature.", + "description": "Feature represents the settings and status of any Fleet Feature.", "id": "Feature", "properties": { "createTime": { @@ -3959,11 +4001,11 @@ }, "spec": { "$ref": "CommonFeatureSpec", - "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + "description": "Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused." }, "state": { "$ref": "CommonFeatureState", - "description": "Output only. The Hub-wide Feature state.", + "description": "Output only. The Fleet-wide Feature state.", "readOnly": true }, "unreachable": { @@ -3984,7 +4026,7 @@ "type": "object" }, "FeatureResourceState": { - "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Fleet and across Memberships.", "id": "FeatureResourceState", "properties": { "state": { @@ -3999,9 +4041,9 @@ ], "enumDescriptions": [ "State is unknown or not set.", - "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", - "The Feature is enabled in this Hub, and the Feature resource is fully available.", - "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Fleet.", + "The Feature is enabled in this Fleet, and the Feature resource is fully available.", + "The Feature is being disabled in this Fleet, and the Feature resource is being deleted.", "The Feature resource is being updated.", "The Feature resource is being updated by the Hub Service." ], @@ -5303,7 +5345,7 @@ "type": "object" }, "MembershipFeatureSpec": { - "description": "MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name.", + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", "id": "MembershipFeatureSpec", "properties": { "anthosobservability": { @@ -6556,6 +6598,7 @@ "enum": [ "CODE_UNSPECIFIED", "MESH_IAM_PERMISSION_DENIED", + "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED", "CNI_CONFIG_UNSUPPORTED", "GKE_SANDBOX_UNSUPPORTED", "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", @@ -6585,6 +6628,7 @@ "enumDescriptions": [ "Default Unspecified code", "Mesh IAM permission denied error code", + "Permission denied error code for cross-project", "CNI config unsupported error code", "GKE sandbox unsupported error code", "Nodepool workload identity federation required error code", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 312db926445..c51482746e1 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -1153,7 +1153,7 @@ func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureSpec: CommonFeatureSpec contains Hub-wide configuration +// CommonFeatureSpec: CommonFeatureSpec contains Fleet-wide configuration // information type CommonFeatureSpec struct { // Anthosobservability: Anthos Observability spec @@ -1192,7 +1192,7 @@ func (s CommonFeatureSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureState: CommonFeatureState contains Hub-wide Feature status +// CommonFeatureState: CommonFeatureState contains Fleet-wide Feature status // information. type CommonFeatureState struct { // Appdevexperience: Appdevexperience specific state. @@ -1205,7 +1205,7 @@ type CommonFeatureState struct { Namespaceactuation *NamespaceActuationFeatureState `json:"namespaceactuation,omitempty"` // Servicemesh: Service Mesh-specific state. Servicemesh *ServiceMeshFeatureState `json:"servicemesh,omitempty"` - // State: Output only. The "running state" of the Feature in this Hub. + // State: Output only. The "running state" of the Feature in this Fleet. State *FeatureState `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "Appdevexperience") to // unconditionally include in API requests. By default, fields with empty or @@ -1254,6 +1254,57 @@ func (s CommonFleetDefaultMemberConfigSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CompliancePostureConfig: CompliancePostureConfig defines the settings needed +// to enable/disable features for the Compliance Posture. +type CompliancePostureConfig struct { + // ComplianceStandards: List of enabled compliance standards. + ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"` + // Mode: Defines the enablement mode for Compliance Posture. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value not specified. + // "DISABLED" - Disables Compliance Posture features on the cluster. + // "ENABLED" - Enables Compliance Posture features on the cluster. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComplianceStandards") 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. "ComplianceStandards") 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 CompliancePostureConfig) MarshalJSON() ([]byte, error) { + type NoMethod CompliancePostureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ComplianceStandard struct { + // Standard: Name of the compliance standard. + Standard string `json:"standard,omitempty"` + // ForceSendFields is a list of field names (e.g. "Standard") 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. "Standard") 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 ComplianceStandard) MarshalJSON() ([]byte, error) { + type NoMethod ComplianceStandard + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConfigManagementBinauthzConfig: Configuration for Binauthz type ConfigManagementBinauthzConfig struct { // Enabled: Whether binauthz is enabled in this cluster. @@ -1904,6 +1955,9 @@ type ConfigManagementMembershipSpec struct { // ConfigSync: Config Sync configuration for the cluster. ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"` // HierarchyController: Hierarchy Controller configuration for the cluster. + // Deprecated: Configuring Hierarchy Controller through the configmanagement + // feature is no longer recommended. Use + // https://github.com/kubernetes-sigs/hierarchical-namespaces instead. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` // Management: Enables automatic Feature management. // @@ -2331,6 +2385,11 @@ type DefaultClusterConfig struct { // BinaryAuthorizationConfig: Optional. Enable/Disable binary authorization // features for the cluster. BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"` + // CompliancePostureConfig: Optional. Enable/Disable Compliance Posture + // features for the cluster. Note that on UpdateFleet, only full replacement of + // this field is allowed. Users are not allowed for partial updates through + // field mask. + CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"` // SecurityPostureConfig: Enable/Disable Security Posture features for the // cluster. SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` @@ -2435,7 +2494,7 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Feature: Feature represents the settings and status of any Hub Feature. +// Feature: Feature represents the settings and status of any Fleet Feature. type Feature struct { // CreateTime: Output only. When the Feature resource was created. CreateTime string `json:"createTime,omitempty"` @@ -2489,10 +2548,10 @@ type Feature struct { // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is // a valid Scope in this project. {p} WILL match the Feature's project. ScopeStates map[string]ScopeFeatureState `json:"scopeStates,omitempty"` - // Spec: Optional. Hub-wide Feature configuration. If this Feature does not - // support any Hub-wide configuration, this field may be unused. + // Spec: Optional. Fleet-wide Feature configuration. If this Feature does not + // support any Fleet-wide configuration, this field may be unused. Spec *CommonFeatureSpec `json:"spec,omitempty"` - // State: Output only. The Hub-wide Feature state. + // State: Output only. The Fleet-wide Feature state. State *CommonFeatureState `json:"state,omitempty"` // Unreachable: Output only. List of locations that could not be reached while // fetching this feature. @@ -2522,7 +2581,7 @@ func (s Feature) MarshalJSON() ([]byte, error) { // FeatureResourceState: FeatureResourceState describes the state of a Feature // *resource* in the GkeHub API. See `FeatureState` for the "running state" of -// the Feature in the Hub and across Memberships. +// the Feature in the Fleet and across Memberships. type FeatureResourceState struct { // State: The current state of the Feature resource in the Hub API. // @@ -2530,10 +2589,10 @@ type FeatureResourceState struct { // "STATE_UNSPECIFIED" - State is unknown or not set. // "ENABLING" - The Feature is being enabled, and the Feature resource is // being created. Once complete, the corresponding Feature will be enabled in - // this Hub. - // "ACTIVE" - The Feature is enabled in this Hub, and the Feature resource is - // fully available. - // "DISABLING" - The Feature is being disabled in this Hub, and the Feature + // this Fleet. + // "ACTIVE" - The Feature is enabled in this Fleet, and the Feature resource + // is fully available. + // "DISABLING" - The Feature is being disabled in this Fleet, and the Feature // resource is being deleted. // "UPDATING" - The Feature resource is being updated. // "SERVICE_UPDATING" - The Feature resource is being updated by the Hub @@ -4247,8 +4306,7 @@ func (s MembershipEndpoint) MarshalJSON() ([]byte, error) { } // MembershipFeatureSpec: MembershipFeatureSpec contains configuration -// information for a single Membership. NOTE: Please use snake case in your -// feature name. +// information for a single Membership. type MembershipFeatureSpec struct { // Anthosobservability: Anthos Observability-specific spec Anthosobservability *AnthosObservabilityMembershipSpec `json:"anthosobservability,omitempty"` @@ -5835,6 +5893,8 @@ type ServiceMeshCondition struct { // Possible values: // "CODE_UNSPECIFIED" - Default Unspecified code // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code + // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code + // for cross-project // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index 28959f8014d..705b237875e 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -2111,7 +2111,7 @@ } } }, - "revision": "20240727", + "revision": "20240815", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2550,7 +2550,7 @@ "type": "object" }, "CommonFeatureSpec": { - "description": "CommonFeatureSpec contains Hub-wide configuration information", + "description": "CommonFeatureSpec contains Fleet-wide configuration information", "id": "CommonFeatureSpec", "properties": { "anthosobservability": { @@ -2581,7 +2581,7 @@ "type": "object" }, "CommonFeatureState": { - "description": "CommonFeatureState contains Hub-wide Feature status information.", + "description": "CommonFeatureState contains Fleet-wide Feature status information.", "id": "CommonFeatureState", "properties": { "appdevexperience": { @@ -2598,7 +2598,7 @@ }, "state": { "$ref": "FeatureState", - "description": "Output only. The \"running state\" of the Feature in this Hub.", + "description": "Output only. The \"running state\" of the Feature in this Fleet.", "readOnly": true } }, @@ -2627,6 +2627,44 @@ }, "type": "object" }, + "CompliancePostureConfig": { + "description": "CompliancePostureConfig defines the settings needed to enable/disable features for the Compliance Posture.", + "id": "CompliancePostureConfig", + "properties": { + "complianceStandards": { + "description": "List of enabled compliance standards.", + "items": { + "$ref": "ComplianceStandard" + }, + "type": "array" + }, + "mode": { + "description": "Defines the enablement mode for Compliance Posture.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value not specified.", + "Disables Compliance Posture features on the cluster.", + "Enables Compliance Posture features on the cluster." + ], + "type": "string" + } + }, + "type": "object" + }, + "ComplianceStandard": { + "id": "ComplianceStandard", + "properties": { + "standard": { + "description": "Name of the compliance standard.", + "type": "string" + } + }, + "type": "object" + }, "ConfigManagementBinauthzConfig": { "description": "Configuration for Binauthz", "id": "ConfigManagementBinauthzConfig", @@ -3282,7 +3320,7 @@ }, "hierarchyController": { "$ref": "ConfigManagementHierarchyControllerConfig", - "description": "Hierarchy Controller configuration for the cluster." + "description": "Hierarchy Controller configuration for the cluster. Deprecated: Configuring Hierarchy Controller through the configmanagement feature is no longer recommended. Use https://github.com/kubernetes-sigs/hierarchical-namespaces instead." }, "management": { "description": "Enables automatic Feature management.", @@ -3653,6 +3691,10 @@ "$ref": "BinaryAuthorizationConfig", "description": "Optional. Enable/Disable binary authorization features for the cluster." }, + "compliancePostureConfig": { + "$ref": "CompliancePostureConfig", + "description": "Optional. Enable/Disable Compliance Posture features for the cluster. Note that on UpdateFleet, only full replacement of this field is allowed. Users are not allowed for partial updates through field mask." + }, "securityPostureConfig": { "$ref": "SecurityPostureConfig", "description": "Enable/Disable Security Posture features for the cluster." @@ -3701,7 +3743,7 @@ "type": "object" }, "Feature": { - "description": "Feature represents the settings and status of any Hub Feature.", + "description": "Feature represents the settings and status of any Fleet Feature.", "id": "Feature", "properties": { "createTime": { @@ -3769,11 +3811,11 @@ }, "spec": { "$ref": "CommonFeatureSpec", - "description": "Optional. Hub-wide Feature configuration. If this Feature does not support any Hub-wide configuration, this field may be unused." + "description": "Optional. Fleet-wide Feature configuration. If this Feature does not support any Fleet-wide configuration, this field may be unused." }, "state": { "$ref": "CommonFeatureState", - "description": "Output only. The Hub-wide Feature state.", + "description": "Output only. The Fleet-wide Feature state.", "readOnly": true }, "unreachable": { @@ -3794,7 +3836,7 @@ "type": "object" }, "FeatureResourceState": { - "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Hub and across Memberships.", + "description": "FeatureResourceState describes the state of a Feature *resource* in the GkeHub API. See `FeatureState` for the \"running state\" of the Feature in the Fleet and across Memberships.", "id": "FeatureResourceState", "properties": { "state": { @@ -3809,9 +3851,9 @@ ], "enumDescriptions": [ "State is unknown or not set.", - "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Hub.", - "The Feature is enabled in this Hub, and the Feature resource is fully available.", - "The Feature is being disabled in this Hub, and the Feature resource is being deleted.", + "The Feature is being enabled, and the Feature resource is being created. Once complete, the corresponding Feature will be enabled in this Fleet.", + "The Feature is enabled in this Fleet, and the Feature resource is fully available.", + "The Feature is being disabled in this Fleet, and the Feature resource is being deleted.", "The Feature resource is being updated.", "The Feature resource is being updated by the Hub Service." ], @@ -5059,7 +5101,7 @@ "type": "object" }, "MembershipFeatureSpec": { - "description": "MembershipFeatureSpec contains configuration information for a single Membership. NOTE: Please use snake case in your feature name.", + "description": "MembershipFeatureSpec contains configuration information for a single Membership.", "id": "MembershipFeatureSpec", "properties": { "anthosobservability": { @@ -6195,6 +6237,7 @@ "enum": [ "CODE_UNSPECIFIED", "MESH_IAM_PERMISSION_DENIED", + "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED", "CNI_CONFIG_UNSUPPORTED", "GKE_SANDBOX_UNSUPPORTED", "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED", @@ -6224,6 +6267,7 @@ "enumDescriptions": [ "Default Unspecified code", "Mesh IAM permission denied error code", + "Permission denied error code for cross-project", "CNI config unsupported error code", "GKE sandbox unsupported error code", "Nodepool workload identity federation required error code", diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index b534ff73d64..7a851f2e535 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -1024,7 +1024,7 @@ func (s ClusterUpgradeUpgradeStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureSpec: CommonFeatureSpec contains Hub-wide configuration +// CommonFeatureSpec: CommonFeatureSpec contains Fleet-wide configuration // information type CommonFeatureSpec struct { // Anthosobservability: Anthos Observability spec @@ -1057,7 +1057,7 @@ func (s CommonFeatureSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CommonFeatureState: CommonFeatureState contains Hub-wide Feature status +// CommonFeatureState: CommonFeatureState contains Fleet-wide Feature status // information. type CommonFeatureState struct { // Appdevexperience: Appdevexperience specific state. @@ -1066,7 +1066,7 @@ type CommonFeatureState struct { Clusterupgrade *ClusterUpgradeFleetState `json:"clusterupgrade,omitempty"` // Fleetobservability: FleetObservability feature state. Fleetobservability *FleetObservabilityFeatureState `json:"fleetobservability,omitempty"` - // State: Output only. The "running state" of the Feature in this Hub. + // State: Output only. The "running state" of the Feature in this Fleet. State *FeatureState `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "Appdevexperience") to // unconditionally include in API requests. By default, fields with empty or @@ -1115,6 +1115,57 @@ func (s CommonFleetDefaultMemberConfigSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CompliancePostureConfig: CompliancePostureConfig defines the settings needed +// to enable/disable features for the Compliance Posture. +type CompliancePostureConfig struct { + // ComplianceStandards: List of enabled compliance standards. + ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"` + // Mode: Defines the enablement mode for Compliance Posture. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value not specified. + // "DISABLED" - Disables Compliance Posture features on the cluster. + // "ENABLED" - Enables Compliance Posture features on the cluster. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComplianceStandards") 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. "ComplianceStandards") 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 CompliancePostureConfig) MarshalJSON() ([]byte, error) { + type NoMethod CompliancePostureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ComplianceStandard struct { + // Standard: Name of the compliance standard. + Standard string `json:"standard,omitempty"` + // ForceSendFields is a list of field names (e.g. "Standard") 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. "Standard") 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 ComplianceStandard) MarshalJSON() ([]byte, error) { + type NoMethod ComplianceStandard + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConfigManagementBinauthzConfig: Configuration for Binauthz type ConfigManagementBinauthzConfig struct { // Enabled: Whether binauthz is enabled in this cluster. @@ -1765,6 +1816,9 @@ type ConfigManagementMembershipSpec struct { // ConfigSync: Config Sync configuration for the cluster. ConfigSync *ConfigManagementConfigSync `json:"configSync,omitempty"` // HierarchyController: Hierarchy Controller configuration for the cluster. + // Deprecated: Configuring Hierarchy Controller through the configmanagement + // feature is no longer recommended. Use + // https://github.com/kubernetes-sigs/hierarchical-namespaces instead. HierarchyController *ConfigManagementHierarchyControllerConfig `json:"hierarchyController,omitempty"` // Management: Enables automatic Feature management. // @@ -2192,6 +2246,11 @@ type DefaultClusterConfig struct { // BinaryAuthorizationConfig: Optional. Enable/Disable binary authorization // features for the cluster. BinaryAuthorizationConfig *BinaryAuthorizationConfig `json:"binaryAuthorizationConfig,omitempty"` + // CompliancePostureConfig: Optional. Enable/Disable Compliance Posture + // features for the cluster. Note that on UpdateFleet, only full replacement of + // this field is allowed. Users are not allowed for partial updates through + // field mask. + CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"` // SecurityPostureConfig: Enable/Disable Security Posture features for the // cluster. SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` @@ -2296,7 +2355,7 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Feature: Feature represents the settings and status of any Hub Feature. +// Feature: Feature represents the settings and status of any Fleet Feature. type Feature struct { // CreateTime: Output only. When the Feature resource was created. CreateTime string `json:"createTime,omitempty"` @@ -2350,10 +2409,10 @@ type Feature struct { // `projects/{p}/locations/global/scopes/{s}` Where {p} is the project, {s} is // a valid Scope in this project. {p} WILL match the Feature's project. ScopeStates map[string]ScopeFeatureState `json:"scopeStates,omitempty"` - // Spec: Optional. Hub-wide Feature configuration. If this Feature does not - // support any Hub-wide configuration, this field may be unused. + // Spec: Optional. Fleet-wide Feature configuration. If this Feature does not + // support any Fleet-wide configuration, this field may be unused. Spec *CommonFeatureSpec `json:"spec,omitempty"` - // State: Output only. The Hub-wide Feature state. + // State: Output only. The Fleet-wide Feature state. State *CommonFeatureState `json:"state,omitempty"` // Unreachable: Output only. List of locations that could not be reached while // fetching this feature. @@ -2383,7 +2442,7 @@ func (s Feature) MarshalJSON() ([]byte, error) { // FeatureResourceState: FeatureResourceState describes the state of a Feature // *resource* in the GkeHub API. See `FeatureState` for the "running state" of -// the Feature in the Hub and across Memberships. +// the Feature in the Fleet and across Memberships. type FeatureResourceState struct { // State: The current state of the Feature resource in the Hub API. // @@ -2391,10 +2450,10 @@ type FeatureResourceState struct { // "STATE_UNSPECIFIED" - State is unknown or not set. // "ENABLING" - The Feature is being enabled, and the Feature resource is // being created. Once complete, the corresponding Feature will be enabled in - // this Hub. - // "ACTIVE" - The Feature is enabled in this Hub, and the Feature resource is - // fully available. - // "DISABLING" - The Feature is being disabled in this Hub, and the Feature + // this Fleet. + // "ACTIVE" - The Feature is enabled in this Fleet, and the Feature resource + // is fully available. + // "DISABLING" - The Feature is being disabled in this Fleet, and the Feature // resource is being deleted. // "UPDATING" - The Feature resource is being updated. // "SERVICE_UPDATING" - The Feature resource is being updated by the Hub @@ -4038,8 +4097,7 @@ func (s MembershipEndpoint) MarshalJSON() ([]byte, error) { } // MembershipFeatureSpec: MembershipFeatureSpec contains configuration -// information for a single Membership. NOTE: Please use snake case in your -// feature name. +// information for a single Membership. type MembershipFeatureSpec struct { // Anthosobservability: Anthos Observability-specific spec Anthosobservability *AnthosObservabilityMembershipSpec `json:"anthosobservability,omitempty"` @@ -5481,6 +5539,8 @@ type ServiceMeshCondition struct { // Possible values: // "CODE_UNSPECIFIED" - Default Unspecified code // "MESH_IAM_PERMISSION_DENIED" - Mesh IAM permission denied error code + // "MESH_IAM_CROSS_PROJECT_PERMISSION_DENIED" - Permission denied error code + // for cross-project // "CNI_CONFIG_UNSUPPORTED" - CNI config unsupported error code // "GKE_SANDBOX_UNSUPPORTED" - GKE sandbox unsupported error code // "NODEPOOL_WORKLOAD_IDENTITY_FEDERATION_REQUIRED" - Nodepool workload diff --git a/gkehub/v2/gkehub-api.json b/gkehub/v2/gkehub-api.json new file mode 100644 index 00000000000..993a11c62b1 --- /dev/null +++ b/gkehub/v2/gkehub-api.json @@ -0,0 +1,435 @@ +{ + "auth": { + "oauth2": { + "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." + } + } + } + }, + "basePath": "", + "baseUrl": "https://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "gkehub:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v2/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "gkehub.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "gkehub.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20240809", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "GKE Hub API", + "version": "v2", + "version_module": true +} \ No newline at end of file diff --git a/gkehub/v2/gkehub-gen.go b/gkehub/v2/gkehub-gen.go new file mode 100644 index 00000000000..81a76b4eafb --- /dev/null +++ b/gkehub/v2/gkehub-gen.go @@ -0,0 +1,1004 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package gkehub provides access to the GKE Hub API. +// +// For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/gkehub/v2" +// ... +// ctx := context.Background() +// gkehubService, err := gkehub.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// gkehubService, err := gkehub.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package gkehub // import "google.golang.org/api/gkehub/v2" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "gkehub:v2" +const apiName = "gkehub" +const apiVersion = "v2" +const basePath = "https://gkehub.googleapis.com/" +const basePathTemplate = "https://gkehub.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://gkehub.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +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" +) + +// 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", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use it as +// the request or the response type of an API method. For instance: service Foo +// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs and RPC +// APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message +// contains three pieces of data: error code, error message, and error details. +// You can find out more about this error model and how to work with it in the +// API Design Guide (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + 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 GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // 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 + // 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. "Locations") 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 ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + // Operations: A list of operations that matches the specified filter in the + // request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby city + // name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + // LocationId: The canonical id for this location. For example: "us-east1". + LocationId string `json:"locationId,omitempty"` + // Metadata: Service-specific metadata. For example the available capacity at + // the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is the +// result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this service. +// +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the `next_page_token` field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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 ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + 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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.operations.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 *ProjectsLocationsOperationsGetCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) 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) + } +} diff --git a/gkehub/v2beta/gkehub-api.json b/gkehub/v2beta/gkehub-api.json new file mode 100644 index 00000000000..a587b00fb0a --- /dev/null +++ b/gkehub/v2beta/gkehub-api.json @@ -0,0 +1,435 @@ +{ + "auth": { + "oauth2": { + "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." + } + } + } + }, + "basePath": "", + "baseUrl": "https://gkehub.googleapis.com/", + "batchPath": "batch", + "canonicalName": "GKE Hub", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "gkehub:v2beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://gkehub.mtls.googleapis.com/", + "name": "gkehub", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v2beta/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "gkehub.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "gkehub.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "gkehub.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "gkehub.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20240809", + "rootUrl": "https://gkehub.googleapis.com/", + "schemas": { + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "GKE Hub API", + "version": "v2beta", + "version_module": true +} \ No newline at end of file diff --git a/gkehub/v2beta/gkehub-gen.go b/gkehub/v2beta/gkehub-gen.go new file mode 100644 index 00000000000..65b2ca83dc2 --- /dev/null +++ b/gkehub/v2beta/gkehub-gen.go @@ -0,0 +1,1004 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package gkehub provides access to the GKE Hub API. +// +// For product documentation, see: https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/gkehub/v2beta" +// ... +// ctx := context.Background() +// gkehubService, err := gkehub.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// gkehubService, err := gkehub.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// gkehubService, err := gkehub.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package gkehub // import "google.golang.org/api/gkehub/v2beta" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "gkehub:v2beta" +const apiName = "gkehub" +const apiVersion = "v2beta" +const basePath = "https://gkehub.googleapis.com/" +const basePathTemplate = "https://gkehub.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://gkehub.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +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" +) + +// 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", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use it as +// the request or the response type of an API method. For instance: service Foo +// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs and RPC +// APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message +// contains three pieces of data: error code, error message, and error details. +// You can find out more about this error model and how to work with it in the +// API Design Guide (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + 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 GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // 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 + // 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. "Locations") 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 ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + // Operations: A list of operations that matches the specified filter in the + // request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby city + // name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + // LocationId: The canonical id for this location. For example: "us-east1". + LocationId string `json:"locationId,omitempty"` + // Metadata: Service-specific metadata. For example the available capacity at + // the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DisplayName") 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. "DisplayName") 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 Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is the +// result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") 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. "Done") 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 Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + 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 *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this service. +// +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the `next_page_token` field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + 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 *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) 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 ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + 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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:cancel") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + 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 *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.operations.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 *ProjectsLocationsOperationsGetCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + 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 *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "gkehub.projects.locations.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) 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) + } +} diff --git a/gkeonprem/v1/gkeonprem-api.json b/gkeonprem/v1/gkeonprem-api.json index beeb52a2a37..767d24348b7 100644 --- a/gkeonprem/v1/gkeonprem-api.json +++ b/gkeonprem/v1/gkeonprem-api.json @@ -188,6 +188,11 @@ "parent" ], "parameters": { + "allowPreflightFailure": { + "description": "Optional. If set to true, CLM will force CCFE to persist the cluster resource in RMS when the creation fails during standalone preflight checks. In that case the subsequent create call will fail with \"cluster already exists\" error and hence a update cluster is required to fix the cluster.", + "location": "query", + "type": "boolean" + }, "bareMetalAdminClusterId": { "description": "Required. User provided identifier that is used as part of the resource name; must conform to RFC-1034 and additionally restrict to lower-cased letters. This comes out roughly to: /^a-z+[a-z0-9]$/", "location": "query", @@ -254,6 +259,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return BareMetal Admin Cluster including the one that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Name of the bare metal admin cluster to get. Format: \"projects/{project}/locations/{location}/bareMetalAdminClusters/{bare_metal_admin_cluster}\"", "location": "path", @@ -325,6 +335,11 @@ "parent" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return list of BareMetal Admin Clusters including the ones that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "pageSize": { "description": "Requested page size. Server may return fewer items than requested. If unspecified, at most 50 clusters will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", "format": "int32", @@ -622,6 +637,11 @@ "parent" ], "parameters": { + "allowPreflightFailure": { + "description": "Optional. If set to true, CLM will force CCFE to persist the cluster resource in RMS when the creation fails during standalone preflight checks. In that case the subsequent create call will fail with \"cluster already exists\" error and hence a update cluster is required to fix the cluster.", + "location": "query", + "type": "boolean" + }, "bareMetalClusterId": { "description": "Required. User provided identifier that is used as part of the resource name; must conform to RFC-1034 and additionally restrict to lower-cased letters. This comes out roughly to: /^a-z+[a-z0-9]$/", "location": "query", @@ -738,6 +758,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return BareMetal Cluster including the one that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Name of the bare metal user cluster to get. Format: \"projects/{project}/locations/{location}/bareMetalClusters/{bare_metal_cluster}\"", "location": "path", @@ -809,6 +834,11 @@ "parent" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return list of BareMetal Clusters including the ones that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "filter": { "description": "A resource filtering expression following https://google.aip.dev/160. When non-empty, only resource's whose attributes field matches the filter are returned.", "location": "query", @@ -1726,6 +1756,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return Vmware Admin Cluster including the one that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Name of the VMware admin cluster to be returned. Format: \"projects/{project}/locations/{location}/vmwareAdminClusters/{vmware_admin_cluster}\"", "location": "path", @@ -1797,6 +1832,11 @@ "parent" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return list of Vmware Admin Clusters including the ones that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "pageSize": { "description": "Requested page size. Server may return fewer items than requested. If unspecified, at most 50 clusters will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", "format": "int32", @@ -2059,6 +2099,11 @@ "parent" ], "parameters": { + "allowPreflightFailure": { + "description": "Optional. If set to true, CLM will force CCFE to persist the cluster resource in RMS when the creation fails during standalone preflight checks. In that case the subsequent create call will fail with \"cluster already exists\" error and hence a update cluster is required to fix the cluster.", + "location": "query", + "type": "boolean" + }, "parent": { "description": "Required. The parent of the project and location where this cluster is created in. Format: \"projects/{project}/locations/{location}\"", "location": "path", @@ -2175,6 +2220,11 @@ "name" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return Vmware Cluster including the one that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. Name of the VMware user cluster to be returned. Format: \"projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}\"", "location": "path", @@ -2246,6 +2296,11 @@ "parent" ], "parameters": { + "allowMissing": { + "description": "Optional. If true, return list of Vmware Clusters including the ones that only exists in RMS.", + "location": "query", + "type": "boolean" + }, "filter": { "description": "A resource filtering expression following https://google.aip.dev/160. When non-empty, only resource's whose attributes field matches the filter are returned.", "location": "query", @@ -2996,7 +3051,7 @@ } } }, - "revision": "20240228", + "revision": "20240814", "rootUrl": "https://gkeonprem.googleapis.com/", "schemas": { "Authorization": { @@ -3719,6 +3774,11 @@ "description": "BareMetalClusterUpgradePolicy defines the cluster upgrade policy.", "id": "BareMetalClusterUpgradePolicy", "properties": { + "pause": { + "description": "Output only. Pause is used to show the upgrade pause status. It's view only for now.", + "readOnly": true, + "type": "boolean" + }, "policy": { "description": "Specifies which upgrade policy to use.", "enum": [ @@ -5182,6 +5242,14 @@ "errorMessage": { "description": "Human-friendly representation of the error message from controller. The error message can be temporary as the controller controller creates a cluster or node pool. If the error message persists for a longer period of time, it can be used to surface error message to indicate real problems requiring user intervention.", "type": "string" + }, + "version": { + "description": "Reflect current version of the resource.", + "type": "string" + }, + "versions": { + "$ref": "Versions", + "description": "Shows the mapping of a given version to the number of machines under this version." } }, "type": "object" @@ -5371,6 +5439,36 @@ }, "type": "object" }, + "Version": { + "description": "Version describes the number of nodes at a given version under a resource.", + "id": "Version", + "properties": { + "count": { + "description": "Number of machines under the above version.", + "format": "int64", + "type": "string" + }, + "version": { + "description": "Resource version.", + "type": "string" + } + }, + "type": "object" + }, + "Versions": { + "description": "Versions describes the mapping of a given version to the number of machines under this version.", + "id": "Versions", + "properties": { + "versions": { + "description": "Shows the mapping of a given version to the number of machines under this version.", + "items": { + "$ref": "Version" + }, + "type": "array" + } + }, + "type": "object" + }, "VmwareAAGConfig": { "description": "Specifies anti affinity group config for the VMware user cluster.", "id": "VmwareAAGConfig", @@ -5570,6 +5668,11 @@ "readOnly": true, "type": "string" }, + "validationCheck": { + "$ref": "ValidationCheck", + "description": "Output only. ValidationCheck represents the result of the preflight check job.", + "readOnly": true + }, "vcenter": { "$ref": "VmwareAdminVCenterConfig", "description": "The VMware admin cluster VCenter configuration." @@ -6727,7 +6830,7 @@ } }, "servicePath": "", - "title": "Anthos On-Prem API", + "title": "GDC Virtual API", "version": "v1", "version_module": true } \ No newline at end of file diff --git a/gkeonprem/v1/gkeonprem-gen.go b/gkeonprem/v1/gkeonprem-gen.go index 9c1253107c0..677749cceb4 100644 --- a/gkeonprem/v1/gkeonprem-gen.go +++ b/gkeonprem/v1/gkeonprem-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package gkeonprem provides access to the Anthos On-Prem API. +// Package gkeonprem provides access to the GDC Virtual API. // // For product documentation, see: https://cloud.google.com/anthos/clusters/docs/on-prem/ // @@ -1272,6 +1272,9 @@ func (s BareMetalClusterOperationsConfig) MarshalJSON() ([]byte, error) { // BareMetalClusterUpgradePolicy: BareMetalClusterUpgradePolicy defines the // cluster upgrade policy. type BareMetalClusterUpgradePolicy struct { + // Pause: Output only. Pause is used to show the upgrade pause status. It's + // view only for now. + Pause bool `json:"pause,omitempty"` // Policy: Specifies which upgrade policy to use. // // Possible values: @@ -1279,13 +1282,13 @@ type BareMetalClusterUpgradePolicy struct { // "SERIAL" - Upgrade worker node pools sequentially. // "CONCURRENT" - Upgrade all worker node pools in parallel. Policy string `json:"policy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally + // ForceSendFields is a list of field names (e.g. "Pause") 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. "Policy") to include in API + // NullFields is a list of field names (e.g. "Pause") 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. @@ -3443,6 +3446,11 @@ type ResourceStatus struct { // period of time, it can be used to surface error message to indicate real // problems requiring user intervention. ErrorMessage string `json:"errorMessage,omitempty"` + // Version: Reflect current version of the resource. + Version string `json:"version,omitempty"` + // Versions: Shows the mapping of a given version to the number of machines + // under this version. + Versions *Versions `json:"versions,omitempty"` // ForceSendFields is a list of field names (e.g. "Conditions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3704,6 +3712,55 @@ func (s ValidationCheckStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Version: Version describes the number of nodes at a given version under a +// resource. +type Version struct { + // Count: Number of machines under the above version. + Count int64 `json:"count,omitempty,string"` + // Version: Resource version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Count") 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. "Count") 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 Version) MarshalJSON() ([]byte, error) { + type NoMethod Version + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Versions: Versions describes the mapping of a given version to the number of +// machines under this version. +type Versions struct { + // Versions: Shows the mapping of a given version to the number of machines + // under this version. + Versions []*Version `json:"versions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Versions") 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. "Versions") 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 Versions) MarshalJSON() ([]byte, error) { + type NoMethod Versions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VmwareAAGConfig: Specifies anti affinity group config for the VMware user // cluster. type VmwareAAGConfig struct { @@ -3899,6 +3956,9 @@ type VmwareAdminCluster struct { // UpdateTime: Output only. The time at which VMware admin cluster was last // updated. UpdateTime string `json:"updateTime,omitempty"` + // ValidationCheck: Output only. ValidationCheck represents the result of the + // preflight check job. + ValidationCheck *ValidationCheck `json:"validationCheck,omitempty"` // Vcenter: The VMware admin cluster VCenter configuration. Vcenter *VmwareAdminVCenterConfig `json:"vcenter,omitempty"` @@ -5584,6 +5644,16 @@ func (r *ProjectsLocationsBareMetalAdminClustersService) Create(parent string, b return c } +// AllowPreflightFailure sets the optional parameter "allowPreflightFailure": +// If set to true, CLM will force CCFE to persist the cluster resource in RMS +// when the creation fails during standalone preflight checks. In that case the +// subsequent create call will fail with "cluster already exists" error and +// hence a update cluster is required to fix the cluster. +func (c *ProjectsLocationsBareMetalAdminClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsBareMetalAdminClustersCreateCall { + c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure)) + return c +} + // BareMetalAdminClusterId sets the optional parameter // "bareMetalAdminClusterId": Required. User provided identifier that is used // as part of the resource name; must conform to RFC-1034 and additionally @@ -5808,6 +5878,13 @@ func (r *ProjectsLocationsBareMetalAdminClustersService) Get(name string) *Proje return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// BareMetal Admin Cluster including the one that only exists in RMS. +func (c *ProjectsLocationsBareMetalAdminClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalAdminClustersGetCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // View sets the optional parameter "view": View for bare metal admin cluster. // When `BASIC` is specified, only the cluster resource name and membership are // returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as @@ -6068,6 +6145,13 @@ func (r *ProjectsLocationsBareMetalAdminClustersService) List(parent string) *Pr return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// list of BareMetal Admin Clusters including the ones that only exists in RMS. +func (c *ProjectsLocationsBareMetalAdminClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalAdminClustersListCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // PageSize sets the optional parameter "pageSize": Requested page size. Server // may return fewer items than requested. If unspecified, at most 50 clusters // will be returned. The maximum value is 1000; values above 1000 will be @@ -7075,6 +7159,16 @@ func (r *ProjectsLocationsBareMetalClustersService) Create(parent string, bareme return c } +// AllowPreflightFailure sets the optional parameter "allowPreflightFailure": +// If set to true, CLM will force CCFE to persist the cluster resource in RMS +// when the creation fails during standalone preflight checks. In that case the +// subsequent create call will fail with "cluster already exists" error and +// hence a update cluster is required to fix the cluster. +func (c *ProjectsLocationsBareMetalClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsBareMetalClustersCreateCall { + c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure)) + return c +} + // BareMetalClusterId sets the optional parameter "bareMetalClusterId": // Required. User provided identifier that is used as part of the resource // name; must conform to RFC-1034 and additionally restrict to lower-cased @@ -7439,6 +7533,13 @@ func (r *ProjectsLocationsBareMetalClustersService) Get(name string) *ProjectsLo return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// BareMetal Cluster including the one that only exists in RMS. +func (c *ProjectsLocationsBareMetalClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersGetCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // View sets the optional parameter "view": View for bare metal user cluster. // When `BASIC` is specified, only the cluster resource name and admin cluster // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` @@ -7699,6 +7800,13 @@ func (r *ProjectsLocationsBareMetalClustersService) List(parent string) *Project return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// list of BareMetal Clusters including the ones that only exists in RMS. +func (c *ProjectsLocationsBareMetalClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsBareMetalClustersListCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // Filter sets the optional parameter "filter": A resource filtering expression // following https://google.aip.dev/160. When non-empty, only resource's whose // attributes field matches the filter are returned. @@ -10825,6 +10933,13 @@ func (r *ProjectsLocationsVmwareAdminClustersService) Get(name string) *Projects return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// Vmware Admin Cluster including the one that only exists in RMS. +func (c *ProjectsLocationsVmwareAdminClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareAdminClustersGetCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // View sets the optional parameter "view": View for VMware admin cluster. When // `BASIC` is specified, only the cluster resource name and membership are // returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` is the same as @@ -11084,6 +11199,13 @@ func (r *ProjectsLocationsVmwareAdminClustersService) List(parent string) *Proje return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// list of Vmware Admin Clusters including the ones that only exists in RMS. +func (c *ProjectsLocationsVmwareAdminClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareAdminClustersListCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // PageSize sets the optional parameter "pageSize": Requested page size. Server // may return fewer items than requested. If unspecified, at most 50 clusters // will be returned. The maximum value is 1000; values above 1000 will be @@ -11972,6 +12094,16 @@ func (r *ProjectsLocationsVmwareClustersService) Create(parent string, vmwareclu return c } +// AllowPreflightFailure sets the optional parameter "allowPreflightFailure": +// If set to true, CLM will force CCFE to persist the cluster resource in RMS +// when the creation fails during standalone preflight checks. In that case the +// subsequent create call will fail with "cluster already exists" error and +// hence a update cluster is required to fix the cluster. +func (c *ProjectsLocationsVmwareClustersCreateCall) AllowPreflightFailure(allowPreflightFailure bool) *ProjectsLocationsVmwareClustersCreateCall { + c.urlParams_.Set("allowPreflightFailure", fmt.Sprint(allowPreflightFailure)) + return c +} + // ValidateOnly sets the optional parameter "validateOnly": Validate the // request without actually doing any updates. func (c *ProjectsLocationsVmwareClustersCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsVmwareClustersCreateCall { @@ -12334,6 +12466,13 @@ func (r *ProjectsLocationsVmwareClustersService) Get(name string) *ProjectsLocat return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// Vmware Cluster including the one that only exists in RMS. +func (c *ProjectsLocationsVmwareClustersGetCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersGetCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // View sets the optional parameter "view": View for VMware user cluster. When // `BASIC` is specified, only the cluster resource name and admin cluster // membership are returned. The default/unset value `CLUSTER_VIEW_UNSPECIFIED` @@ -12593,6 +12732,13 @@ func (r *ProjectsLocationsVmwareClustersService) List(parent string) *ProjectsLo return c } +// AllowMissing sets the optional parameter "allowMissing": If true, return +// list of Vmware Clusters including the ones that only exists in RMS. +func (c *ProjectsLocationsVmwareClustersListCall) AllowMissing(allowMissing bool) *ProjectsLocationsVmwareClustersListCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + // Filter sets the optional parameter "filter": A resource filtering expression // following https://google.aip.dev/160. When non-empty, only resource's whose // attributes field matches the filter are returned. diff --git a/go.mod b/go.mod index b3a6a969771..ad92d09b6b5 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module google.golang.org/api -go 1.20 +go 1.21 require ( - cloud.google.com/go v0.115.0 - cloud.google.com/go/auth v0.8.1 - cloud.google.com/go/auth/oauth2adapt v0.2.3 + cloud.google.com/go v0.115.1 + cloud.google.com/go/auth v0.9.1 + cloud.google.com/go/auth/oauth2adapt v0.2.4 cloud.google.com/go/compute/metadata v0.5.0 github.com/google/go-cmp v0.6.0 github.com/google/s2a-go v0.1.8 @@ -15,14 +15,14 @@ require ( go.opencensus.io v0.24.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 - golang.org/x/net v0.27.0 + golang.org/x/net v0.28.0 golang.org/x/oauth2 v0.22.0 golang.org/x/sync v0.8.0 golang.org/x/time v0.6.0 - google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf - google.golang.org/genproto/googleapis/bytestream v0.0.0-20240730163845-b1a4ccb954bf - google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf - google.golang.org/grpc v1.64.1 + google.golang.org/genproto v0.0.0-20240823204242-4ba0660f739c + google.golang.org/genproto/googleapis/bytestream v0.0.0-20240823204242-4ba0660f739c + google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c + google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 ) @@ -34,7 +34,7 @@ require ( go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/metric v1.24.0 // indirect go.opentelemetry.io/otel/trace v1.24.0 // indirect - golang.org/x/crypto v0.25.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/text v0.17.0 // indirect ) diff --git a/go.sum b/go.sum index 4f5f4c039da..02eb96d7e4b 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,10 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= -cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= -cloud.google.com/go/auth v0.8.1 h1:QZW9FjC5lZzN864p13YxvAtGUlQ+KgRL+8Sg45Z6vxo= -cloud.google.com/go/auth v0.8.1/go.mod h1:qGVp/Y3kDRSDZ5gFD/XPUfYQ9xW1iI7q8RIRoCyBbJc= -cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI= -cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I= +cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= +cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= +cloud.google.com/go/auth v0.9.1 h1:+pMtLEV2k0AXKvs/tGZojuj6QaioxfUjOpMsG5Gtx+w= +cloud.google.com/go/auth v0.9.1/go.mod h1:Sw8ocT5mhhXxFklyhT12Eiy0ed6tTrPMCJjSI8KhYLk= +cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= +cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -40,6 +40,7 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -66,7 +67,8 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= @@ -81,8 +83,8 @@ go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -93,8 +95,8 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= @@ -107,12 +109,12 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -126,20 +128,21 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf h1:OqdXDEakZCVtDiZTjcxfwbHPCT11ycCEsTKesBVKvyY= -google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:mCr1K1c8kX+1iSBREvU3Juo11CB+QOEWxbRS01wWl5M= -google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f h1:b1Ln/PG8orm0SsBbHZWke8dDp2lrCD4jSmfglFpTZbk= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20240730163845-b1a4ccb954bf h1:T4tsZBlZYXK3j40sQNP5MBO32I+rn6ypV1PpklsiV8k= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:5/MT647Cn/GGhwTpXC7QqcaR5Cnee4v4MKCU1/nwnIQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto v0.0.0-20240823204242-4ba0660f739c h1:TYOEhrQMrNDTAd2rX9m+WgGr8Ku6YNuj1D7OX6rWSok= +google.golang.org/genproto v0.0.0-20240823204242-4ba0660f739c/go.mod h1:2rC5OendXvZ8wGEo/cSLheztrZDZaSoHanUcd1xtZnw= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240823204242-4ba0660f739c h1:5SFTbgH011A1/MostoGp5314PMnSH9ZLxZX/xynmp64= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240823204242-4ba0660f739c/go.mod h1:gQizMG9jZ0L2ADJaM+JdZV4yTCON/CQpnHRPoM+54w4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c h1:Kqjm4WpoWvwhMPcrAczoTyMySQmYa9Wy2iL6Con4zn8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/go.work b/go.work index 151d410e0bf..6ac9264e8cd 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.20 +go 1.21 use ( . diff --git a/go.work.sum b/go.work.sum index d6ff0f9571f..676cd54b394 100644 --- a/go.work.sum +++ b/go.work.sum @@ -3,29 +3,54 @@ cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVqux cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/accessapproval v1.7.5/go.mod h1:g88i1ok5dvQ9XJsxpUInWWvUBrIZhyPDPbk4T01OoJ0= +cloud.google.com/go/accessapproval v1.7.11/go.mod h1:KGK3+CLDWm4BvjN0wFtZqdFUGhxlTvTF6PhAwQJGL4M= cloud.google.com/go/accesscontextmanager v1.8.5/go.mod h1:TInEhcZ7V9jptGNqN3EzZ5XMhT6ijWxTGjzyETwmL0Q= +cloud.google.com/go/accesscontextmanager v1.8.11/go.mod h1:nwPysISS3KR5qXipAU6cW/UbDavDdTBBgPohbkhGSok= cloud.google.com/go/aiplatform v1.60.0/go.mod h1:eTlGuHOahHprZw3Hio5VKmtThIOak5/qy6pzdsqcQnM= +cloud.google.com/go/aiplatform v1.68.0/go.mod h1:105MFA3svHjC3Oazl7yjXAmIR89LKhRAeNdnDKJczME= cloud.google.com/go/analytics v0.23.0/go.mod h1:YPd7Bvik3WS95KBok2gPXDqQPHy08TsCQG6CdUCb+u0= +cloud.google.com/go/analytics v0.23.6/go.mod h1:cFz5GwWHrWQi8OHKP9ep3Z4pvHgGcG9lPnFQ+8kXsNo= cloud.google.com/go/apigateway v1.6.5/go.mod h1:6wCwvYRckRQogyDDltpANi3zsCDl6kWi0b4Je+w2UiI= +cloud.google.com/go/apigateway v1.6.11/go.mod h1:4KsrYHn/kSWx8SNUgizvaz+lBZ4uZfU7mUDsGhmkWfM= cloud.google.com/go/apigeeconnect v1.6.5/go.mod h1:MEKm3AiT7s11PqTfKE3KZluZA9O91FNysvd3E6SJ6Ow= +cloud.google.com/go/apigeeconnect v1.6.11/go.mod h1:iMQLTeKxtKL+sb0D+pFlS/TO6za2IUOh/cwMEtn/4g0= cloud.google.com/go/apigeeregistry v0.8.3/go.mod h1:aInOWnqF4yMQx8kTjDqHNXjZGh/mxeNlAf52YqtASUs= +cloud.google.com/go/apigeeregistry v0.8.9/go.mod h1:4XivwtSdfSO16XZdMEQDBCMCWDp3jkCBRhVgamQfLSA= cloud.google.com/go/appengine v1.8.5/go.mod h1:uHBgNoGLTS5di7BvU25NFDuKa82v0qQLjyMJLuPQrVo= +cloud.google.com/go/appengine v1.8.11/go.mod h1:xET3coaDUj+OP4TgnZlgQ+rG2R9fG2nblya13czP56Q= cloud.google.com/go/area120 v0.8.5/go.mod h1:BcoFCbDLZjsfe4EkCnEq1LKvHSK0Ew/zk5UFu6GMyA0= +cloud.google.com/go/area120 v0.8.11/go.mod h1:VBxJejRAJqeuzXQBbh5iHBYUkIjZk5UzFZLCXmzap2o= cloud.google.com/go/artifactregistry v1.14.7/go.mod h1:0AUKhzWQzfmeTvT4SjfI4zjot72EMfrkvL9g9aRjnnM= +cloud.google.com/go/artifactregistry v1.14.13/go.mod h1:zQ/T4xoAFPtcxshl+Q4TJBgsy7APYR/BLd2z3xEAqRA= cloud.google.com/go/asset v1.17.2/go.mod h1:SVbzde67ehddSoKf5uebOD1sYw8Ab/jD/9EIeWg99q4= +cloud.google.com/go/asset v1.19.5/go.mod h1:sqyLOYaLLfc4ACcn3YxqHno+J7lRt9NJTdO50zCUcY0= cloud.google.com/go/assuredworkloads v1.11.5/go.mod h1:FKJ3g3ZvkL2D7qtqIGnDufFkHxwIpNM9vtmhvt+6wqk= +cloud.google.com/go/assuredworkloads v1.11.11/go.mod h1:vaYs6+MHqJvLKYgZBOsuuOhBgNNIguhRU0Kt7JTGcnI= cloud.google.com/go/automl v1.13.5/go.mod h1:MDw3vLem3yh+SvmSgeYUmUKqyls6NzSumDm9OJ3xJ1Y= +cloud.google.com/go/automl v1.13.11/go.mod h1:oMJdXRDOVC+Eq3PnGhhxSut5Hm9TSyVx1aLEOgerOw8= cloud.google.com/go/baremetalsolution v1.2.4/go.mod h1:BHCmxgpevw9IEryE99HbYEfxXkAEA3hkMJbYYsHtIuY= +cloud.google.com/go/baremetalsolution v1.2.10/go.mod h1:eO2c2NMRy5ytcNPhG78KPsWGNsX5W/tUsCOWmYihx6I= cloud.google.com/go/batch v1.8.0/go.mod h1:k8V7f6VE2Suc0zUM4WtoibNrA6D3dqBpB+++e3vSGYc= +cloud.google.com/go/batch v1.9.2/go.mod h1:smqwS4sleDJVAEzBt/TzFfXLktmWjFNugGDWl8coKX4= cloud.google.com/go/beyondcorp v1.0.4/go.mod h1:Gx8/Rk2MxrvWfn4WIhHIG1NV7IBfg14pTKv1+EArVcc= +cloud.google.com/go/beyondcorp v1.0.10/go.mod h1:G09WxvxJASbxbrzaJUMVvNsB1ZiaKxpbtkjiFtpDtbo= cloud.google.com/go/bigquery v1.59.1/go.mod h1:VP1UJYgevyTwsV7desjzNzDND5p6hZB+Z8gZJN1GQUc= +cloud.google.com/go/bigquery v1.62.0/go.mod h1:5ee+ZkF1x/ntgCsFQJAQTM3QkAZOecfCmvxhkJsWRSA= +cloud.google.com/go/bigtable v1.27.2-0.20240730134218-123c88616251/go.mod h1:avmXcmxVbLJAo9moICRYMgDyTTPoV0MA0lHKnyqV4fQ= cloud.google.com/go/billing v1.18.2/go.mod h1:PPIwVsOOQ7xzbADCwNe8nvK776QpfrOAUkvKjCUcpSE= +cloud.google.com/go/billing v1.18.9/go.mod h1:bKTnh8MBfCMUT1fzZ936CPN9rZG7ZEiHB2J3SjIjByc= cloud.google.com/go/binaryauthorization v1.8.1/go.mod h1:1HVRyBerREA/nhI7yLang4Zn7vfNVA3okoAR9qYQJAQ= +cloud.google.com/go/binaryauthorization v1.8.7/go.mod h1:cRj4teQhOme5SbWQa96vTDATQdMftdT5324BznxANtg= cloud.google.com/go/certificatemanager v1.7.5/go.mod h1:uX+v7kWqy0Y3NG/ZhNvffh0kuqkKZIXdvlZRO7z0VtM= +cloud.google.com/go/certificatemanager v1.8.5/go.mod h1:r2xINtJ/4xSz85VsqvjY53qdlrdCjyniib9Jp98ZKKM= cloud.google.com/go/channel v1.17.5/go.mod h1:FlpaOSINDAXgEext0KMaBq/vwpLMkkPAw9b2mApQeHc= +cloud.google.com/go/channel v1.17.11/go.mod h1:gjWCDBcTGQce/BSMoe2lAqhlq0dIRiZuktvBKXUawp0= cloud.google.com/go/cloudbuild v1.15.1/go.mod h1:gIofXZSu+XD2Uy+qkOrGKEx45zd7s28u/k8f99qKals= +cloud.google.com/go/cloudbuild v1.16.5/go.mod h1:HXLpZ8QeYZgmDIWpbl9Gs22p6o6uScgQ/cV9HF9cIZU= cloud.google.com/go/clouddms v1.7.4/go.mod h1:RdrVqoFG9RWI5AvZ81SxJ/xvxPdtcRhFotwdE79DieY= +cloud.google.com/go/clouddms v1.7.10/go.mod h1:PzHELq0QDyA7VaD9z6mzh2mxeBz4kM6oDe8YxMxd4RA= cloud.google.com/go/cloudtasks v1.12.6/go.mod h1:b7c7fe4+TJsFZfDyzO51F7cjq7HLUlRi/KZQLQjDsaY= +cloud.google.com/go/cloudtasks v1.12.12/go.mod h1:8UmM+duMrQpzzRREo0i3x3TrFjsgI/3FQw3664/JblA= cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= @@ -36,106 +61,201 @@ cloud.google.com/go/compute v1.27.0 h1:EGawh2RUnfHT5g8f/FX3Ds6KZuIBC77hZoDrBvEZw cloud.google.com/go/compute v1.27.1 h1:0WbBLIPNANheCRZ4h8QhgzjN53KMutbiVBOLtPiVzBU= cloud.google.com/go/compute v1.27.2 h1:5cE5hdrwJV/92ravlwIFRGnyH9CpLGhh4N0ZDVTU+BA= cloud.google.com/go/compute v1.27.4 h1:XM8ulx6crjdl09XBfji7viFgZOEQuIxBwKmjRH9Rtmc= +cloud.google.com/go/compute v1.27.4/go.mod h1:7JZS+h21ERAGHOy5qb7+EPyXlQwzshzrx1x6L9JhTqU= +cloud.google.com/go/compute v1.27.5 h1:iii9Z+FhEeZ5cUkGOEqU+GM7MJSyxMgbE7H7j+JndYY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/contactcenterinsights v1.13.0/go.mod h1:ieq5d5EtHsu8vhe2y3amtZ+BE+AQwX5qAy7cpo0POsI= +cloud.google.com/go/contactcenterinsights v1.13.6/go.mod h1:mL+DbN3pMQGaAbDC4wZhryLciwSwHf5Tfk4Itr72Zyk= cloud.google.com/go/container v1.31.0/go.mod h1:7yABn5s3Iv3lmw7oMmyGbeV6tQj86njcTijkkGuvdZA= +cloud.google.com/go/container v1.38.0/go.mod h1:U0uPBvkVWOJGY/0qTVuPS7NeafFEUsHSPqT5pB8+fCY= cloud.google.com/go/containeranalysis v0.11.4/go.mod h1:cVZT7rXYBS9NG1rhQbWL9pWbXCKHWJPYraE8/FTSYPE= +cloud.google.com/go/containeranalysis v0.12.1/go.mod h1:+/lcJIQSFt45TC0N9Nq7/dPbl0isk6hnC4EvBBqyXsM= cloud.google.com/go/datacatalog v1.19.3/go.mod h1:ra8V3UAsciBpJKQ+z9Whkxzxv7jmQg1hfODr3N3YPJ4= +cloud.google.com/go/datacatalog v1.20.5/go.mod h1:DB0QWF9nelpsbB0eR/tA0xbHZZMvpoFD1XFy3Qv/McI= cloud.google.com/go/dataflow v0.9.5/go.mod h1:udl6oi8pfUHnL0z6UN9Lf9chGqzDMVqcYTcZ1aPnCZQ= +cloud.google.com/go/dataflow v0.9.11/go.mod h1:CCLufd7I4pPfyp54qMgil/volrL2ZKYjXeYLfQmBGJs= cloud.google.com/go/dataform v0.9.2/go.mod h1:S8cQUwPNWXo7m/g3DhWHsLBoufRNn9EgFrMgne2j7cI= +cloud.google.com/go/dataform v0.9.8/go.mod h1:cGJdyVdunN7tkeXHPNosuMzmryx55mp6cInYBgxN3oA= cloud.google.com/go/datafusion v1.7.5/go.mod h1:bYH53Oa5UiqahfbNK9YuYKteeD4RbQSNMx7JF7peGHc= +cloud.google.com/go/datafusion v1.7.11/go.mod h1:aU9zoBHgYmoPp4dzccgm/Gi4xWDMXodSZlNZ4WNeptw= cloud.google.com/go/datalabeling v0.8.5/go.mod h1:IABB2lxQnkdUbMnQaOl2prCOfms20mcPxDBm36lps+s= +cloud.google.com/go/datalabeling v0.8.11/go.mod h1:6IGUV3z7hlkAU5ndKVshv/8z+7pxE+k0qXsEjyzO1Xg= cloud.google.com/go/dataplex v1.14.2/go.mod h1:0oGOSFlEKef1cQeAHXy4GZPB/Ife0fz/PxBf+ZymA2U= +cloud.google.com/go/dataplex v1.18.2/go.mod h1:NuBpJJMGGQn2xctX+foHEDKRbizwuiHJamKvvSteY3Q= cloud.google.com/go/dataproc/v2 v2.4.0/go.mod h1:3B1Ht2aRB8VZIteGxQS/iNSJGzt9+CA0WGnDVMEm7Z4= +cloud.google.com/go/dataproc/v2 v2.5.3/go.mod h1:RgA5QR7v++3xfP7DlgY3DUmoDSTaaemPe0ayKrQfyeg= cloud.google.com/go/dataqna v0.8.5/go.mod h1:vgihg1mz6n7pb5q2YJF7KlXve6tCglInd6XO0JGOlWM= +cloud.google.com/go/dataqna v0.8.11/go.mod h1:74Icl1oFKKZXPd+W7YDtqJLa+VwLV6wZ+UF+sHo2QZQ= cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= +cloud.google.com/go/datastore v1.17.1/go.mod h1:mtzZ2HcVtz90OVrEXXGDc2pO4NM1kiBQy8YV4qGe0ZM= cloud.google.com/go/datastream v1.10.4/go.mod h1:7kRxPdxZxhPg3MFeCSulmAJnil8NJGGvSNdn4p1sRZo= +cloud.google.com/go/datastream v1.10.10/go.mod h1:NqchuNjhPlISvWbk426/AU/S+Kgv7srlID9P5XOAbtg= cloud.google.com/go/deploy v1.17.1/go.mod h1:SXQyfsXrk0fBmgBHRzBjQbZhMfKZ3hMQBw5ym7MN/50= +cloud.google.com/go/deploy v1.20.0/go.mod h1:PaOfS47VrvmYnxG5vhHg0KU60cKeWcqyLbMBjxS8DW8= cloud.google.com/go/dialogflow v1.49.0/go.mod h1:dhVrXKETtdPlpPhE7+2/k4Z8FRNUp6kMV3EW3oz/fe0= +cloud.google.com/go/dialogflow v1.55.0/go.mod h1:0u0hSlJiFpMkMpMNoFrQETwDjaRm8Q8hYKv+jz5JeRA= cloud.google.com/go/dlp v1.11.2/go.mod h1:9Czi+8Y/FegpWzgSfkRlyz+jwW6Te9Rv26P3UfU/h/w= +cloud.google.com/go/dlp v1.15.0/go.mod h1:LtPZxZAenBXKzvWIOB2hdHIXuEcK0wW0En8//u+/nNA= cloud.google.com/go/documentai v1.25.0/go.mod h1:ftLnzw5VcXkLItp6pw1mFic91tMRyfv6hHEY5br4KzY= +cloud.google.com/go/documentai v1.30.5/go.mod h1:5ajlDvaPyl9tc+K/jZE8WtYIqSXqAD33Z1YAYIjfad4= cloud.google.com/go/domains v0.9.5/go.mod h1:dBzlxgepazdFhvG7u23XMhmMKBjrkoUNaw0A8AQB55Y= +cloud.google.com/go/domains v0.9.11/go.mod h1:efo5552kUyxsXEz30+RaoIS2lR7tp3M/rhiYtKXkhkk= cloud.google.com/go/edgecontainer v1.1.5/go.mod h1:rgcjrba3DEDEQAidT4yuzaKWTbkTI5zAMu3yy6ZWS0M= +cloud.google.com/go/edgecontainer v1.2.5/go.mod h1:OAb6tElD3F3oBujFAup14PKOs9B/lYobTb6LARmoACY= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/errorreporting v0.3.1/go.mod h1:6xVQXU1UuntfAf+bVkFk6nld41+CPyF2NSPCyXE3Ztk= cloud.google.com/go/essentialcontacts v1.6.6/go.mod h1:XbqHJGaiH0v2UvtuucfOzFXN+rpL/aU5BCZLn4DYl1Q= +cloud.google.com/go/essentialcontacts v1.6.12/go.mod h1:UGhWTIYewH8Ma4wDRJp8cMAHUCeAOCKsuwd6GLmmQLc= cloud.google.com/go/eventarc v1.13.4/go.mod h1:zV5sFVoAa9orc/52Q+OuYUG9xL2IIZTbbuTHC6JSY8s= +cloud.google.com/go/eventarc v1.13.10/go.mod h1:KlCcOMApmUaqOEZUpZRVH+p0nnnsY1HaJB26U4X5KXE= cloud.google.com/go/filestore v1.8.1/go.mod h1:MbN9KcaM47DRTIuLfQhJEsjaocVebNtNQhSLhKCF5GM= +cloud.google.com/go/filestore v1.8.7/go.mod h1:dKfyH0YdPAKdYHqAR/bxZeil85Y5QmrEVQwIYuRjcXI= cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ= +cloud.google.com/go/firestore v1.16.0/go.mod h1:+22v/7p+WNBSQwdSwP57vz47aZiY+HrDkrOsJNhk7rg= cloud.google.com/go/functions v1.16.0/go.mod h1:nbNpfAG7SG7Duw/o1iZ6ohvL7mc6MapWQVpqtM29n8k= +cloud.google.com/go/functions v1.16.6/go.mod h1:wOzZakhMueNQaBUJdf0yjsJIe0GBRu+ZTvdSTzqHLs0= cloud.google.com/go/gkebackup v1.3.5/go.mod h1:KJ77KkNN7Wm1LdMopOelV6OodM01pMuK2/5Zt1t4Tvc= +cloud.google.com/go/gkebackup v1.5.4/go.mod h1:V+llvHlRD0bCyrkYaAMJX+CHralceQcaOWjNQs8/Ymw= cloud.google.com/go/gkeconnect v0.8.5/go.mod h1:LC/rS7+CuJ5fgIbXv8tCD/mdfnlAadTaUufgOkmijuk= +cloud.google.com/go/gkeconnect v0.8.11/go.mod h1:ejHv5ehbceIglu1GsMwlH0nZpTftjxEY6DX7tvaM8gA= cloud.google.com/go/gkehub v0.14.5/go.mod h1:6bzqxM+a+vEH/h8W8ec4OJl4r36laxTs3A/fMNHJ0wA= +cloud.google.com/go/gkehub v0.14.11/go.mod h1:CsmDJ4qbBnSPkoBltEubK6qGOjG0xNfeeT5jI5gCnRQ= cloud.google.com/go/gkemulticloud v1.1.1/go.mod h1:C+a4vcHlWeEIf45IB5FFR5XGjTeYhF83+AYIpTy4i2Q= +cloud.google.com/go/gkemulticloud v1.2.4/go.mod h1:PjTtoKLQpIRztrL+eKQw8030/S4c7rx/WvHydDJlpGE= cloud.google.com/go/gsuiteaddons v1.6.5/go.mod h1:Lo4P2IvO8uZ9W+RaC6s1JVxo42vgy+TX5a6hfBZ0ubs= +cloud.google.com/go/gsuiteaddons v1.6.11/go.mod h1:U7mk5PLBzDpHhgHv5aJkuvLp9RQzZFpa8hgWAB+xVIk= cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= +cloud.google.com/go/iam v1.1.12/go.mod h1:9LDX8J7dN5YRyzVHxwQzrQs9opFFqn0Mxs9nAeB+Hhg= cloud.google.com/go/iap v1.9.4/go.mod h1:vO4mSq0xNf/Pu6E5paORLASBwEmphXEjgCFg7aeNu1w= +cloud.google.com/go/iap v1.9.10/go.mod h1:pO0FEirrhMOT1H0WVwpD5dD9r3oBhvsunyBQtNXzzc0= cloud.google.com/go/ids v1.4.5/go.mod h1:p0ZnyzjMWxww6d2DvMGnFwCsSxDJM666Iir1bK1UuBo= +cloud.google.com/go/ids v1.4.11/go.mod h1:+ZKqWELpJm8WcRRsSvKZWUdkriu4A3XsLLzToTv3418= cloud.google.com/go/iot v1.7.5/go.mod h1:nq3/sqTz3HGaWJi1xNiX7F41ThOzpud67vwk0YsSsqs= +cloud.google.com/go/iot v1.7.11/go.mod h1:0vZJOqFy9kVLbUXwTP95e0dWHakfR4u5IWqsKMGIfHk= cloud.google.com/go/kms v1.15.7/go.mod h1:ub54lbsa6tDkUwnu4W7Yt1aAIFLnspgh0kPGToDukeI= +cloud.google.com/go/kms v1.18.4/go.mod h1:SG1bgQ3UWW6/KdPo9uuJnzELXY5YTTMJtDYvajiQ22g= cloud.google.com/go/language v1.12.3/go.mod h1:evFX9wECX6mksEva8RbRnr/4wi/vKGYnAJrTRXU8+f8= +cloud.google.com/go/language v1.12.9/go.mod h1:B9FbD17g1EkilctNGUDAdSrBHiFOlKNErLljO7jplDU= cloud.google.com/go/lifesciences v0.9.5/go.mod h1:OdBm0n7C0Osh5yZB7j9BXyrMnTRGBJIZonUMxo5CzPw= +cloud.google.com/go/lifesciences v0.9.11/go.mod h1:NMxu++FYdv55TxOBEvLIhiAvah8acQwXsz79i9l9/RY= cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= +cloud.google.com/go/logging v1.11.0/go.mod h1:5LDiJC/RxTt+fHc1LAt20R9TKiUTReDg6RuuFOZ67+A= cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= +cloud.google.com/go/longrunning v0.5.11/go.mod h1:rDn7//lmlfWV1Dx6IB4RatCPenTwwmqXuiP0/RgoEO4= cloud.google.com/go/managedidentities v1.6.5/go.mod h1:fkFI2PwwyRQbjLxlm5bQ8SjtObFMW3ChBGNqaMcgZjI= +cloud.google.com/go/managedidentities v1.6.11/go.mod h1:df+8oZ1D4Eri+NrcpuiR5Hd6MGgiMqn0ZCzNmBYPS0A= cloud.google.com/go/maps v1.6.4/go.mod h1:rhjqRy8NWmDJ53saCfsXQ0LKwBHfi6OSh5wkq6BaMhI= +cloud.google.com/go/maps v1.11.5/go.mod h1:MOS/NN0L6b7Kumr8bLux9XTpd8+D54DYxBMUjq+XfXs= cloud.google.com/go/mediatranslation v0.8.5/go.mod h1:y7kTHYIPCIfgyLbKncgqouXJtLsU+26hZhHEEy80fSs= +cloud.google.com/go/mediatranslation v0.8.11/go.mod h1:3sNEm0fx61eHk7rfzBzrljVV9XKr931xI3OFacQBVFg= cloud.google.com/go/memcache v1.10.5/go.mod h1:/FcblbNd0FdMsx4natdj+2GWzTq+cjZvMa1I+9QsuMA= +cloud.google.com/go/memcache v1.10.11/go.mod h1:ubJ7Gfz/xQawQY5WO5pht4Q0dhzXBFeEszAeEJnwBHU= cloud.google.com/go/metastore v1.13.4/go.mod h1:FMv9bvPInEfX9Ac1cVcRXp8EBBQnBcqH6gz3KvJ9BAE= +cloud.google.com/go/metastore v1.13.10/go.mod h1:RPhMnBxUmTLT1fN7fNbPqtH5EoGHueDxubmJ1R1yT84= cloud.google.com/go/monitoring v1.18.0/go.mod h1:c92vVBCeq/OB4Ioyo+NbN2U7tlg5ZH41PZcdvfc+Lcg= +cloud.google.com/go/monitoring v1.20.3/go.mod h1:GPIVIdNznIdGqEjtRKQWTLcUeRnPjZW85szouimiczU= cloud.google.com/go/networkconnectivity v1.14.4/go.mod h1:PU12q++/IMnDJAB+3r+tJtuCXCfwfN+C6Niyj6ji1Po= +cloud.google.com/go/networkconnectivity v1.14.10/go.mod h1:f7ZbGl4CV08DDb7lw+NmMXQTKKjMhgCEEwFbEukWuOY= cloud.google.com/go/networkmanagement v1.9.4/go.mod h1:daWJAl0KTFytFL7ar33I6R/oNBH8eEOX/rBNHrC/8TA= +cloud.google.com/go/networkmanagement v1.13.6/go.mod h1:WXBijOnX90IFb6sberjnGrVtZbgDNcPDUYOlGXmG8+4= cloud.google.com/go/networksecurity v0.9.5/go.mod h1:KNkjH/RsylSGyyZ8wXpue8xpCEK+bTtvof8SBfIhMG8= +cloud.google.com/go/networksecurity v0.9.11/go.mod h1:4xbpOqCwplmFgymAjPFM6ZIplVC6+eQ4m7sIiEq9oJA= cloud.google.com/go/notebooks v1.11.3/go.mod h1:0wQyI2dQC3AZyQqWnRsp+yA+kY4gC7ZIVP4Qg3AQcgo= +cloud.google.com/go/notebooks v1.11.9/go.mod h1:JmnRX0eLgHRJiyxw8HOgumW9iRajImZxr7r75U16uXw= cloud.google.com/go/optimization v1.6.3/go.mod h1:8ve3svp3W6NFcAEFr4SfJxrldzhUl4VMUJmhrqVKtYA= +cloud.google.com/go/optimization v1.6.9/go.mod h1:mcvkDy0p4s5k7iSaiKrwwpN0IkteHhGmuW5rP9nXA5M= cloud.google.com/go/orchestration v1.8.5/go.mod h1:C1J7HesE96Ba8/hZ71ISTV2UAat0bwN+pi85ky38Yq8= +cloud.google.com/go/orchestration v1.9.6/go.mod h1:gQvdIsHESZJigimnbUA8XLbYeFlSg/z+A7ppds5JULg= cloud.google.com/go/orgpolicy v1.12.1/go.mod h1:aibX78RDl5pcK3jA8ysDQCFkVxLj3aOQqrbBaUL2V5I= +cloud.google.com/go/orgpolicy v1.12.7/go.mod h1:Os3GlUFRPf1UxOHTup5b70BARnhHeQNNVNZzJXPbWYI= cloud.google.com/go/osconfig v1.12.5/go.mod h1:D9QFdxzfjgw3h/+ZaAb5NypM8bhOMqBzgmbhzWViiW8= +cloud.google.com/go/osconfig v1.13.2/go.mod h1:eupylkWQJCwSIEMkpVR4LqpgKkQi0mD4m1DzNCgpQso= cloud.google.com/go/oslogin v1.13.1/go.mod h1:vS8Sr/jR7QvPWpCjNqy6LYZr5Zs1e8ZGW/KPn9gmhws= +cloud.google.com/go/oslogin v1.13.7/go.mod h1:xq027cL0fojpcEcpEQdWayiDn8tIx3WEFYMM6+q7U+E= cloud.google.com/go/phishingprotection v0.8.5/go.mod h1:g1smd68F7mF1hgQPuYn3z8HDbNre8L6Z0b7XMYFmX7I= +cloud.google.com/go/phishingprotection v0.8.11/go.mod h1:Mge0cylqVFs+D0EyxlsTOJ1Guf3qDgrztHzxZqkhRQM= cloud.google.com/go/policytroubleshooter v1.10.3/go.mod h1:+ZqG3agHT7WPb4EBIRqUv4OyIwRTZvsVDHZ8GlZaoxk= +cloud.google.com/go/policytroubleshooter v1.10.9/go.mod h1:X8HEPVBWz8E+qwI/QXnhBLahEHdcuPO3M9YvSj0LDek= cloud.google.com/go/privatecatalog v0.9.5/go.mod h1:fVWeBOVe7uj2n3kWRGlUQqR/pOd450J9yZoOECcQqJk= +cloud.google.com/go/privatecatalog v0.9.11/go.mod h1:awEF2a8M6UgoqVJcF/MthkF8SSo6OoWQ7TtPNxUlljY= cloud.google.com/go/pubsub v1.36.1/go.mod h1:iYjCa9EzWOoBiTdd4ps7QoMtMln5NwaZQpK1hbRfBDE= +cloud.google.com/go/pubsub v1.40.0/go.mod h1:BVJI4sI2FyXp36KFKvFwcfDRDfR8MiLT8mMhmIhdAeA= cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= +cloud.google.com/go/pubsublite v1.8.2/go.mod h1:4r8GSa9NznExjuLPEJlF1VjOPOpgf3IT6k8x/YgaOPI= cloud.google.com/go/recaptchaenterprise/v2 v2.9.2/go.mod h1:trwwGkfhCmp05Ll5MSJPXY7yvnO0p4v3orGANAFHAuU= +cloud.google.com/go/recaptchaenterprise/v2 v2.14.2/go.mod h1:MwPgdgvBkE46aWuuXeBTCB8hQJ88p+CpXInROZYCTkc= cloud.google.com/go/recommendationengine v0.8.5/go.mod h1:A38rIXHGFvoPvmy6pZLozr0g59NRNREz4cx7F58HAsQ= +cloud.google.com/go/recommendationengine v0.8.11/go.mod h1:cEkU4tCXAF88a4boMFZym7U7uyxvVwcQtKzS85IbQio= cloud.google.com/go/recommender v1.12.1/go.mod h1:gf95SInWNND5aPas3yjwl0I572dtudMhMIG4ni8nr+0= +cloud.google.com/go/recommender v1.12.7/go.mod h1:lG8DVtczLltWuaCv4IVpNphONZTzaCC9KdxLYeZM5G4= cloud.google.com/go/redis v1.14.2/go.mod h1:g0Lu7RRRz46ENdFKQ2EcQZBAJ2PtJHJLuiiRuEXwyQw= +cloud.google.com/go/redis v1.16.4/go.mod h1:unCVfLP5eFrVhGLDnb7IaSaWxuZ+7cBgwwBwbdG9m9w= cloud.google.com/go/resourcemanager v1.9.5/go.mod h1:hep6KjelHA+ToEjOfO3garMKi/CLYwTqeAw7YiEI9x8= +cloud.google.com/go/resourcemanager v1.9.11/go.mod h1:SbNAbjVLoi2rt9G74bEYb3aw1iwvyWPOJMnij4SsmHA= cloud.google.com/go/resourcesettings v1.6.5/go.mod h1:WBOIWZraXZOGAgoR4ukNj0o0HiSMO62H9RpFi9WjP9I= +cloud.google.com/go/resourcesettings v1.7.4/go.mod h1:seBdLuyeq+ol2u9G2+74GkSjQaxaBWF+vVb6mVzQFG0= cloud.google.com/go/retail v1.16.0/go.mod h1:LW7tllVveZo4ReWt68VnldZFWJRzsh9np+01J9dYWzE= +cloud.google.com/go/retail v1.17.4/go.mod h1:oPkL1FzW7D+v/hX5alYIx52ro2FY/WPAviwR1kZZTMs= cloud.google.com/go/run v1.3.4/go.mod h1:FGieuZvQ3tj1e9GnzXqrMABSuir38AJg5xhiYq+SF3o= +cloud.google.com/go/run v1.4.0/go.mod h1:4G9iHLjdOC+CQ0CzA0+6nLeR6NezVPmlj+GULmb0zE4= cloud.google.com/go/scheduler v1.10.6/go.mod h1:pe2pNCtJ+R01E06XCDOJs1XvAMbv28ZsQEbqknxGOuE= +cloud.google.com/go/scheduler v1.10.12/go.mod h1:6DRtOddMWJ001HJ6MS148rtLSh/S2oqd2hQC3n5n9fQ= cloud.google.com/go/secretmanager v1.11.5/go.mod h1:eAGv+DaCHkeVyQi0BeXgAHOU0RdrMeZIASKc+S7VqH4= +cloud.google.com/go/secretmanager v1.13.5/go.mod h1:/OeZ88l5Z6nBVilV0SXgv6XJ243KP2aIhSWRMrbvDCQ= cloud.google.com/go/security v1.15.5/go.mod h1:KS6X2eG3ynWjqcIX976fuToN5juVkF6Ra6c7MPnldtc= +cloud.google.com/go/security v1.17.4/go.mod h1:KMuDJH+sEB3KTODd/tLJ7kZK+u2PQt+Cfu0oAxzIhgo= cloud.google.com/go/securitycenter v1.24.4/go.mod h1:PSccin+o1EMYKcFQzz9HMMnZ2r9+7jbc+LvPjXhpwcU= +cloud.google.com/go/securitycenter v1.33.1/go.mod h1:jeFisdYUWHr+ig72T4g0dnNCFhRwgwGoQV6GFuEwafw= cloud.google.com/go/servicedirectory v1.11.4/go.mod h1:Bz2T9t+/Ehg6x+Y7Ycq5xiShYLD96NfEsWNHyitj1qM= +cloud.google.com/go/servicedirectory v1.11.11/go.mod h1:pnynaftaj9LmRLIc6t3r7r7rdCZZKKxui/HaF/RqYfs= cloud.google.com/go/shell v1.7.5/go.mod h1:hL2++7F47/IfpfTO53KYf1EC+F56k3ThfNEXd4zcuiE= +cloud.google.com/go/shell v1.7.11/go.mod h1:SywZHWac7onifaT9m9MmegYp3GgCLm+tgk+w2lXK8vg= cloud.google.com/go/spanner v1.57.0/go.mod h1:aXQ5QDdhPRIqVhYmnkAdwPYvj/DRN0FguclhEWw+jOo= +cloud.google.com/go/spanner v1.65.0/go.mod h1:dQGB+w5a67gtyE3qSKPPxzniedrnAmV6tewQeBY7Hxs= cloud.google.com/go/speech v1.21.1/go.mod h1:E5GHZXYQlkqWQwY5xRSLHw2ci5NMQNG52FfMU1aZrIA= +cloud.google.com/go/speech v1.24.0/go.mod h1:HcVyIh5jRXM5zDMcbFCW+DF2uK/MSGN6Rastt6bj1ic= cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/storage v1.37.0/go.mod h1:i34TiT2IhiNDmcj65PqwCjcoUX7Z5pLzS8DEmoiFq1k= +cloud.google.com/go/storage v1.41.0/go.mod h1:J1WCa/Z2FcgdEDuPUY8DxT5I+d9mFKsCepp5vR6Sq80= cloud.google.com/go/storagetransfer v1.10.4/go.mod h1:vef30rZKu5HSEf/x1tK3WfWrL0XVoUQN/EPDRGPzjZs= +cloud.google.com/go/storagetransfer v1.10.10/go.mod h1:8+nX+WgQ2ZJJnK8e+RbK/zCXk8T7HdwyQAJeY7cEcm0= cloud.google.com/go/talent v1.6.6/go.mod h1:y/WQDKrhVz12WagoarpAIyKKMeKGKHWPoReZ0g8tseQ= +cloud.google.com/go/talent v1.6.12/go.mod h1:nT9kNVuJhZX2QgqKZS6t6eCWZs5XEBYRBv6bIMnPmo4= cloud.google.com/go/texttospeech v1.7.5/go.mod h1:tzpCuNWPwrNJnEa4Pu5taALuZL4QRRLcb+K9pbhXT6M= +cloud.google.com/go/texttospeech v1.7.11/go.mod h1:Ua125HU+WT2IkIo5MzQtuNpNEk72soShJQVdorZ1SAE= cloud.google.com/go/tpu v1.6.5/go.mod h1:P9DFOEBIBhuEcZhXi+wPoVy/cji+0ICFi4TtTkMHSSs= +cloud.google.com/go/tpu v1.6.11/go.mod h1:W0C4xaSj1Ay3VX/H96FRvLt2HDs0CgdRPVI4e7PoCDk= cloud.google.com/go/trace v1.10.5/go.mod h1:9hjCV1nGBCtXbAE4YK7OqJ8pmPYSxPA0I67JwRd5s3M= +cloud.google.com/go/trace v1.10.11/go.mod h1:fUr5L3wSXerNfT0f1bBg08W4axS2VbHGgYcfH4KuTXU= cloud.google.com/go/translate v1.10.1/go.mod h1:adGZcQNom/3ogU65N9UXHOnnSvjPwA/jKQUMnsYXOyk= +cloud.google.com/go/translate v1.10.7/go.mod h1:mH/+8tvcItuy1cOWqU+/Y3iFHgkVUObNIQYI/kiFFiY= cloud.google.com/go/video v1.20.4/go.mod h1:LyUVjyW+Bwj7dh3UJnUGZfyqjEto9DnrvTe1f/+QrW0= +cloud.google.com/go/video v1.22.0/go.mod h1:CxPshUNAb1ucnzbtruEHlAal9XY+SPG2cFqC/woJzII= cloud.google.com/go/videointelligence v1.11.5/go.mod h1:/PkeQjpRponmOerPeJxNPuxvi12HlW7Em0lJO14FC3I= +cloud.google.com/go/videointelligence v1.11.11/go.mod h1:dab2Ca3AXT6vNJmt3/6ieuquYRckpsActDekLcsd6dU= cloud.google.com/go/vision/v2 v2.8.0/go.mod h1:ocqDiA2j97pvgogdyhoxiQp2ZkDCyr0HWpicywGGRhU= +cloud.google.com/go/vision/v2 v2.8.6/go.mod h1:G3v0uovxCye3u369JfrHGY43H6u/IQ08x9dw5aVH8yY= cloud.google.com/go/vmmigration v1.7.5/go.mod h1:pkvO6huVnVWzkFioxSghZxIGcsstDvYiVCxQ9ZH3eYI= +cloud.google.com/go/vmmigration v1.7.11/go.mod h1:PmD1fDB0TEHGQR1tDZt9GEXFB9mnKKalLcTVRJKzcQA= cloud.google.com/go/vmwareengine v1.1.1/go.mod h1:nMpdsIVkUrSaX8UvmnBhzVzG7PPvNYc5BszcvIVudYs= +cloud.google.com/go/vmwareengine v1.2.0/go.mod h1:rPjCHu6hG9N8d6PhkoDWFkqL9xpbFY+ueVW+0pNFbZg= cloud.google.com/go/vpcaccess v1.7.5/go.mod h1:slc5ZRvvjP78c2dnL7m4l4R9GwL3wDLcpIWz6P/ziig= +cloud.google.com/go/vpcaccess v1.7.11/go.mod h1:a2cuAiSCI4TVK0Dt6/dRjf22qQvfY+podxst2VvAkcI= cloud.google.com/go/webrisk v1.9.5/go.mod h1:aako0Fzep1Q714cPEM5E+mtYX8/jsfegAuS8aivxy3U= +cloud.google.com/go/webrisk v1.9.11/go.mod h1:mK6M8KEO0ZI7VkrjCq3Tjzw4vYq+3c4DzlMUDVaiswE= cloud.google.com/go/websecurityscanner v1.6.5/go.mod h1:QR+DWaxAz2pWooylsBF854/Ijvuoa3FCyS1zBa1rAVQ= +cloud.google.com/go/websecurityscanner v1.6.11/go.mod h1:vhAZjksELSg58EZfUQ1BMExD+hxqpn0G0DuyCZQjiTg= cloud.google.com/go/workflows v1.12.4/go.mod h1:yQ7HUqOkdJK4duVtMeBCAOPiN1ZF1E9pAMX51vpwB/w= +cloud.google.com/go/workflows v1.12.10/go.mod h1:RcKqCiOmKs8wFUEf3EwWZPH5eHc7Oq0kamIyOUCk0IE= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -145,12 +265,16 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50/go.mod h1:5e1+Vvlzido69INQaVO6d87Qn543Xr6nooe9Kz7oBFM= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -159,7 +283,9 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -167,10 +293,15 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5 github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mmcloughlin/avo v0.5.0/go.mod h1:ChHFdoV7ql95Wi7vuq2YT1bwCJqiWdZrQ1im3VujLYM= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= @@ -181,6 +312,7 @@ go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzu go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -217,11 +349,13 @@ golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= @@ -269,4 +403,5 @@ google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJai google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/google-api-go-generator/gen.go b/google-api-go-generator/gen.go index b22c2268d52..1fc1a3f2d9d 100644 --- a/google-api-go-generator/gen.go +++ b/google-api-go-generator/gen.go @@ -1587,6 +1587,14 @@ func (s *Schema) writeSchemaStruct(api *API) { typ = "*" + typ } + // HACK(chrisdsmith) Hardcodes HttpBody.Data to the Go type "any" only + // for monitoring:v1 in order to avoid errors with JSON objects in the responses. + // (json: cannot unmarshal object into Go struct field HttpBody.data of type string) + // See https://github.com/googleapis/google-api-go-client/issues/2304 + if s.api.Name == "monitoring" && s.api.Version == "v1" && s.GoName() == "HttpBody" && pname == "Data" { + typ = "any" + } + s.api.pn(" %s %s `json:\"%s,omitempty%s\"`", pname, typ, p.p.Name, extraOpt) if firstFieldName == "" { firstFieldName = pname diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index 0ffd84a7183..fc4d0c77626 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -4201,6 +4201,53 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "Encounter-everything": { + "description": "Retrieves an Encounter resource and resources related to that Encounter. Implements the FHIR extended operation Encounter-everything ([DSTU2](http://hl7.org/implement/standards/fhir/DSTU2/encounter-operations.html#everything), [STU3](http://hl7.org/implement/standards/fhir/STU3/encounter-operations.html#everything), or [R4](https://hl7.org/implement/standards/fhir/R4/encounter-operation-everything.html). On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the operation. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead. The resources in scope for the response are: * The Encounter resource itself. * All the resources directly referenced by the Encounter resource, including attachments and binaries. * Resources directly referencing the Encounter resource that meet the inclusion criteria. The inclusion criteria are based on the membership rules in the Encounter Compartment definition ([DSTU2](http://hl7.org/fhir/DSTU2/compartment-encounter.html), [STU3](http://www.hl7.org/fhir/stu3/compartmentdefinition-encounter.html), [R4](http://hl7.org/fhir/R4/compartmentdefinition-encounter.html)), which details the eligible resource types and referencing search parameters. * Resources referencing to the Encounter resource through the \"http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter\" extension.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/Encounter/{EncounterId}/$everything", + "httpMethod": "GET", + "id": "healthcare.projects.locations.datasets.fhirStores.fhir.Encounter-everything", + "parameterOrder": [ + "name" + ], + "parameters": { + "_count": { + "description": "Optional. Maximum number of resources in a page. If not specified, 100 is used. May not be larger than 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "_page_token": { + "description": "Optional. Used to retrieve the next or previous page of results when using pagination. Set `_page_token` to the value of _page_token set in next or previous page links' url. Next and previous page are returned in the response bundle's links field, where `link.relation` is \"previous\" or \"next\". Omit `_page_token` if no previous request has been made.", + "location": "query", + "type": "string" + }, + "_since": { + "description": "Optional. If provided, only resources updated after this time are returned. The time uses the format YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00` or `2017-01-01T00:00:00Z`. The time must be specified to the second and include a time zone.", + "location": "query", + "type": "string" + }, + "_type": { + "description": "Optional. String of comma-delimited FHIR resource types. If provided, only resources of the specified resource type(s) are returned. Specifying multiple `_type` parameters isn't supported. For example, the result of `_type=Observation\u0026_type=Encounter` is undefined. Use `_type=Observation,Encounter` instead.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Name of the Encounter resource for which the information is required.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+/fhir/Encounter/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}/$everything", + "response": { + "$ref": "HttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-healthcare", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "Observation-lastn": { "description": "Retrieves the N most recent `Observation` resources for a subject matching search criteria specified as query parameters, grouped by `Observation.code`, sorted from most recent to oldest. Implements the FHIR extended operation Observation-lastn ([STU3](https://hl7.org/implement/standards/fhir/STU3/observation-operations.html#lastn), [R4](https://hl7.org/implement/standards/fhir/R4/observation-operations.html#lastn)). DSTU2 doesn't define the Observation-lastn method, but the server supports it the same way it supports STU3. Search terms are provided as query parameters following the same pattern as the search method. The following search parameters must be provided: - `subject` or `patient` to specify a subject for the Observation. - `code`, `category` or any of the composite parameters that include `code`. Any other valid Observation search parameters can also be provided. This operation accepts an additional query parameter `max`, which specifies N, the maximum number of Observations to return from each group, with a default of 1. Searches with over 1000 results are rejected. Results are counted before grouping and limiting the results with `max`. To stay within the limit, constrain these searches using Observation search parameters such as `_lastUpdated` or `date`. On success, the response body contains a JSON-encoded representation of a `Bundle` resource of type `searchset`, containing the results of the operation. Errors generated by the FHIR store contain a JSON-encoded `OperationOutcome` resource describing the reason for the error. If the request cannot be mapped to a valid API method on a FHIR store, a generic GCP error might be returned instead.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}/fhir/Observation/$lastn", @@ -5701,7 +5748,7 @@ } } }, - "revision": "20240731", + "revision": "20240808", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 682f69b2676..d37a4c8840e 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -22031,6 +22031,146 @@ func (c *ProjectsLocationsDatasetsFhirStoresFhirConsentEnforcementStatusCall) Do return c.doRequest("") } +type ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// EncounterEverything: Retrieves an Encounter resource and resources related +// to that Encounter. Implements the FHIR extended operation +// Encounter-everything (DSTU2 +// (http://hl7.org/implement/standards/fhir/DSTU2/encounter-operations.html#everything), +// STU3 +// (http://hl7.org/implement/standards/fhir/STU3/encounter-operations.html#everything), +// or R4 +// (https://hl7.org/implement/standards/fhir/R4/encounter-operation-everything.html). +// On success, the response body contains a JSON-encoded representation of a +// `Bundle` resource of type `searchset`, containing the results of the +// operation. Errors generated by the FHIR store contain a JSON-encoded +// `OperationOutcome` resource describing the reason for the error. If the +// request cannot be mapped to a valid API method on a FHIR store, a generic +// GCP error might be returned instead. The resources in scope for the response +// are: * The Encounter resource itself. * All the resources directly +// referenced by the Encounter resource, including attachments and binaries. * +// Resources directly referencing the Encounter resource that meet the +// inclusion criteria. The inclusion criteria are based on the membership rules +// in the Encounter Compartment definition (DSTU2 +// (http://hl7.org/fhir/DSTU2/compartment-encounter.html), STU3 +// (http://www.hl7.org/fhir/stu3/compartmentdefinition-encounter.html), R4 +// (http://hl7.org/fhir/R4/compartmentdefinition-encounter.html)), which +// details the eligible resource types and referencing search parameters. * +// Resources referencing to the Encounter resource through the +// "http://hl7.org/fhir/StructureDefinition/encounter-associatedEncounter" +// extension. +// +// - name: Name of the Encounter resource for which the information is +// required. +func (r *ProjectsLocationsDatasetsFhirStoresFhirService) EncounterEverything(name string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall { + c := &ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Count sets the optional parameter "_count": Maximum number of resources in a +// page. If not specified, 100 is used. May not be larger than 1000. +func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Count(Count int64) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall { + c.urlParams_.Set("_count", fmt.Sprint(Count)) + return c +} + +// PageToken sets the optional parameter "_page_token": Used to retrieve the +// next or previous page of results when using pagination. Set `_page_token` to +// the value of _page_token set in next or previous page links' url. Next and +// previous page are returned in the response bundle's links field, where +// `link.relation` is "previous" or "next". Omit `_page_token` if no previous +// request has been made. +func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) PageToken(PageToken string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall { + c.urlParams_.Set("_page_token", PageToken) + return c +} + +// Since sets the optional parameter "_since": If provided, only resources +// updated after this time are returned. The time uses the format +// YYYY-MM-DDThh:mm:ss.sss+zz:zz. For example, `2015-02-07T13:28:17.239+02:00` +// or `2017-01-01T00:00:00Z`. The time must be specified to the second and +// include a time zone. +func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Since(Since string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall { + c.urlParams_.Set("_since", Since) + return c +} + +// Type sets the optional parameter "_type": String of comma-delimited FHIR +// resource types. If provided, only resources of the specified resource +// type(s) are returned. Specifying multiple `_type` parameters isn't +// supported. For example, the result of `_type=Observation&_type=Encounter` is +// undefined. Use `_type=Observation,Encounter` instead. +func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Type(Type string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall { + c.urlParams_.Set("_type", Type) + 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 *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall { + 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 *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall { + 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 *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/$everything") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "healthcare.projects.locations.datasets.fhirStores.fhir.Encounter-everything" call. +func (c *ProjectsLocationsDatasetsFhirStoresFhirEncounterEverythingCall) Do(opts ...googleapi.CallOption) (*http.Response, error) { + gensupport.SetOptions(c.urlParams_, opts...) + return c.doRequest("") +} + type ProjectsLocationsDatasetsFhirStoresFhirObservationLastnCall struct { s *Service parent string diff --git a/internal/kokoro/vet.sh b/internal/kokoro/vet.sh index 1305a84ad0d..58b17ee694b 100755 --- a/internal/kokoro/vet.sh +++ b/internal/kokoro/vet.sh @@ -41,7 +41,7 @@ golint ./... 2>&1 | ( grep -vE "\.pb\.go:" || true ) | tee /dev/stderr | (! read) -staticcheck -go 1.9 ./... 2>&1 | ( +staticcheck -go 1.23 ./... 2>&1 | ( grep -v "SA1019" | grep -v "S1007" | grep -v "error var Done should have name of the form ErrFoo" | diff --git a/internal/version.go b/internal/version.go index 48b023adec3..f3426bd3c62 100644 --- a/internal/version.go +++ b/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.192.0" +const Version = "0.195.0" diff --git a/looker/v1/looker-api.json b/looker/v1/looker-api.json index 8922f640b90..2ea54d184a6 100644 --- a/looker/v1/looker-api.json +++ b/looker/v1/looker-api.json @@ -731,7 +731,7 @@ } } }, - "revision": "20240522", + "revision": "20240814", "rootUrl": "https://looker.googleapis.com/", "schemas": { "AdminSettings": { @@ -1163,6 +1163,14 @@ "description": "Whether private IP is enabled on the Looker instance.", "type": "boolean" }, + "pscConfig": { + "$ref": "PscConfig", + "description": "Optional. PSC configuration. Used when `psc_enabled` is true." + }, + "pscEnabled": { + "description": "Optional. Whether to use Private Service Connect (PSC) for private IP connectivity. If true, neither `public_ip_enabled` nor `private_ip_enabled` can be true.", + "type": "boolean" + }, "publicIpEnabled": { "description": "Whether public IP is enabled on the Looker instance.", "type": "boolean" @@ -1476,12 +1484,74 @@ }, "type": "object" }, + "PscConfig": { + "description": "Information for Private Service Connect (PSC) setup for a Looker instance.", + "id": "PscConfig", + "properties": { + "allowedVpcs": { + "description": "Optional. List of VPCs that are allowed ingress into looker. Format: projects/{project}/global/networks/{network}", + "items": { + "type": "string" + }, + "type": "array" + }, + "lookerServiceAttachmentUri": { + "description": "Output only. URI of the Looker service attachment.", + "readOnly": true, + "type": "string" + }, + "serviceAttachments": { + "description": "Optional. List of egress service attachment configurations.", + "items": { + "$ref": "ServiceAttachment" + }, + "type": "array" + } + }, + "type": "object" + }, "RestartInstanceRequest": { "description": "Request options for restarting an instance.", "id": "RestartInstanceRequest", "properties": {}, "type": "object" }, + "ServiceAttachment": { + "description": "Service attachment configuration.", + "id": "ServiceAttachment", + "properties": { + "connectionStatus": { + "description": "Output only. Connection status.", + "enum": [ + "UNKNOWN", + "ACCEPTED", + "PENDING", + "REJECTED", + "NEEDS_ATTENTION", + "CLOSED" + ], + "enumDescriptions": [ + "Connection status is unspecified.", + "Connection is established and functioning normally.", + "Connection is not established (Looker tenant project hasn't been allowlisted).", + "Connection is not established (Looker tenant project is explicitly in reject list).", + "Issue with target service attachment, e.g. NAT subnet is exhausted.", + "Target service attachment does not exist. This status is a terminal state." + ], + "readOnly": true, + "type": "string" + }, + "localFqdn": { + "description": "Required. Fully qualified domain name that will be used in the private DNS record created for the service attachment.", + "type": "string" + }, + "targetServiceAttachmentUri": { + "description": "Required. URI of the service attachment to connect to. Format: projects/{project}/regions/{region}/serviceAttachments/{service_attachment}", + "type": "string" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/looker/v1/looker-gen.go b/looker/v1/looker-gen.go index 80a882dbd6c..93a9c906eff 100644 --- a/looker/v1/looker-gen.go +++ b/looker/v1/looker-gen.go @@ -800,6 +800,12 @@ type Instance struct { PlatformEdition string `json:"platformEdition,omitempty"` // PrivateIpEnabled: Whether private IP is enabled on the Looker instance. PrivateIpEnabled bool `json:"privateIpEnabled,omitempty"` + // PscConfig: Optional. PSC configuration. Used when `psc_enabled` is true. + PscConfig *PscConfig `json:"pscConfig,omitempty"` + // PscEnabled: Optional. Whether to use Private Service Connect (PSC) for + // private IP connectivity. If true, neither `public_ip_enabled` nor + // `private_ip_enabled` can be true. + PscEnabled bool `json:"pscEnabled,omitempty"` // PublicIpEnabled: Whether public IP is enabled on the Looker instance. PublicIpEnabled bool `json:"publicIpEnabled,omitempty"` // ReservedRange: Name of a reserved IP address range within the @@ -1231,10 +1237,81 @@ func (s Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PscConfig: Information for Private Service Connect (PSC) setup for a Looker +// instance. +type PscConfig struct { + // AllowedVpcs: Optional. List of VPCs that are allowed ingress into looker. + // Format: projects/{project}/global/networks/{network} + AllowedVpcs []string `json:"allowedVpcs,omitempty"` + // LookerServiceAttachmentUri: Output only. URI of the Looker service + // attachment. + LookerServiceAttachmentUri string `json:"lookerServiceAttachmentUri,omitempty"` + // ServiceAttachments: Optional. List of egress service attachment + // configurations. + ServiceAttachments []*ServiceAttachment `json:"serviceAttachments,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedVpcs") 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. "AllowedVpcs") 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 PscConfig) MarshalJSON() ([]byte, error) { + type NoMethod PscConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RestartInstanceRequest: Request options for restarting an instance. type RestartInstanceRequest struct { } +// ServiceAttachment: Service attachment configuration. +type ServiceAttachment struct { + // ConnectionStatus: Output only. Connection status. + // + // Possible values: + // "UNKNOWN" - Connection status is unspecified. + // "ACCEPTED" - Connection is established and functioning normally. + // "PENDING" - Connection is not established (Looker tenant project hasn't + // been allowlisted). + // "REJECTED" - Connection is not established (Looker tenant project is + // explicitly in reject list). + // "NEEDS_ATTENTION" - Issue with target service attachment, e.g. NAT subnet + // is exhausted. + // "CLOSED" - Target service attachment does not exist. This status is a + // terminal state. + ConnectionStatus string `json:"connectionStatus,omitempty"` + // LocalFqdn: Required. Fully qualified domain name that will be used in the + // private DNS record created for the service attachment. + LocalFqdn string `json:"localFqdn,omitempty"` + // TargetServiceAttachmentUri: Required. URI of the service attachment to + // connect to. Format: + // projects/{project}/regions/{region}/serviceAttachments/{service_attachment} + TargetServiceAttachmentUri string `json:"targetServiceAttachmentUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConnectionStatus") 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. "ConnectionStatus") 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 ServiceAttachment) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAttachment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the `resource`. The diff --git a/manufacturers/v1/manufacturers-api.json b/manufacturers/v1/manufacturers-api.json index 0432a4c3160..e163193cebd 100644 --- a/manufacturers/v1/manufacturers-api.json +++ b/manufacturers/v1/manufacturers-api.json @@ -416,7 +416,7 @@ } } }, - "revision": "20240716", + "revision": "20240809", "rootUrl": "https://manufacturers.googleapis.com/", "schemas": { "Attributes": { @@ -513,6 +513,13 @@ }, "type": "array" }, + "intendedCountry": { + "description": "Optional. List of countries to show this product in. Countries provided in this attribute will override any of the countries configured at feed level. The values should be: the [CLDR territory code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the countries in which this item will be shown.", + "items": { + "type": "string" + }, + "type": "array" + }, "itemGroupId": { "description": "The item group id of the product. For more information, see https://support.google.com/manufacturers/answer/6124116#itemgroupid.", "type": "string" @@ -697,10 +704,34 @@ "description": "The destination status.", "id": "DestinationStatus", "properties": { + "approvedCountries": { + "description": "Output only. List of country codes (ISO 3166-1 alpha-2) where the offer is approved.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "destination": { "description": "The name of the destination.", "type": "string" }, + "disapprovedCountries": { + "description": "Output only. List of country codes (ISO 3166-1 alpha-2) where the offer is disapproved.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "pendingCountries": { + "description": "Output only. List of country codes (ISO 3166-1 alpha-2) where the offer is pending approval.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "status": { "description": "The status of the destination.", "enum": [ @@ -1224,6 +1255,10 @@ }, "type": "array" }, + "feedLabel": { + "description": "Optional. The feed label for the product.", + "type": "string" + }, "issues": { "description": "A server-generated list of issues associated with the product.", "items": { diff --git a/manufacturers/v1/manufacturers-gen.go b/manufacturers/v1/manufacturers-gen.go index 5ecf37c398b..eb63c667ae5 100644 --- a/manufacturers/v1/manufacturers-gen.go +++ b/manufacturers/v1/manufacturers-gen.go @@ -259,6 +259,12 @@ type Attributes struct { // "ClientShoppingCatalog" or "PartnerShoppingCatalog". For more information, // see https://support.google.com/manufacturers/answer/7443550 IncludedDestination []string `json:"includedDestination,omitempty"` + // IntendedCountry: Optional. List of countries to show this product in. + // Countries provided in this attribute will override any of the countries + // configured at feed level. The values should be: the CLDR territory code + // (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of the + // countries in which this item will be shown. + IntendedCountry []string `json:"intendedCountry,omitempty"` // ItemGroupId: The item group id of the product. For more information, see // https://support.google.com/manufacturers/answer/6124116#itemgroupid. ItemGroupId string `json:"itemGroupId,omitempty"` @@ -436,8 +442,17 @@ func (s Count) MarshalJSON() ([]byte, error) { // DestinationStatus: The destination status. type DestinationStatus struct { + // ApprovedCountries: Output only. List of country codes (ISO 3166-1 alpha-2) + // where the offer is approved. + ApprovedCountries []string `json:"approvedCountries,omitempty"` // Destination: The name of the destination. Destination string `json:"destination,omitempty"` + // DisapprovedCountries: Output only. List of country codes (ISO 3166-1 + // alpha-2) where the offer is disapproved. + DisapprovedCountries []string `json:"disapprovedCountries,omitempty"` + // PendingCountries: Output only. List of country codes (ISO 3166-1 alpha-2) + // where the offer is pending approval. + PendingCountries []string `json:"pendingCountries,omitempty"` // Status: The status of the destination. // // Possible values: @@ -446,15 +461,15 @@ type DestinationStatus struct { // "PENDING" - The decision is still pending. // "DISAPPROVED" - The product is disapproved. Please look at the issues. Status string `json:"status,omitempty"` - // ForceSendFields is a list of field names (e.g. "Destination") to + // ForceSendFields is a list of field names (e.g. "ApprovedCountries") 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. "Destination") 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. "ApprovedCountries") 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:"-"` } @@ -970,6 +985,8 @@ type Product struct { ContentLanguage string `json:"contentLanguage,omitempty"` // DestinationStatuses: The status of the destinations. DestinationStatuses []*DestinationStatus `json:"destinationStatuses,omitempty"` + // FeedLabel: Optional. The feed label for the product. + FeedLabel string `json:"feedLabel,omitempty"` // Issues: A server-generated list of issues associated with the product. Issues []*Issue `json:"issues,omitempty"` // Name: Name in the format `{target_country}:{content_language}:{product_id}`. diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index c50816f750c..60dc2a467b5 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -1354,7 +1354,7 @@ } } }, - "revision": "20240806", + "revision": "20240821", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "AcceptTermsOfService": { @@ -1608,6 +1608,10 @@ "$ref": "CustomerService", "description": "Optional. The customer service of the business." }, + "koreanBusinessRegistrationNumber": { + "description": "Optional. The 10-digit [Korean business registration number](https://support.google.com/merchants/answer/9037766) separated with dashes in the format: XXX-XX-XXXXX.", + "type": "string" + }, "name": { "description": "Identifier. The resource name of the business info. Format: `accounts/{account}/businessInfo`", "type": "string" diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index 00e3ad98d73..fbd3124aeb9 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -614,6 +614,10 @@ type BusinessInfo struct { Address *PostalAddress `json:"address,omitempty"` // CustomerService: Optional. The customer service of the business. CustomerService *CustomerService `json:"customerService,omitempty"` + // KoreanBusinessRegistrationNumber: Optional. The 10-digit Korean business + // registration number (https://support.google.com/merchants/answer/9037766) + // separated with dashes in the format: XXX-XX-XXXXX. + KoreanBusinessRegistrationNumber string `json:"koreanBusinessRegistrationNumber,omitempty"` // Name: Identifier. The resource name of the business info. Format: // `accounts/{account}/businessInfo` Name string `json:"name,omitempty"` diff --git a/migrationcenter/v1alpha1/migrationcenter-api.json b/migrationcenter/v1alpha1/migrationcenter-api.json index 3ee67cfeb2b..f4336eee15b 100644 --- a/migrationcenter/v1alpha1/migrationcenter-api.json +++ b/migrationcenter/v1alpha1/migrationcenter-api.json @@ -1862,6 +1862,81 @@ } } }, + "relations": { + "methods": { + "get": { + "description": "Gets the details of an relation.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/relations/{relationsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.relations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/relations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "Relation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the relations in a given project and location.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/relations", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.relations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent value for `ListRelationsRequest`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/relations", + "response": { + "$ref": "ListRelationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "reportConfigs": { "methods": { "create": { @@ -2473,7 +2548,7 @@ } } }, - "revision": "20240711", + "revision": "20240815", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -3048,6 +3123,13 @@ "description": "Optional. When this value is set to `true` the request is a no-op for non-existing assets. See https://google.aip.dev/135#delete-if-existing for additional details. Default value is `false`.", "type": "boolean" }, + "cascadingRules": { + "description": "Optional. Optional cascading rules for deleting related assets.", + "items": { + "$ref": "CascadingRule" + }, + "type": "array" + }, "names": { "description": "Required. The IDs of the assets to delete. A maximum of 1000 assets can be deleted in a batch. Format: projects/{project}/locations/{location}/assets/{name}.", "items": { @@ -3119,6 +3201,23 @@ "properties": {}, "type": "object" }, + "CascadeLogicalDBsRule": { + "description": "Cascading rule for related logical DBs.", + "id": "CascadeLogicalDBsRule", + "properties": {}, + "type": "object" + }, + "CascadingRule": { + "description": "Specifies cascading rules for traversing relations.", + "id": "CascadingRule", + "properties": { + "cascadeLogicalDbs": { + "$ref": "CascadeLogicalDBsRule", + "description": "Cascading rule for related logical DBs." + } + }, + "type": "object" + }, "CloudDatabaseMigrationTarget": { "description": "Cloud database migration target.", "id": "CloudDatabaseMigrationTarget", @@ -3791,6 +3890,16 @@ "description": "Optional. Total memory in bytes limited by db deployment.", "format": "int64", "type": "string" + }, + "physicalCoreCount": { + "description": "Optional. Number of total physical cores.", + "format": "int32", + "type": "integer" + }, + "physicalCoreLimit": { + "description": "Optional. Number of total physical cores limited by db deployment.", + "format": "int32", + "type": "integer" } }, "type": "object" @@ -3845,6 +3954,10 @@ "description": "The instance's name.", "type": "string" }, + "network": { + "$ref": "DatabaseInstanceNetwork", + "description": "Optional. Networking details." + }, "role": { "description": "The instance role in the database engine.", "enum": [ @@ -3864,6 +3977,31 @@ }, "type": "object" }, + "DatabaseInstanceNetwork": { + "description": "Network details of a database instance.", + "id": "DatabaseInstanceNetwork", + "properties": { + "hostNames": { + "description": "Optional. The instance's host names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ipAddresses": { + "description": "Optional. The instance's IP addresses.", + "items": { + "type": "string" + }, + "type": "array" + }, + "primaryMacAddress": { + "description": "Optional. The instance's primary MAC address.", + "type": "string" + } + }, + "type": "object" + }, "DatabaseObjects": { "description": "Details of a group of database objects.", "id": "DatabaseObjects", @@ -5620,6 +5758,24 @@ }, "type": "object" }, + "ListRelationsResponse": { + "description": "Response message for listing relations.", + "id": "ListRelationsResponse", + "properties": { + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "relations": { + "description": "A list of relations.", + "items": { + "$ref": "Relation" + }, + "type": "array" + } + }, + "type": "object" + }, "ListReportConfigsResponse": { "description": "Response message for listing report configs.", "id": "ListReportConfigsResponse", @@ -6602,6 +6758,48 @@ }, "type": "object" }, + "Relation": { + "description": "Message representing a relation between 2 resource.", + "id": "Relation", + "properties": { + "createTime": { + "description": "Output only. The timestamp when the relation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dstAsset": { + "description": "Output only. The destination asset name in the relation.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Identifier. The identifier of the relation.", + "readOnly": true, + "type": "string" + }, + "srcAsset": { + "description": "Output only. The source asset name in the relation.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Optional. The type of the relation.", + "enum": [ + "TYPE_UNSPECIFIED", + "LOGICAL_DATABASE", + "DATABASE_DEPLOYMENT_HOSTING_SERVER" + ], + "enumDescriptions": [ + "Default value.", + "DBDeployment -\u003e Database", + "A relation between a machine/VM and the database deployment it hosts." + ], + "type": "string" + } + }, + "type": "object" + }, "RemoveAssetsFromGroupRequest": { "description": "A request to remove assets from a group.", "id": "RemoveAssetsFromGroupRequest", @@ -7004,6 +7202,11 @@ "description": "Output only. Database licensing monthly cost for this preference set. Only present for databases.", "readOnly": true }, + "monthlyCostGcveProtected": { + "$ref": "Money", + "description": "Output only. GCVE Protected nodes cost for this preference set.", + "readOnly": true + }, "monthlyCostNetworkEgress": { "$ref": "Money", "description": "Output only. Network Egress monthly cost for this preference set. Only present for virtual machines.", @@ -7019,6 +7222,11 @@ "description": "Output only. Miscellaneous monthly cost for this preference set.", "readOnly": true }, + "monthlyCostPortableVmwareLicense": { + "$ref": "Money", + "description": "Output only. VMware portable license monthly cost for this preference set. Only present for VMware target with portable license service type. This cost is not paid to google, but is an estimate of license costs paid to VMware.", + "readOnly": true + }, "monthlyCostStorage": { "$ref": "Money", "description": "Output only. Storage monthly cost for this preference set.", @@ -7736,7 +7944,13 @@ "SqlServerSchemaDetails": { "description": "Specific details for a SqlServer database.", "id": "SqlServerSchemaDetails", - "properties": {}, + "properties": { + "clrObjectCount": { + "description": "Optional. SqlServer number of CLR objects.", + "format": "int32", + "type": "integer" + } + }, "type": "object" }, "SqlServerServerFlag": { @@ -7873,6 +8087,48 @@ }, "type": "object" }, + "VMwareEngineMachinePreferences": { + "description": "The type of machines to consider when calculating virtual machine migration insights and recommendations for VMware Engine. Not all machine types are available in all zones and regions.", + "id": "VMwareEngineMachinePreferences", + "properties": { + "allowedMachineSeries": { + "description": "Optional. VMware Engine on Google Cloud machine series to consider for insights and recommendations. If empty, no restriction is applied on the machine series.", + "items": { + "$ref": "MachineSeries" + }, + "type": "array" + }, + "protectedNodes": { + "description": "Optional. Whether to use VMware Engine Protected offering.", + "enum": [ + "PROTECTED_NODES_UNSPECIFIED", + "PROTECTED_NODES_ENABLED", + "PROTECTED_NODES_DISABLED" + ], + "enumDescriptions": [ + "Unspecified protected nodes preference.", + "Use only protected nodes for the selected allowed_machine_series.", + "Do not use protected nodes." + ], + "type": "string" + }, + "storageOnlyNodes": { + "description": "Optional. Whether to use storage-only nodes, if those are available.", + "enum": [ + "STORAGE_ONLY_NODES_UNSPECIFIED", + "STORAGE_ONLY_NODES_ENABLED", + "STORAGE_ONLY_NODES_DISABLED" + ], + "enumDescriptions": [ + "Unspecified storage-only nodes preference.", + "Use storage-only nodes for selected allowed_machine_series, if available.", + "Do not use storage-only nodes." + ], + "type": "string" + } + }, + "type": "object" + }, "ValidateImportJobRequest": { "description": "A request to validate an import job.", "id": "ValidateImportJobRequest", @@ -8323,11 +8579,34 @@ "format": "double", "type": "number" }, + "licenseDiscountPercentage": { + "description": "Optional. Discount percentage for the license type offered to you by Broadcom. Must be between 0 and 100. Only valid when service_type is set to SERVICE_TYPE_PORTABLE_LICENSE.", + "format": "float", + "type": "number" + }, + "machinePreferences": { + "$ref": "VMwareEngineMachinePreferences", + "description": "Optional. Preferences concerning the machine types to consider on Google Cloud VMware Engine." + }, "memoryOvercommitRatio": { "description": "Memory overcommit ratio. Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0.", "format": "double", "type": "number" }, + "serviceType": { + "description": "Optional. VMWare Service Type (Fully Licensed or Portable License).", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_FULLY_LICENSED", + "SERVICE_TYPE_PORTABLE_LICENSE" + ], + "enumDescriptions": [ + "Same as SERVICE_TYPE_FULLY_LICENSED.", + "Google provided VCF license.", + "Bring Your Own License." + ], + "type": "string" + }, "storageDeduplicationCompressionRatio": { "description": "The Deduplication and Compression ratio is based on the logical (Used Before) space required to store data before applying deduplication and compression, in relation to the physical (Used After) space required after applying deduplication and compression. Specifically, the ratio is the Used Before space divided by the Used After space. For example, if the Used Before space is 3 GB, but the physical Used After space is 1 GB, the deduplication and compression ratio is 3x. Acceptable values are between 1.0 and 4.0.", "format": "double", diff --git a/migrationcenter/v1alpha1/migrationcenter-gen.go b/migrationcenter/v1alpha1/migrationcenter-gen.go index 65359264941..5bd304f0b35 100644 --- a/migrationcenter/v1alpha1/migrationcenter-gen.go +++ b/migrationcenter/v1alpha1/migrationcenter-gen.go @@ -175,6 +175,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.ImportJobs = NewProjectsLocationsImportJobsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.PreferenceSets = NewProjectsLocationsPreferenceSetsService(s) + rs.Relations = NewProjectsLocationsRelationsService(s) rs.ReportConfigs = NewProjectsLocationsReportConfigsService(s) rs.Sources = NewProjectsLocationsSourcesService(s) return rs @@ -197,6 +198,8 @@ type ProjectsLocationsService struct { PreferenceSets *ProjectsLocationsPreferenceSetsService + Relations *ProjectsLocationsRelationsService + ReportConfigs *ProjectsLocationsReportConfigsService Sources *ProjectsLocationsSourcesService @@ -277,6 +280,15 @@ type ProjectsLocationsPreferenceSetsService struct { s *Service } +func NewProjectsLocationsRelationsService(s *Service) *ProjectsLocationsRelationsService { + rs := &ProjectsLocationsRelationsService{s: s} + return rs +} + +type ProjectsLocationsRelationsService struct { + s *Service +} + func NewProjectsLocationsReportConfigsService(s *Service) *ProjectsLocationsReportConfigsService { rs := &ProjectsLocationsReportConfigsService{s: s} rs.Reports = NewProjectsLocationsReportConfigsReportsService(s) @@ -1039,6 +1051,9 @@ type BatchDeleteAssetsRequest struct { // https://google.aip.dev/135#delete-if-existing for additional details. // Default value is `false`. AllowMissing bool `json:"allowMissing,omitempty"` + // CascadingRules: Optional. Optional cascading rules for deleting related + // assets. + CascadingRules []*CascadingRule `json:"cascadingRules,omitempty"` // Names: Required. The IDs of the assets to delete. A maximum of 1000 assets // can be deleted in a batch. Format: // projects/{project}/locations/{location}/assets/{name}. @@ -1144,6 +1159,32 @@ func (s BiosDetails) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// CascadeLogicalDBsRule: Cascading rule for related logical DBs. +type CascadeLogicalDBsRule struct { +} + +// CascadingRule: Specifies cascading rules for traversing relations. +type CascadingRule struct { + // CascadeLogicalDbs: Cascading rule for related logical DBs. + CascadeLogicalDbs *CascadeLogicalDBsRule `json:"cascadeLogicalDbs,omitempty"` + // ForceSendFields is a list of field names (e.g. "CascadeLogicalDbs") 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. "CascadeLogicalDbs") 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 CascadingRule) MarshalJSON() ([]byte, error) { + type NoMethod CascadingRule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CloudDatabaseMigrationTarget: Cloud database migration target. type CloudDatabaseMigrationTarget struct { // CloudSqlForMysqlShape: Cloud SQL for MySQL database shape. @@ -1832,6 +1873,11 @@ type DatabaseDeploymentTopology struct { MemoryBytes int64 `json:"memoryBytes,omitempty,string"` // MemoryLimitBytes: Optional. Total memory in bytes limited by db deployment. MemoryLimitBytes int64 `json:"memoryLimitBytes,omitempty,string"` + // PhysicalCoreCount: Optional. Number of total physical cores. + PhysicalCoreCount int64 `json:"physicalCoreCount,omitempty"` + // PhysicalCoreLimit: Optional. Number of total physical cores limited by db + // deployment. + PhysicalCoreLimit int64 `json:"physicalCoreLimit,omitempty"` // ForceSendFields is a list of field names (e.g. "CoreCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1909,6 +1955,8 @@ func (s DatabaseDetailsParentDatabaseDeployment) MarshalJSON() ([]byte, error) { type DatabaseInstance struct { // InstanceName: The instance's name. InstanceName string `json:"instanceName,omitempty"` + // Network: Optional. Networking details. + Network *DatabaseInstanceNetwork `json:"network,omitempty"` // Role: The instance role in the database engine. // // Possible values: @@ -1935,6 +1983,32 @@ func (s DatabaseInstance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DatabaseInstanceNetwork: Network details of a database instance. +type DatabaseInstanceNetwork struct { + // HostNames: Optional. The instance's host names. + HostNames []string `json:"hostNames,omitempty"` + // IpAddresses: Optional. The instance's IP addresses. + IpAddresses []string `json:"ipAddresses,omitempty"` + // PrimaryMacAddress: Optional. The instance's primary MAC address. + PrimaryMacAddress string `json:"primaryMacAddress,omitempty"` + // ForceSendFields is a list of field names (e.g. "HostNames") 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. "HostNames") 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 DatabaseInstanceNetwork) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseInstanceNetwork + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DatabaseObjects: Details of a group of database objects. type DatabaseObjects struct { // Category: The category of the objects. @@ -3901,6 +3975,34 @@ func (s ListPreferenceSetsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListRelationsResponse: Response message for listing relations. +type ListRelationsResponse struct { + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // Relations: A list of relations. + Relations []*Relation `json:"relations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListRelationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRelationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListReportConfigsResponse: Response message for listing report configs. type ListReportConfigsResponse struct { // NextPageToken: A token identifying a page of results the server should @@ -5135,6 +5237,45 @@ func (s RegionPreferences) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Relation: Message representing a relation between 2 resource. +type Relation struct { + // CreateTime: Output only. The timestamp when the relation was created. + CreateTime string `json:"createTime,omitempty"` + // DstAsset: Output only. The destination asset name in the relation. + DstAsset string `json:"dstAsset,omitempty"` + // Name: Output only. Identifier. The identifier of the relation. + Name string `json:"name,omitempty"` + // SrcAsset: Output only. The source asset name in the relation. + SrcAsset string `json:"srcAsset,omitempty"` + // Type: Optional. The type of the relation. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. + // "LOGICAL_DATABASE" - DBDeployment -> Database + // "DATABASE_DEPLOYMENT_HOSTING_SERVER" - A relation between a machine/VM and + // the database deployment it hosts. + Type string `json:"type,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Relation) MarshalJSON() ([]byte, error) { + type NoMethod Relation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RemoveAssetsFromGroupRequest: A request to remove assets from a group. type RemoveAssetsFromGroupRequest struct { // AllowMissing: Optional. When this value is set to `false` and one of the @@ -5542,6 +5683,9 @@ type ReportSummaryGroupPreferenceSetFinding struct { // MonthlyCostDatabaseLicensing: Output only. Database licensing monthly cost // for this preference set. Only present for databases. MonthlyCostDatabaseLicensing *Money `json:"monthlyCostDatabaseLicensing,omitempty"` + // MonthlyCostGcveProtected: Output only. GCVE Protected nodes cost for this + // preference set. + MonthlyCostGcveProtected *Money `json:"monthlyCostGcveProtected,omitempty"` // MonthlyCostNetworkEgress: Output only. Network Egress monthly cost for this // preference set. Only present for virtual machines. MonthlyCostNetworkEgress *Money `json:"monthlyCostNetworkEgress,omitempty"` @@ -5551,6 +5695,11 @@ type ReportSummaryGroupPreferenceSetFinding struct { // MonthlyCostOther: Output only. Miscellaneous monthly cost for this // preference set. MonthlyCostOther *Money `json:"monthlyCostOther,omitempty"` + // MonthlyCostPortableVmwareLicense: Output only. VMware portable license + // monthly cost for this preference set. Only present for VMware target with + // portable license service type. This cost is not paid to google, but is an + // estimate of license costs paid to VMware. + MonthlyCostPortableVmwareLicense *Money `json:"monthlyCostPortableVmwareLicense,omitempty"` // MonthlyCostStorage: Output only. Storage monthly cost for this preference // set. MonthlyCostStorage *Money `json:"monthlyCostStorage,omitempty"` @@ -6451,6 +6600,24 @@ func (s SqlServerFeature) MarshalJSON() ([]byte, error) { // SqlServerSchemaDetails: Specific details for a SqlServer database. type SqlServerSchemaDetails struct { + // ClrObjectCount: Optional. SqlServer number of CLR objects. + ClrObjectCount int64 `json:"clrObjectCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClrObjectCount") 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. "ClrObjectCount") 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 SqlServerSchemaDetails) MarshalJSON() ([]byte, error) { + type NoMethod SqlServerSchemaDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // SqlServerServerFlag: SQL Server server flag details. @@ -6638,6 +6805,50 @@ func (s UploadFileInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VMwareEngineMachinePreferences: The type of machines to consider when +// calculating virtual machine migration insights and recommendations for +// VMware Engine. Not all machine types are available in all zones and regions. +type VMwareEngineMachinePreferences struct { + // AllowedMachineSeries: Optional. VMware Engine on Google Cloud machine series + // to consider for insights and recommendations. If empty, no restriction is + // applied on the machine series. + AllowedMachineSeries []*MachineSeries `json:"allowedMachineSeries,omitempty"` + // ProtectedNodes: Optional. Whether to use VMware Engine Protected offering. + // + // Possible values: + // "PROTECTED_NODES_UNSPECIFIED" - Unspecified protected nodes preference. + // "PROTECTED_NODES_ENABLED" - Use only protected nodes for the selected + // allowed_machine_series. + // "PROTECTED_NODES_DISABLED" - Do not use protected nodes. + ProtectedNodes string `json:"protectedNodes,omitempty"` + // StorageOnlyNodes: Optional. Whether to use storage-only nodes, if those are + // available. + // + // Possible values: + // "STORAGE_ONLY_NODES_UNSPECIFIED" - Unspecified storage-only nodes + // preference. + // "STORAGE_ONLY_NODES_ENABLED" - Use storage-only nodes for selected + // allowed_machine_series, if available. + // "STORAGE_ONLY_NODES_DISABLED" - Do not use storage-only nodes. + StorageOnlyNodes string `json:"storageOnlyNodes,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllowedMachineSeries") 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. "AllowedMachineSeries") 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 VMwareEngineMachinePreferences) MarshalJSON() ([]byte, error) { + type NoMethod VMwareEngineMachinePreferences + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ValidateImportJobRequest: A request to validate an import job. type ValidateImportJobRequest struct { // RequestId: Optional. An optional request ID to identify requests. Specify a @@ -7108,9 +7319,24 @@ type VmwareEnginePreferences struct { // CpuOvercommitRatio: CPU overcommit ratio. Acceptable values are between 1.0 // and 8.0, with 0.1 increment. CpuOvercommitRatio float64 `json:"cpuOvercommitRatio,omitempty"` + // LicenseDiscountPercentage: Optional. Discount percentage for the license + // type offered to you by Broadcom. Must be between 0 and 100. Only valid when + // service_type is set to SERVICE_TYPE_PORTABLE_LICENSE. + LicenseDiscountPercentage float64 `json:"licenseDiscountPercentage,omitempty"` + // MachinePreferences: Optional. Preferences concerning the machine types to + // consider on Google Cloud VMware Engine. + MachinePreferences *VMwareEngineMachinePreferences `json:"machinePreferences,omitempty"` // MemoryOvercommitRatio: Memory overcommit ratio. Acceptable values are 1.0, // 1.25, 1.5, 1.75 and 2.0. MemoryOvercommitRatio float64 `json:"memoryOvercommitRatio,omitempty"` + // ServiceType: Optional. VMWare Service Type (Fully Licensed or Portable + // License). + // + // Possible values: + // "SERVICE_TYPE_UNSPECIFIED" - Same as SERVICE_TYPE_FULLY_LICENSED. + // "SERVICE_TYPE_FULLY_LICENSED" - Google provided VCF license. + // "SERVICE_TYPE_PORTABLE_LICENSE" - Bring Your Own License. + ServiceType string `json:"serviceType,omitempty"` // StorageDeduplicationCompressionRatio: The Deduplication and Compression // ratio is based on the logical (Used Before) space required to store data // before applying deduplication and compression, in relation to the physical @@ -7142,6 +7368,7 @@ func (s *VmwareEnginePreferences) UnmarshalJSON(data []byte) error { type NoMethod VmwareEnginePreferences var s1 struct { CpuOvercommitRatio gensupport.JSONFloat64 `json:"cpuOvercommitRatio"` + LicenseDiscountPercentage gensupport.JSONFloat64 `json:"licenseDiscountPercentage"` MemoryOvercommitRatio gensupport.JSONFloat64 `json:"memoryOvercommitRatio"` StorageDeduplicationCompressionRatio gensupport.JSONFloat64 `json:"storageDeduplicationCompressionRatio"` *NoMethod @@ -7151,6 +7378,7 @@ func (s *VmwareEnginePreferences) UnmarshalJSON(data []byte) error { return err } s.CpuOvercommitRatio = float64(s1.CpuOvercommitRatio) + s.LicenseDiscountPercentage = float64(s1.LicenseDiscountPercentage) s.MemoryOvercommitRatio = float64(s1.MemoryOvercommitRatio) s.StorageDeduplicationCompressionRatio = float64(s1.StorageDeduplicationCompressionRatio) return nil @@ -13256,6 +13484,270 @@ func (c *ProjectsLocationsPreferenceSetsPatchCall) Do(opts ...googleapi.CallOpti return ret, nil } +type ProjectsLocationsRelationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of an relation. +// +// - name: Name of the resource. +func (r *ProjectsLocationsRelationsService) Get(name string) *ProjectsLocationsRelationsGetCall { + c := &ProjectsLocationsRelationsGetCall{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 *ProjectsLocationsRelationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRelationsGetCall { + 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 *ProjectsLocationsRelationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRelationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRelationsGetCall) Context(ctx context.Context) *ProjectsLocationsRelationsGetCall { + 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 *ProjectsLocationsRelationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRelationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.relations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Relation.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 *ProjectsLocationsRelationsGetCall) Do(opts ...googleapi.CallOption) (*Relation, 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 := &Relation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsRelationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the relations in a given project and location. +// +// - parent: Parent value for `ListRelationsRequest`. +func (r *ProjectsLocationsRelationsService) List(parent string) *ProjectsLocationsRelationsListCall { + c := &ProjectsLocationsRelationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsRelationsListCall) Filter(filter string) *ProjectsLocationsRelationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to sort by. See +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsRelationsListCall) OrderBy(orderBy string) *ProjectsLocationsRelationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsRelationsListCall) PageSize(pageSize int64) *ProjectsLocationsRelationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsRelationsListCall) PageToken(pageToken string) *ProjectsLocationsRelationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsRelationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRelationsListCall { + 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 *ProjectsLocationsRelationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRelationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRelationsListCall) Context(ctx context.Context) *ProjectsLocationsRelationsListCall { + 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 *ProjectsLocationsRelationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRelationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/relations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.relations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListRelationsResponse.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 *ProjectsLocationsRelationsListCall) Do(opts ...googleapi.CallOption) (*ListRelationsResponse, 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 := &ListRelationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsRelationsListCall) Pages(ctx context.Context, f func(*ListRelationsResponse) 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 ProjectsLocationsReportConfigsCreateCall struct { s *Service parent string diff --git a/monitoring/v1/monitoring-gen.go b/monitoring/v1/monitoring-gen.go index a4fa89a5310..44e2c63cb29 100644 --- a/monitoring/v1/monitoring-gen.go +++ b/monitoring/v1/monitoring-gen.go @@ -1411,7 +1411,7 @@ type HttpBody struct { // of the body. ContentType string `json:"contentType,omitempty"` // Data: The HTTP request/response body as raw binary. - Data string `json:"data,omitempty"` + Data any `json:"data,omitempty"` // Extensions: Application specific response metadata. Must be set in the first // response for streaming APIs. Extensions []googleapi.RawMessage `json:"extensions,omitempty"` diff --git a/monitoring/v3/monitoring-api.json b/monitoring/v3/monitoring-api.json index d4a34da304f..9516ccabac5 100644 --- a/monitoring/v3/monitoring-api.json +++ b/monitoring/v3/monitoring-api.json @@ -2113,6 +2113,7 @@ ] }, "query": { + "deprecated": true, "description": "Queries time series using Monitoring Query Language.", "flatPath": "v3/projects/{projectsId}/timeSeries:query", "httpMethod": "POST", @@ -2714,7 +2715,7 @@ } } }, - "revision": "20240804", + "revision": "20240818", "rootUrl": "https://monitoring.googleapis.com/", "schemas": { "Aggregation": { @@ -5195,6 +5196,7 @@ "type": "object" }, "QueryTimeSeriesRequest": { + "deprecated": true, "description": "The QueryTimeSeries request.", "id": "QueryTimeSeriesRequest", "properties": { @@ -5215,6 +5217,7 @@ "type": "object" }, "QueryTimeSeriesResponse": { + "deprecated": true, "description": "The QueryTimeSeries response.", "id": "QueryTimeSeriesResponse", "properties": { diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index c7f8c380522..79c3ba49dcc 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -2812,7 +2812,7 @@ } } }, - "revision": "20240717", + "revision": "20240807", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptHubSpokeRequest": { @@ -2963,13 +2963,15 @@ "STATE_UNSPECIFIED", "VALID", "CONNECTION_POLICY_MISSING", - "POLICY_LIMIT_REACHED" + "POLICY_LIMIT_REACHED", + "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" ], "enumDescriptions": [ "Default state, when Connection Map is created initially.", "Set when policy and map configuration is valid, and their matching can lead to allowing creation of PSC Connections subject to other constraints like connections limit.", "No Service Connection Policy found for this network and Service Class", - "Service Connection Policy limit reached for this network and Service Class" + "Service Connection Policy limit reached for this network and Service Class", + "The consumer instance project is not in AllowedGoogleProducersResourceHierarchyLevels of the matching ServiceConnectionPolicy." ], "readOnly": true, "type": "string" @@ -3620,6 +3622,14 @@ }, "type": "array" }, + "producerVpcSpokes": { + "description": "Output only. The list of Producer VPC spokes that this VPC spoke is a service consumer VPC spoke for. These producer VPCs are connected through VPC peering to this spoke's backing VPC network.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "uri": { "description": "Required. The URI of the VPC network resource.", "type": "string" diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 25e9e741598..444fb9ff1c8 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -643,6 +643,9 @@ type ConsumerPscConfig struct { // network and Service Class // "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for this // network and Service Class + // "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer instance + // project is not in AllowedGoogleProducersResourceHierarchyLevels of the + // matching ServiceConnectionPolicy. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "ConsumerInstanceProject") to // unconditionally include in API requests. By default, fields with empty or @@ -1377,6 +1380,10 @@ type LinkedVpcNetwork struct { // IncludeExportRanges: Optional. IP ranges allowed to be included from // peering. IncludeExportRanges []string `json:"includeExportRanges,omitempty"` + // ProducerVpcSpokes: Output only. The list of Producer VPC spokes that this + // VPC spoke is a service consumer VPC spoke for. These producer VPCs are + // connected through VPC peering to this spoke's backing VPC network. + ProducerVpcSpokes []string `json:"producerVpcSpokes,omitempty"` // Uri: Required. The URI of the VPC network resource. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "ExcludeExportRanges") to diff --git a/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index c7114e4c842..3f963fa79d2 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -1116,7 +1116,7 @@ } } }, - "revision": "20240423", + "revision": "20240807", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1393,6 +1393,10 @@ "description": "User-defined labels.", "type": "object" }, + "migration": { + "$ref": "Migration", + "description": "Optional. Should be present if usage is set to FOR_MIGRATION." + }, "name": { "description": "Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", "type": "string" @@ -1456,12 +1460,14 @@ "enum": [ "USAGE_UNSPECIFIED", "FOR_VPC", - "EXTERNAL_TO_VPC" + "EXTERNAL_TO_VPC", + "FOR_MIGRATION" ], "enumDescriptions": [ "Unspecified usage is allowed in calls which identify the resource by other fields and do not need Usage set to complete. These are, i.e.: GetInternalRange and DeleteInternalRange. Usage needs to be specified explicitly in CreateInternalRange or UpdateInternalRange calls.", "A VPC resource can use the reserved CIDR block by associating it with the internal range resource if usage is set to FOR_VPC.", - "Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC resources and are meant to block out address ranges for various use cases such as usage on-premises, with dynamic route announcements via Interconnect." + "Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC resources and are meant to block out address ranges for various use cases such as usage on-premises, with dynamic route announcements via Interconnect.", + "Ranges created FOR_MIGRATION can be used to lock a CIDR range between a source and target subnet. If usage is set to FOR_MIGRATION the peering value has to be set to FOR_SELF or default to FOR_SELF when unset." ], "type": "string" }, @@ -1603,6 +1609,21 @@ }, "type": "object" }, + "Migration": { + "description": "Specification for migration with source and target resource names.", + "id": "Migration", + "properties": { + "source": { + "description": "Immutable. Resource path as an URI of the source resource, for example a subnet. The project for the source resource should match the project for the InternalRange. An example: /projects/{project}/regions/{region}/subnetworks/{subnet}", + "type": "string" + }, + "target": { + "description": "Immutable. Resource path of the target resource. The target project can be different, as in the cases when migrating to peer networks. The resource For example: /projects/{project}/regions/{region}/subnetworks/{subnet}", + "type": "string" + } + }, + "type": "object" + }, "OperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "OperationMetadata", diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index 7e836bee98f..b6aef193027 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -648,6 +648,8 @@ type InternalRange struct { IpCidrRange string `json:"ipCidrRange,omitempty"` // Labels: User-defined labels. Labels map[string]string `json:"labels,omitempty"` + // Migration: Optional. Should be present if usage is set to FOR_MIGRATION. + Migration *Migration `json:"migration,omitempty"` // Name: Immutable. The name of an internal range. Format: // projects/{project}/locations/{location}/internalRanges/{internal_range} See: // https://google.aip.dev/122#fields-representing-resource-names @@ -718,6 +720,10 @@ type InternalRange struct { // associated with VPC resources and are meant to block out address ranges for // various use cases such as usage on-premises, with dynamic route // announcements via Interconnect. + // "FOR_MIGRATION" - Ranges created FOR_MIGRATION can be used to lock a CIDR + // range between a source and target subnet. If usage is set to FOR_MIGRATION + // the peering value has to be set to FOR_SELF or default to FOR_SELF when + // unset. Usage string `json:"usage,omitempty"` // Users: Output only. The list of resources that refer to this internal range. // Resources that use the internal range for their range allocation are @@ -906,6 +912,37 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Migration: Specification for migration with source and target resource +// names. +type Migration struct { + // Source: Immutable. Resource path as an URI of the source resource, for + // example a subnet. The project for the source resource should match the + // project for the InternalRange. An example: + // /projects/{project}/regions/{region}/subnetworks/{subnet} + Source string `json:"source,omitempty"` + // Target: Immutable. Resource path of the target resource. The target project + // can be different, as in the cases when migrating to peer networks. The + // resource For example: + // /projects/{project}/regions/{region}/subnetworks/{subnet} + Target string `json:"target,omitempty"` + // ForceSendFields is a list of field names (e.g. "Source") 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. "Source") 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 Migration) MarshalJSON() ([]byte, error) { + type NoMethod Migration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // OperationMetadata: Represents the metadata of the long-running operation. type OperationMetadata struct { // ApiVersion: Output only. API version used to start the operation. diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index a8991c0c9ab..13b589f5337 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240725", + "revision": "20240807", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1142,7 +1142,9 @@ "CLOUD_NAT_NO_ADDRESSES", "ROUTING_LOOP", "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE", - "LOAD_BALANCER_BACKEND_INVALID_NETWORK" + "LOAD_BALANCER_BACKEND_INVALID_NETWORK", + "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED", + "DESTINATION_IS_PRIVATE_NAT_IP_RANGE" ], "enumDescriptions": [ "Cause is unspecified.", @@ -1210,7 +1212,9 @@ "Packet sent to Cloud Nat without active NAT IPs.", "Packet is stuck in a routing loop.", "Packet is dropped due to an unspecified reason inside a Google-managed service. Used only for return traces.", - "Packet is dropped due to a load balancer backend instance not having a network interface in the network expected by the load balancer." + "Packet is dropped due to a load balancer backend instance not having a network interface in the network expected by the load balancer.", + "Packet is dropped due to a backend service named port not being defined on the instance group level.", + "Packet is dropped due to a destination IP range being part of a Private NAT IP range." ], "type": "string" }, diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index d32cac15b75..6723f1ee49c 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -1002,6 +1002,10 @@ type DropInfo struct { // "LOAD_BALANCER_BACKEND_INVALID_NETWORK" - Packet is dropped due to a load // balancer backend instance not having a network interface in the network // expected by the load balancer. + // "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED" - Packet is dropped due to a + // backend service named port not being defined on the instance group level. + // "DESTINATION_IS_PRIVATE_NAT_IP_RANGE" - Packet is dropped due to a + // destination IP range being part of a Private NAT IP range. Cause string `json:"cause,omitempty"` // DestinationIp: Destination IP address of the dropped packet (if relevant). DestinationIp string `json:"destinationIp,omitempty"` diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index 7e80b4ba3c2..0c9a235dc6c 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -585,13 +585,180 @@ } } } + }, + "vpcFlowLogsConfigs": { + "methods": { + "create": { + "description": "Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. The following fields are not considered as `settings` for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description ", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", + "httpMethod": "POST", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the VPC Flow Logs configuration to create: `projects/{project_id}/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "vpcFlowLogsConfigId": { + "description": "Required. ID of the `VpcFlowLogsConfig`.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/vpcFlowLogsConfigs", + "request": { + "$ref": "VpcFlowLogsConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a specific `VpcFlowLogsConfig`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + "httpMethod": "DELETE", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `VpcFlowLogsConfig` resource name using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a specific `VpcFlowLogsConfig`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + "httpMethod": "GET", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. `VpcFlowLogsConfig` resource name using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "VpcFlowLogsConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all `VpcFlowLogsConfigs` in a given project.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", + "httpMethod": "GET", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. A filter expression must use the supported [CEL logic operators] (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators).", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Field to use to sort the list.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Number of `VpcFlowLogsConfigs` to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token from an earlier query, as returned in `next_page_token`.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource of the VpcFlowLogsConfig: `projects/{project_id}/locations/global`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/vpcFlowLogsConfigs", + "response": { + "$ref": "ListVpcFlowLogsConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Updating a configuration with state=DISABLED will fail. 2. The following fields are not considered as `settings` for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description ", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", + "httpMethod": "PATCH", + "id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. Unique name of the configuration using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. At least one path must be supplied in this field.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "VpcFlowLogsConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20240725", + "revision": "20240812", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1147,7 +1314,9 @@ "CLOUD_NAT_NO_ADDRESSES", "ROUTING_LOOP", "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE", - "LOAD_BALANCER_BACKEND_INVALID_NETWORK" + "LOAD_BALANCER_BACKEND_INVALID_NETWORK", + "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED", + "DESTINATION_IS_PRIVATE_NAT_IP_RANGE" ], "enumDescriptions": [ "Cause is unspecified.", @@ -1215,7 +1384,9 @@ "Packet sent to Cloud Nat without active NAT IPs.", "Packet is stuck in a routing loop.", "Packet is dropped due to an unspecified reason inside a Google-managed service. Used only for return traces.", - "Packet is dropped due to a load balancer backend instance not having a network interface in the network expected by the load balancer." + "Packet is dropped due to a load balancer backend instance not having a network interface in the network expected by the load balancer.", + "Packet is dropped due to a backend service named port not being defined on the instance group level.", + "Packet is dropped due to a destination IP range being part of a Private NAT IP range." ], "type": "string" }, @@ -1372,6 +1543,14 @@ "projectId": { "description": "Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID: 1. Only the IP address is specified, and the IP address is within a Google Cloud project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.", "type": "string" + }, + "redisCluster": { + "description": "A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) URI.", + "type": "string" + }, + "redisInstance": { + "description": "A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) URI.", + "type": "string" } }, "type": "object" @@ -1821,6 +2000,31 @@ }, "type": "object" }, + "ListVpcFlowLogsConfigsResponse": { + "description": "Response for the `ListVpcFlowLogsConfigs` method.", + "id": "ListVpcFlowLogsConfigsResponse", + "properties": { + "nextPageToken": { + "description": "Page token to fetch the next set of configurations.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached (when querying all locations with `-`).", + "items": { + "type": "string" + }, + "type": "array" + }, + "vpcFlowLogsConfigs": { + "description": "List of VPC Flow Log configurations.", + "items": { + "$ref": "VpcFlowLogsConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "LoadBalancerBackend": { "description": "For display only. Metadata associated with a specific load balancer backend.", "id": "LoadBalancerBackend", @@ -2895,6 +3099,116 @@ }, "type": "object" }, + "VpcFlowLogsConfig": { + "description": "A configuration to generate VPC Flow Logs.", + "id": "VpcFlowLogsConfig", + "properties": { + "aggregationInterval": { + "description": "Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.", + "enum": [ + "AGGREGATION_INTERVAL_UNSPECIFIED", + "INTERVAL_5_SEC", + "INTERVAL_30_SEC", + "INTERVAL_1_MIN", + "INTERVAL_5_MIN", + "INTERVAL_10_MIN", + "INTERVAL_15_MIN" + ], + "enumDescriptions": [ + "If not specified, will default to INTERVAL_5_SEC.", + "Aggregate logs in 5s intervals.", + "Aggregate logs in 30s intervals.", + "Aggregate logs in 1m intervals.", + "Aggregate logs in 5m intervals.", + "Aggregate logs in 10m intervals.", + "Aggregate logs in 15m intervals." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. The time the config was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.", + "type": "string" + }, + "filterExpr": { + "description": "Optional. Export filter used to define which VPC Flow Logs should be logged.", + "type": "string" + }, + "flowSampling": { + "description": "Optional. The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.", + "format": "float", + "type": "number" + }, + "interconnectAttachment": { + "description": "Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource labels to represent user-provided metadata.", + "type": "object" + }, + "metadata": { + "description": "Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.", + "enum": [ + "METADATA_UNSPECIFIED", + "INCLUDE_ALL_METADATA", + "EXCLUDE_ALL_METADATA", + "CUSTOM_METADATA" + ], + "enumDescriptions": [ + "If not specified, will default to INCLUDE_ALL_METADATA.", + "Include all metadata fields.", + "Exclude all metadata fields.", + "Include only custom fields (specified in metadata_fields)." + ], + "type": "string" + }, + "metadataFields": { + "description": "Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if \"metadata\" was set to CUSTOM_METADATA.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Identifier. Unique name of the configuration using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}`", + "type": "string" + }, + "state": { + "description": "Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled.", + "enum": [ + "STATE_UNSPECIFIED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "If not specified, will default to ENABLED.", + "When ENABLED, this configuration will generate logs.", + "When DISABLED, this configuration will not generate logs." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The time the config was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "vpnTunnel": { + "description": "Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}", + "type": "string" + } + }, + "type": "object" + }, "VpnGatewayInfo": { "description": "For display only. Metadata associated with a Compute Engine VPN gateway.", "id": "VpnGatewayInfo", diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 36d37599fbf..2964a499faa 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -169,6 +169,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Global = NewProjectsLocationsGlobalService(s) + rs.VpcFlowLogsConfigs = NewProjectsLocationsVpcFlowLogsConfigsService(s) return rs } @@ -176,6 +177,8 @@ type ProjectsLocationsService struct { s *Service Global *ProjectsLocationsGlobalService + + VpcFlowLogsConfigs *ProjectsLocationsVpcFlowLogsConfigsService } func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { @@ -211,6 +214,15 @@ type ProjectsLocationsGlobalOperationsService struct { s *Service } +func NewProjectsLocationsVpcFlowLogsConfigsService(s *Service) *ProjectsLocationsVpcFlowLogsConfigsService { + rs := &ProjectsLocationsVpcFlowLogsConfigsService{s: s} + return rs +} + +type ProjectsLocationsVpcFlowLogsConfigsService struct { + s *Service +} + // AbortInfo: Details of the final state "abort" and associated resource. type AbortInfo struct { // Cause: Causes that the analysis is aborted. @@ -1006,6 +1018,10 @@ type DropInfo struct { // "LOAD_BALANCER_BACKEND_INVALID_NETWORK" - Packet is dropped due to a load // balancer backend instance not having a network interface in the network // expected by the load balancer. + // "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED" - Packet is dropped due to a + // backend service named port not being defined on the instance group level. + // "DESTINATION_IS_PRIVATE_NAT_IP_RANGE" - Packet is dropped due to a + // destination IP range being part of a Private NAT IP range. Cause string `json:"cause,omitempty"` // DestinationIp: Destination IP address of the dropped packet (if relevant). DestinationIp string `json:"destinationIp,omitempty"` @@ -1152,6 +1168,12 @@ type Endpoint struct { // provide is from the service project. In this case, the network that the IP // address resides in is defined in the host project. ProjectId string `json:"projectId,omitempty"` + // RedisCluster: A Redis Cluster + // (https://cloud.google.com/memorystore/docs/cluster) URI. + RedisCluster string `json:"redisCluster,omitempty"` + // RedisInstance: A Redis Instance + // (https://cloud.google.com/memorystore/docs/redis) URI. + RedisInstance string `json:"redisInstance,omitempty"` // ForceSendFields is a list of field names (e.g. "AppEngineVersion") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1682,6 +1704,37 @@ func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListVpcFlowLogsConfigsResponse: Response for the `ListVpcFlowLogsConfigs` +// method. +type ListVpcFlowLogsConfigsResponse struct { + // NextPageToken: Page token to fetch the next set of configurations. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached (when querying all + // locations with `-`). + Unreachable []string `json:"unreachable,omitempty"` + // VpcFlowLogsConfigs: List of VPC Flow Log configurations. + VpcFlowLogsConfigs []*VpcFlowLogsConfig `json:"vpcFlowLogsConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListVpcFlowLogsConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListVpcFlowLogsConfigsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // LoadBalancerBackend: For display only. Metadata associated with a specific // load balancer backend. type LoadBalancerBackend struct { @@ -2795,6 +2848,108 @@ func (s VpcConnectorInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VpcFlowLogsConfig: A configuration to generate VPC Flow Logs. +type VpcFlowLogsConfig struct { + // AggregationInterval: Optional. The aggregation interval for the logs. + // Default value is INTERVAL_5_SEC. + // + // Possible values: + // "AGGREGATION_INTERVAL_UNSPECIFIED" - If not specified, will default to + // INTERVAL_5_SEC. + // "INTERVAL_5_SEC" - Aggregate logs in 5s intervals. + // "INTERVAL_30_SEC" - Aggregate logs in 30s intervals. + // "INTERVAL_1_MIN" - Aggregate logs in 1m intervals. + // "INTERVAL_5_MIN" - Aggregate logs in 5m intervals. + // "INTERVAL_10_MIN" - Aggregate logs in 10m intervals. + // "INTERVAL_15_MIN" - Aggregate logs in 15m intervals. + AggregationInterval string `json:"aggregationInterval,omitempty"` + // CreateTime: Output only. The time the config was created. + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. The user-supplied description of the VPC Flow Logs + // configuration. Maximum of 512 characters. + Description string `json:"description,omitempty"` + // FilterExpr: Optional. Export filter used to define which VPC Flow Logs + // should be logged. + FilterExpr string `json:"filterExpr,omitempty"` + // FlowSampling: Optional. The value of the field must be in (0, 1]. The + // sampling rate of VPC Flow Logs where 1.0 means all collected logs are + // reported. Setting the sampling rate to 0.0 is not allowed. If you want to + // disable VPC Flow Logs, use the state field instead. Default value is 1.0. + FlowSampling float64 `json:"flowSampling,omitempty"` + // InterconnectAttachment: Traffic will be logged from the Interconnect + // Attachment. Format: + // projects/{project_id}/regions/{region}/interconnectAttachments/{name} + InterconnectAttachment string `json:"interconnectAttachment,omitempty"` + // Labels: Optional. Resource labels to represent user-provided metadata. + Labels map[string]string `json:"labels,omitempty"` + // Metadata: Optional. Configures whether all, none or a subset of metadata + // fields should be added to the reported VPC flow logs. Default value is + // INCLUDE_ALL_METADATA. + // + // Possible values: + // "METADATA_UNSPECIFIED" - If not specified, will default to + // INCLUDE_ALL_METADATA. + // "INCLUDE_ALL_METADATA" - Include all metadata fields. + // "EXCLUDE_ALL_METADATA" - Exclude all metadata fields. + // "CUSTOM_METADATA" - Include only custom fields (specified in + // metadata_fields). + Metadata string `json:"metadata,omitempty"` + // MetadataFields: Optional. Custom metadata fields to include in the reported + // VPC flow logs. Can only be specified if "metadata" was set to + // CUSTOM_METADATA. + MetadataFields []string `json:"metadataFields,omitempty"` + // Name: Identifier. Unique name of the configuration using the form: + // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_con + // fig_id}` + Name string `json:"name,omitempty"` + // State: Optional. The state of the VPC Flow Log configuration. Default value + // is ENABLED. When creating a new configuration, it must be enabled. + // + // Possible values: + // "STATE_UNSPECIFIED" - If not specified, will default to ENABLED. + // "ENABLED" - When ENABLED, this configuration will generate logs. + // "DISABLED" - When DISABLED, this configuration will not generate logs. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The time the config was updated. + UpdateTime string `json:"updateTime,omitempty"` + // VpnTunnel: Traffic will be logged from the VPN Tunnel. Format: + // projects/{project_id}/regions/{region}/vpnTunnels/{name} + VpnTunnel string `json:"vpnTunnel,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AggregationInterval") 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. "AggregationInterval") 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 VpcFlowLogsConfig) MarshalJSON() ([]byte, error) { + type NoMethod VpcFlowLogsConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *VpcFlowLogsConfig) UnmarshalJSON(data []byte) error { + type NoMethod VpcFlowLogsConfig + var s1 struct { + FlowSampling gensupport.JSONFloat64 `json:"flowSampling"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.FlowSampling = float64(s1.FlowSampling) + return nil +} + // VpnGatewayInfo: For display only. Metadata associated with a Compute Engine // VPN gateway. type VpnGatewayInfo struct { @@ -4663,3 +4818,602 @@ func (c *ProjectsLocationsGlobalOperationsListCall) Pages(ctx context.Context, f c.PageToken(x.NextPageToken) } } + +type ProjectsLocationsVpcFlowLogsConfigsCreateCall struct { + s *Service + parent string + vpcflowlogsconfig *VpcFlowLogsConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new `VpcFlowLogsConfig`. If a configuration with the exact +// same settings already exists (even if the ID is different), the creation +// fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. +// The following fields are not considered as `settings` for the purpose of the +// check mentioned above, therefore - creating another configuration with the +// same fields but different values for the following fields will fail as well: +// - name - create_time - update_time - labels - description +// +// - parent: The parent resource of the VPC Flow Logs configuration to create: +// `projects/{project_id}/locations/global`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) Create(parent string, vpcflowlogsconfig *VpcFlowLogsConfig) *ProjectsLocationsVpcFlowLogsConfigsCreateCall { + c := &ProjectsLocationsVpcFlowLogsConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.vpcflowlogsconfig = vpcflowlogsconfig + return c +} + +// VpcFlowLogsConfigId sets the optional parameter "vpcFlowLogsConfigId": +// Required. ID of the `VpcFlowLogsConfig`. +func (c *ProjectsLocationsVpcFlowLogsConfigsCreateCall) VpcFlowLogsConfigId(vpcFlowLogsConfigId string) *ProjectsLocationsVpcFlowLogsConfigsCreateCall { + c.urlParams_.Set("vpcFlowLogsConfigId", vpcFlowLogsConfigId) + 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 *ProjectsLocationsVpcFlowLogsConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVpcFlowLogsConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsCreateCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpcflowlogsconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/vpcFlowLogsConfigs") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkmanagement.projects.locations.vpcFlowLogsConfigs.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsVpcFlowLogsConfigsCreateCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsVpcFlowLogsConfigsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a specific `VpcFlowLogsConfig`. +// +// - name: `VpcFlowLogsConfig` resource name using the form: +// `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_c +// onfig}`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) Delete(name string) *ProjectsLocationsVpcFlowLogsConfigsDeleteCall { + c := &ProjectsLocationsVpcFlowLogsConfigsDeleteCall{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 *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsDeleteCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkmanagement.projects.locations.vpcFlowLogsConfigs.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 *ProjectsLocationsVpcFlowLogsConfigsDeleteCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsVpcFlowLogsConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a specific `VpcFlowLogsConfig`. +// +// - name: `VpcFlowLogsConfig` resource name using the form: +// `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_c +// onfig}`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) Get(name string) *ProjectsLocationsVpcFlowLogsConfigsGetCall { + c := &ProjectsLocationsVpcFlowLogsConfigsGetCall{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 *ProjectsLocationsVpcFlowLogsConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsGetCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVpcFlowLogsConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVpcFlowLogsConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsGetCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkmanagement.projects.locations.vpcFlowLogsConfigs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *VpcFlowLogsConfig.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 *ProjectsLocationsVpcFlowLogsConfigsGetCall) Do(opts ...googleapi.CallOption) (*VpcFlowLogsConfig, 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 := &VpcFlowLogsConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsVpcFlowLogsConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all `VpcFlowLogsConfigs` in a given project. +// +// - parent: The parent resource of the VpcFlowLogsConfig: +// `projects/{project_id}/locations/global`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) List(parent string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c := &ProjectsLocationsVpcFlowLogsConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the `VpcFlowLogsConfigs` +// that match the filter expression. A filter expression must use the supported +// [CEL logic operators] +// (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) Filter(filter string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Field to use to sort the +// list. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Number of +// `VpcFlowLogsConfigs` to return. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token from an +// earlier query, as returned in `next_page_token`. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) PageToken(pageToken string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsListCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVpcFlowLogsConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsListCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/vpcFlowLogsConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkmanagement.projects.locations.vpcFlowLogsConfigs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListVpcFlowLogsConfigsResponse.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 *ProjectsLocationsVpcFlowLogsConfigsListCall) Do(opts ...googleapi.CallOption) (*ListVpcFlowLogsConfigsResponse, 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 := &ListVpcFlowLogsConfigsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsLocationsVpcFlowLogsConfigsListCall) Pages(ctx context.Context, f func(*ListVpcFlowLogsConfigsResponse) 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 ProjectsLocationsVpcFlowLogsConfigsPatchCall struct { + s *Service + name string + vpcflowlogsconfig *VpcFlowLogsConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing `VpcFlowLogsConfig`. If a configuration with the +// exact same settings already exists (even if the ID is different), the +// creation fails. Notes: 1. Updating a configuration with state=DISABLED will +// fail. 2. The following fields are not considered as `settings` for the +// purpose of the check mentioned above, therefore - updating another +// configuration with the same fields but different values for the following +// fields will fail as well: - name - create_time - update_time - labels - +// description +// +// - name: Identifier. Unique name of the configuration using the form: +// `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_c +// onfig_id}`. +func (r *ProjectsLocationsVpcFlowLogsConfigsService) Patch(name string, vpcflowlogsconfig *VpcFlowLogsConfig) *ProjectsLocationsVpcFlowLogsConfigsPatchCall { + c := &ProjectsLocationsVpcFlowLogsConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.vpcflowlogsconfig = vpcflowlogsconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. At least one path must be supplied in this field. +func (c *ProjectsLocationsVpcFlowLogsConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVpcFlowLogsConfigsPatchCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVpcFlowLogsConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsVpcFlowLogsConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsVpcFlowLogsConfigsPatchCall { + 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 *ProjectsLocationsVpcFlowLogsConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsVpcFlowLogsConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpcflowlogsconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkmanagement.projects.locations.vpcFlowLogsConfigs.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 *ProjectsLocationsVpcFlowLogsConfigsPatchCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index 6280adc0dbe..e43177cd4e1 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -2408,7 +2408,7 @@ } } }, - "revision": "20240721", + "revision": "20240818", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2814,6 +2814,18 @@ }, "type": "array" }, + "routingMode": { + "description": "Optional. The routing mode of the Gateway. This field is configurable only for gateways of type SECURE_WEB_GATEWAY. This field is required for gateways of type SECURE_WEB_GATEWAY.", + "enum": [ + "EXPLICIT_ROUTING_MODE", + "NEXT_HOP_ROUTING_MODE" + ], + "enumDescriptions": [ + "The routing mode is explicit; clients are configured to send traffic through the gateway. This is the default routing mode.", + "The routing mode is next-hop. Clients are unaware of the gateway, and a route (advanced route or other route type) can be configured to direct traffic from client to gateway. The gateway then acts as a next-hop to the destination." + ], + "type": "string" + }, "scope": { "description": "Optional. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", "type": "string" @@ -3049,7 +3061,7 @@ "type": "object" }, "GrpcRouteRetryPolicy": { - "description": "The specifications for retries.", + "description": "The specifications for retries. Specifies one or more conditions for which this retry rule applies. Valid values are:", "id": "GrpcRouteRetryPolicy", "properties": { "numRetries": { diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index b3355652ab6..dc86537ce0c 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -967,6 +967,19 @@ type Gateway struct { // 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple // ports. Ports []int64 `json:"ports,omitempty"` + // RoutingMode: Optional. The routing mode of the Gateway. This field is + // configurable only for gateways of type SECURE_WEB_GATEWAY. This field is + // required for gateways of type SECURE_WEB_GATEWAY. + // + // Possible values: + // "EXPLICIT_ROUTING_MODE" - The routing mode is explicit; clients are + // configured to send traffic through the gateway. This is the default routing + // mode. + // "NEXT_HOP_ROUTING_MODE" - The routing mode is next-hop. Clients are + // unaware of the gateway, and a route (advanced route or other route type) can + // be configured to direct traffic from client to gateway. The gateway then + // acts as a next-hop to the destination. + RoutingMode string `json:"routingMode,omitempty"` // Scope: Optional. Scope determines how configuration across multiple Gateway // instances are merged. The configuration for multiple Gateway instances with // the same scope will be merged as presented as a single coniguration to the @@ -1278,7 +1291,8 @@ func (s GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GrpcRouteRetryPolicy: The specifications for retries. +// GrpcRouteRetryPolicy: The specifications for retries. Specifies one or more +// conditions for which this retry rule applies. Valid values are: type GrpcRouteRetryPolicy struct { // NumRetries: Specifies the allowed number of retries. This number must be > // 0. If not specified, default to 1. diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 20609daf9c0..f3b5c2562a3 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -2317,7 +2317,7 @@ } } }, - "revision": "20240721", + "revision": "20240818", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -2772,6 +2772,18 @@ }, "type": "array" }, + "routingMode": { + "description": "Optional. The routing mode of the Gateway. This field is configurable only for gateways of type SECURE_WEB_GATEWAY. This field is required for gateways of type SECURE_WEB_GATEWAY.", + "enum": [ + "EXPLICIT_ROUTING_MODE", + "NEXT_HOP_ROUTING_MODE" + ], + "enumDescriptions": [ + "The routing mode is explicit; clients are configured to send traffic through the gateway. This is the default routing mode.", + "The routing mode is next-hop. Clients are unaware of the gateway, and a route (advanced route or other route type) can be configured to direct traffic from client to gateway. The gateway then acts as a next-hop to the destination." + ], + "type": "string" + }, "scope": { "description": "Optional. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", "type": "string" @@ -3007,7 +3019,7 @@ "type": "object" }, "GrpcRouteRetryPolicy": { - "description": "The specifications for retries.", + "description": "The specifications for retries. Specifies one or more conditions for which this retry rule applies. Valid values are:", "id": "GrpcRouteRetryPolicy", "properties": { "numRetries": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index f5c2b1fba7d..d7cbe33fe10 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -967,6 +967,19 @@ type Gateway struct { // 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple // ports. Ports []int64 `json:"ports,omitempty"` + // RoutingMode: Optional. The routing mode of the Gateway. This field is + // configurable only for gateways of type SECURE_WEB_GATEWAY. This field is + // required for gateways of type SECURE_WEB_GATEWAY. + // + // Possible values: + // "EXPLICIT_ROUTING_MODE" - The routing mode is explicit; clients are + // configured to send traffic through the gateway. This is the default routing + // mode. + // "NEXT_HOP_ROUTING_MODE" - The routing mode is next-hop. Clients are + // unaware of the gateway, and a route (advanced route or other route type) can + // be configured to direct traffic from client to gateway. The gateway then + // acts as a next-hop to the destination. + RoutingMode string `json:"routingMode,omitempty"` // Scope: Optional. Scope determines how configuration across multiple Gateway // instances are merged. The configuration for multiple Gateway instances with // the same scope will be merged as presented as a single coniguration to the @@ -1278,7 +1291,8 @@ func (s GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GrpcRouteRetryPolicy: The specifications for retries. +// GrpcRouteRetryPolicy: The specifications for retries. Specifies one or more +// conditions for which this retry rule applies. Valid values are: type GrpcRouteRetryPolicy struct { // NumRetries: Specifies the allowed number of retries. This number must be > // 0. If not specified, default to 1. diff --git a/notebooks/v1/notebooks-api.json b/notebooks/v1/notebooks-api.json index 30baebd2cae..f4341260943 100644 --- a/notebooks/v1/notebooks-api.json +++ b/notebooks/v1/notebooks-api.json @@ -2008,7 +2008,7 @@ } } }, - "revision": "20240314", + "revision": "20240820", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2035,6 +2035,8 @@ "NVIDIA_TESLA_T4_VWS", "NVIDIA_TESLA_P100_VWS", "NVIDIA_TESLA_P4_VWS", + "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3" ], @@ -2051,6 +2053,8 @@ "Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P4 Virtual Workstations.", + "Accelerator type is NVIDIA H100 80GB.", + "Accelerator type is NVIDIA H100 Mega 80GB.", "(Coming soon) Accelerator type is TPU V2.", "(Coming soon) Accelerator type is TPU V3." ], @@ -4058,6 +4062,8 @@ "NVIDIA_TESLA_T4_VWS", "NVIDIA_TESLA_P100_VWS", "NVIDIA_TESLA_P4_VWS", + "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3" ], @@ -4074,6 +4080,8 @@ "Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", "Accelerator type is NVIDIA Tesla P4 Virtual Workstations.", + "Accelerator type is NVIDIA H100 80GB.", + "Accelerator type is NVIDIA H100 Mega 80GB.", "(Coming soon) Accelerator type is TPU V2.", "(Coming soon) Accelerator type is TPU V3." ], diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index 5841e2d61ed..75653bc72a9 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -272,6 +272,8 @@ type AcceleratorConfig struct { // Workstations. // "NVIDIA_TESLA_P4_VWS" - Accelerator type is NVIDIA Tesla P4 Virtual // Workstations. + // "NVIDIA_H100_80GB" - Accelerator type is NVIDIA H100 80GB. + // "NVIDIA_H100_MEGA_80GB" - Accelerator type is NVIDIA H100 Mega 80GB. // "TPU_V2" - (Coming soon) Accelerator type is TPU V2. // "TPU_V3" - (Coming soon) Accelerator type is TPU V3. Type string `json:"type,omitempty"` @@ -2723,6 +2725,8 @@ type SetInstanceAcceleratorRequest struct { // Workstations. // "NVIDIA_TESLA_P4_VWS" - Accelerator type is NVIDIA Tesla P4 Virtual // Workstations. + // "NVIDIA_H100_80GB" - Accelerator type is NVIDIA H100 80GB. + // "NVIDIA_H100_MEGA_80GB" - Accelerator type is NVIDIA H100 Mega 80GB. // "TPU_V2" - (Coming soon) Accelerator type is TPU V2. // "TPU_V3" - (Coming soon) Accelerator type is TPU V3. Type string `json:"type,omitempty"` diff --git a/notebooks/v2/notebooks-api.json b/notebooks/v2/notebooks-api.json index d889d9e6e42..22a4dfac4a2 100644 --- a/notebooks/v2/notebooks-api.json +++ b/notebooks/v2/notebooks-api.json @@ -550,6 +550,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "restore": { + "description": "RestoreInstance restores an Instance from a BackupSource.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:restore", + "httpMethod": "POST", + "id": "notebooks.projects.locations.instances.restore", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:restore", + "request": { + "$ref": "RestoreInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "rollback": { "description": "Rollbacks a notebook instance to the previous version.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:rollback", @@ -876,7 +904,7 @@ } } }, - "revision": "20240731", + "revision": "20240820", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1768,6 +1796,17 @@ }, "type": "object" }, + "RestoreInstanceRequest": { + "description": "Request for restoring the notebook instance from a BackupSource.", + "id": "RestoreInstanceRequest", + "properties": { + "snapshot": { + "$ref": "Snapshot", + "description": "Snapshot to be used for restore." + } + }, + "type": "object" + }, "RollbackInstanceRequest": { "description": "Request for rollbacking a notebook instance", "id": "RollbackInstanceRequest", @@ -1833,6 +1872,21 @@ }, "type": "object" }, + "Snapshot": { + "description": "Snapshot represents the snapshot of the data disk used to restore the Workbench Instance from. Refers to: compute/v1/projects/{project_id}/global/snapshots/{snapshot_id}", + "id": "Snapshot", + "properties": { + "projectId": { + "description": "Required. The project ID of the snapshot.", + "type": "string" + }, + "snapshotId": { + "description": "Required. The ID of the snapshot.", + "type": "string" + } + }, + "type": "object" + }, "StartInstanceRequest": { "description": "Request for starting a notebook instance", "id": "StartInstanceRequest", diff --git a/notebooks/v2/notebooks-gen.go b/notebooks/v2/notebooks-gen.go index df5fb7850ba..3b13b939e21 100644 --- a/notebooks/v2/notebooks-gen.go +++ b/notebooks/v2/notebooks-gen.go @@ -1364,6 +1364,29 @@ func (s ResizeDiskRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RestoreInstanceRequest: Request for restoring the notebook instance from a +// BackupSource. +type RestoreInstanceRequest struct { + // Snapshot: Snapshot to be used for restore. + Snapshot *Snapshot `json:"snapshot,omitempty"` + // ForceSendFields is a list of field names (e.g. "Snapshot") 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. "Snapshot") 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 RestoreInstanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestoreInstanceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RollbackInstanceRequest: Request for rollbacking a notebook instance type RollbackInstanceRequest struct { // RevisionId: Required. Output only. Revision Id @@ -1479,6 +1502,32 @@ func (s ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Snapshot: Snapshot represents the snapshot of the data disk used to restore +// the Workbench Instance from. Refers to: +// compute/v1/projects/{project_id}/global/snapshots/{snapshot_id} +type Snapshot struct { + // ProjectId: Required. The project ID of the snapshot. + ProjectId string `json:"projectId,omitempty"` + // SnapshotId: Required. The ID of the snapshot. + SnapshotId string `json:"snapshotId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectId") 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. "ProjectId") 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 Snapshot) MarshalJSON() ([]byte, error) { + type NoMethod Snapshot + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // StartInstanceRequest: Request for starting a notebook instance type StartInstanceRequest struct { } @@ -3320,6 +3369,108 @@ func (c *ProjectsLocationsInstancesResizeDiskCall) Do(opts ...googleapi.CallOpti return ret, nil } +type ProjectsLocationsInstancesRestoreCall struct { + s *Service + name string + restoreinstancerequest *RestoreInstanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: RestoreInstance restores an Instance from a BackupSource. +// +// - name: Format: +// `projects/{project_id}/locations/{location}/instances/{instance_id}`. +func (r *ProjectsLocationsInstancesService) Restore(name string, restoreinstancerequest *RestoreInstanceRequest) *ProjectsLocationsInstancesRestoreCall { + c := &ProjectsLocationsInstancesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.restoreinstancerequest = restoreinstancerequest + 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 *ProjectsLocationsInstancesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesRestoreCall) Context(ctx context.Context) *ProjectsLocationsInstancesRestoreCall { + 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 *ProjectsLocationsInstancesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoreinstancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:restore") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "notebooks.projects.locations.instances.restore" 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 *ProjectsLocationsInstancesRestoreCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsInstancesRollbackCall struct { s *Service name string diff --git a/option/internaloption/internaloption_test.go b/option/internaloption/internaloption_test.go index 8917f885dfa..81cfcd50d96 100644 --- a/option/internaloption/internaloption_test.go +++ b/option/internaloption/internaloption_test.go @@ -58,6 +58,6 @@ func TestDefaultApply(t *testing.T) { cmpopts.IgnoreFields(google.Credentials{}, "udMu", "universeDomain"), } if !cmp.Equal(got, want, ignore...) { - t.Errorf(cmp.Diff(got, want, ignore...)) + t.Error(cmp.Diff(got, want, ignore...)) } } diff --git a/option/option_test.go b/option/option_test.go index a1e60418088..04c3716513b 100644 --- a/option/option_test.go +++ b/option/option_test.go @@ -99,7 +99,7 @@ func TestApply(t *testing.T) { cmpopts.IgnoreFields(google.Credentials{}, "udMu", "universeDomain"), } if !cmp.Equal(got, want, ignore...) { - t.Errorf(cmp.Diff(got, want, ignore...)) + t.Error(cmp.Diff(got, want, ignore...)) } } @@ -130,6 +130,6 @@ func TestApplyClientCertSource(t *testing.T) { t.Error(err) } if !cmp.Equal(certGot, certWant, cmpopts.IgnoreUnexported(big.Int{}), cmpopts.IgnoreFields(tls.Certificate{}, "Leaf")) { - t.Errorf(cmp.Diff(certGot, certWant, cmpopts.IgnoreUnexported(big.Int{}), cmpopts.IgnoreFields(tls.Certificate{}, "Leaf"))) + t.Error(cmp.Diff(certGot, certWant, cmpopts.IgnoreUnexported(big.Int{}), cmpopts.IgnoreFields(tls.Certificate{}, "Leaf"))) } } diff --git a/places/v1/places-api.json b/places/v1/places-api.json index 8ec83107592..decc339a580 100644 --- a/places/v1/places-api.json +++ b/places/v1/places-api.json @@ -276,7 +276,7 @@ } } }, - "revision": "20240729", + "revision": "20240825", "rootUrl": "https://places.googleapis.com/", "schemas": { "GoogleGeoTypeViewport": { @@ -1817,7 +1817,7 @@ "id": "GoogleMapsPlacesV1SearchTextResponse", "properties": { "contextualContents": { - "description": "Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details. A list of contextual contents where each entry associates to the corresponding place in the same index in the places field. The contents that are relevant to the `text_query` in the request are preferred. If the contextual content is not available for one of the places, it will return non-contextual content. It will be empty only when the content is unavailable for this place. This list should have as many entries as the list of places if requested.", + "description": "Experimental: See https://developers.google.com/maps/documentation/places/web-service/experimental/places-generative for more details. A list of contextual contents where each entry associates to the corresponding place in the same index in the places field. The contents that are relevant to the `text_query` in the request are preferred. If the contextual content is not available for one of the places, it will return non-contextual content. It will be empty only when the content is unavailable for this place. This list will have as many entries as the list of places if requested.", "items": { "$ref": "GoogleMapsPlacesV1ContextualContent" }, diff --git a/places/v1/places-gen.go b/places/v1/places-gen.go index 8ac63124559..afe219233e1 100644 --- a/places/v1/places-gen.go +++ b/places/v1/places-gen.go @@ -2263,8 +2263,8 @@ type GoogleMapsPlacesV1SearchTextResponse struct { // contents that are relevant to the `text_query` in the request are preferred. // If the contextual content is not available for one of the places, it will // return non-contextual content. It will be empty only when the content is - // unavailable for this place. This list should have as many entries as the - // list of places if requested. + // unavailable for this place. This list will have as many entries as the list + // of places if requested. ContextualContents []*GoogleMapsPlacesV1ContextualContent `json:"contextualContents,omitempty"` // NextPageToken: A token that can be sent as `page_token` to retrieve the next // page. If this field is omitted or empty, there are no subsequent pages. diff --git a/playintegrity/v1/playintegrity-api.json b/playintegrity/v1/playintegrity-api.json index 91f9cee8b6d..a423ad4c106 100644 --- a/playintegrity/v1/playintegrity-api.json +++ b/playintegrity/v1/playintegrity-api.json @@ -170,7 +170,7 @@ } } }, - "revision": "20240725", + "revision": "20240813", "rootUrl": "https://playintegrity.googleapis.com/", "schemas": { "AccountActivity": { @@ -367,7 +367,7 @@ "type": "object" }, "DeviceIntegrity": { - "description": "Contains the device attestation information. Next tag: 4", + "description": "Contains the device attestation information.", "id": "DeviceIntegrity", "properties": { "deviceRecall": { @@ -403,7 +403,7 @@ "type": "object" }, "DeviceRecall": { - "description": "Contains the recall bits per device set by the developer. Next tag: 3", + "description": "Contains the recall bits per device set by the developer.", "id": "DeviceRecall", "properties": { "values": { @@ -589,7 +589,7 @@ "id": "WriteDeviceRecallRequest", "properties": { "integrityToken": { - "description": "Required. Integrity token obtained from calling Play Integrity API. Note that the integrity token contains the existing device recall bits. The write will only succeed if those bits in the integrity token are up to date.", + "description": "Required. Integrity token obtained from calling Play Integrity API.", "type": "string" }, "newValues": { diff --git a/playintegrity/v1/playintegrity-gen.go b/playintegrity/v1/playintegrity-gen.go index eddf6faa50c..eba28198029 100644 --- a/playintegrity/v1/playintegrity-gen.go +++ b/playintegrity/v1/playintegrity-gen.go @@ -428,7 +428,7 @@ func (s DecodeIntegrityTokenResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DeviceIntegrity: Contains the device attestation information. Next tag: 4 +// DeviceIntegrity: Contains the device attestation information. type DeviceIntegrity struct { // DeviceRecall: Details about the device recall bits set by the developer. DeviceRecall *DeviceRecall `json:"deviceRecall,omitempty"` @@ -470,8 +470,7 @@ func (s DeviceIntegrity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DeviceRecall: Contains the recall bits per device set by the developer. Next -// tag: 3 +// DeviceRecall: Contains the recall bits per device set by the developer. type DeviceRecall struct { // Values: Required. Contains the recall bits values. Values *Values `json:"values,omitempty"` @@ -721,9 +720,7 @@ func (s WriteDates) MarshalJSON() ([]byte, error) { // WriteDeviceRecallRequest: Request to write device recall bits. type WriteDeviceRecallRequest struct { // IntegrityToken: Required. Integrity token obtained from calling Play - // Integrity API. Note that the integrity token contains the existing device - // recall bits. The write will only succeed if those bits in the integrity - // token are up to date. + // Integrity API. IntegrityToken string `json:"integrityToken,omitempty"` // NewValues: Required. The new values for the device recall bits to be // written. diff --git a/pollen/v1/pollen-api.json b/pollen/v1/pollen-api.json index 31fd9c6ce06..4871c7b32ae 100644 --- a/pollen/v1/pollen-api.json +++ b/pollen/v1/pollen-api.json @@ -233,7 +233,7 @@ } } }, - "revision": "20240720", + "revision": "20240825", "rootUrl": "https://pollen.googleapis.com/", "schemas": { "Color": { @@ -471,7 +471,9 @@ "HAZEL", "GRAMINALES", "RAGWEED", - "MUGWORT" + "MUGWORT", + "JAPANESE_CEDAR", + "JAPANESE_CYPRESS" ], "enumDescriptions": [ "Unspecified plant code.", @@ -489,7 +491,9 @@ "Hazel is classified as a tree pollen type.", "Graminales is classified as a grass pollen type.", "Ragweed is classified as a weed pollen type.", - "Mugwort is classified as a weed pollen type." + "Mugwort is classified as a weed pollen type.", + "Japanese cedar is classified as a tree pollen type.", + "Japanese cypress is classified as a tree pollen type." ], "type": "string" }, diff --git a/pollen/v1/pollen-gen.go b/pollen/v1/pollen-gen.go index 65502de8f5c..f2bd3fb19c6 100644 --- a/pollen/v1/pollen-gen.go +++ b/pollen/v1/pollen-gen.go @@ -549,6 +549,8 @@ type PlantInfo struct { // "GRAMINALES" - Graminales is classified as a grass pollen type. // "RAGWEED" - Ragweed is classified as a weed pollen type. // "MUGWORT" - Mugwort is classified as a weed pollen type. + // "JAPANESE_CEDAR" - Japanese cedar is classified as a tree pollen type. + // "JAPANESE_CYPRESS" - Japanese cypress is classified as a tree pollen type. Code string `json:"code,omitempty"` // DisplayName: A human readable representation of the plant name. Example: // “Cottonwood". diff --git a/privateca/v1/privateca-api.json b/privateca/v1/privateca-api.json index 8e4eda8e548..dcd90fe2b1e 100644 --- a/privateca/v1/privateca-api.json +++ b/privateca/v1/privateca-api.json @@ -1605,7 +1605,7 @@ } } }, - "revision": "20240529", + "revision": "20240819", "rootUrl": "https://privateca.googleapis.com/", "schemas": { "AccessUrls": { @@ -2113,6 +2113,10 @@ "$ref": "KeyId", "description": "Provides a means of identifiying certificates that contain a particular public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2." }, + "tbsCertificateDigest": { + "description": "The hash of the pre-signed certificate, which will be signed by the CA. Corresponds to the TBS Certificate in https://tools.ietf.org/html/rfc5280#section-4.1.2. The field will always be populated.", + "type": "string" + }, "x509Description": { "$ref": "X509Parameters", "description": "Describes some of the technical X.509 fields in a certificate." diff --git a/privateca/v1/privateca-gen.go b/privateca/v1/privateca-gen.go index c0a2f54ce88..ae4c8322986 100644 --- a/privateca/v1/privateca-gen.go +++ b/privateca/v1/privateca-gen.go @@ -906,6 +906,11 @@ type CertificateDescription struct { // particular public key, per // https://tools.ietf.org/html/rfc5280#section-4.2.1.2. SubjectKeyId *KeyId `json:"subjectKeyId,omitempty"` + // TbsCertificateDigest: The hash of the pre-signed certificate, which will be + // signed by the CA. Corresponds to the TBS Certificate in + // https://tools.ietf.org/html/rfc5280#section-4.1.2. The field will always be + // populated. + TbsCertificateDigest string `json:"tbsCertificateDigest,omitempty"` // X509Description: Describes some of the technical X.509 fields in a // certificate. X509Description *X509Parameters `json:"x509Description,omitempty"` diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 554ac63ce3a..ac4b0ced7e3 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -516,6 +516,42 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "listIpOverrides": { + "description": "Lists all IP overrides for a key.", + "flatPath": "v1/projects/{projectsId}/keys/{keysId}:listIpOverrides", + "httpMethod": "GET", + "id": "recaptchaenterprise.projects.keys.listIpOverrides", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of overrides to return. Default is 10. Max limit is 100. If the number of overrides is less than the page_size, all overrides are returned. If the page size is more than 100, it is coerced to 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous ListIpOverridesRequest, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent key for which the IP overrides are listed, in the format `projects/{project}/keys/{key}`.", + "location": "path", + "pattern": "^projects/[^/]+/keys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:listIpOverrides", + "response": { + "$ref": "GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "migrate": { "description": "Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.", "flatPath": "v1/projects/{projectsId}/keys/{keysId}:migrate", @@ -578,6 +614,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "removeIpOverride": { + "description": "Removes an IP override from a key. The following restrictions hold: * If the IP isn't found in an existing IP override, a `NOT_FOUND` error will be returned. * If the IP is found in an existing IP override, but the override type does not match, a `NOT_FOUND` error will be returned.", + "flatPath": "v1/projects/{projectsId}/keys/{keysId}:removeIpOverride", + "httpMethod": "POST", + "id": "recaptchaenterprise.projects.keys.removeIpOverride", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the key from which the IP override is removed, in the format `projects/{project}/keys/{key}`.", + "location": "path", + "pattern": "^projects/[^/]+/keys/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:removeIpOverride", + "request": { + "$ref": "GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest" + }, + "response": { + "$ref": "GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "retrieveLegacySecretKey": { "description": "Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.", "flatPath": "v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey", @@ -722,7 +786,7 @@ } } }, - "revision": "20240804", + "revision": "20240811", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -1538,6 +1602,24 @@ }, "type": "object" }, + "GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse": { + "description": "Response for ListIpOverrides.", + "id": "GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse", + "properties": { + "ipOverrides": { + "description": "IP Overrides details.", + "items": { + "$ref": "GoogleCloudRecaptchaenterpriseV1IpOverrideData" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results. If this field is empty, no keys remain in the results.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRecaptchaenterpriseV1ListKeysResponse": { "description": "Response to request to list keys in a project.", "id": "GoogleCloudRecaptchaenterpriseV1ListKeysResponse", @@ -1710,6 +1792,23 @@ }, "type": "object" }, + "GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest": { + "description": "The removeIpOverride request message.", + "id": "GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest", + "properties": { + "ipOverrideData": { + "$ref": "GoogleCloudRecaptchaenterpriseV1IpOverrideData", + "description": "Required. IP override to be removed from the key." + } + }, + "type": "object" + }, + "GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse": { + "description": "Response for RemoveIpOverride.", + "id": "GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest": { "description": "The reorder firewall policies request message.", "id": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest", diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index 2b2d6fbc32b..e5c9dd85e90 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -1362,6 +1362,35 @@ func (s GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse) MarshalJSO return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse: Response for +// ListIpOverrides. +type GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse struct { + // IpOverrides: IP Overrides details. + IpOverrides []*GoogleCloudRecaptchaenterpriseV1IpOverrideData `json:"ipOverrides,omitempty"` + // NextPageToken: Token to retrieve the next page of results. If this field is + // empty, no keys remain in the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "IpOverrides") 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. "IpOverrides") 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 GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRecaptchaenterpriseV1ListKeysResponse: Response to request to // list keys in a project. type GoogleCloudRecaptchaenterpriseV1ListKeysResponse struct { @@ -1636,6 +1665,36 @@ func (s GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership) MarshalJS return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest: The +// removeIpOverride request message. +type GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest struct { + // IpOverrideData: Required. IP override to be removed from the key. + IpOverrideData *GoogleCloudRecaptchaenterpriseV1IpOverrideData `json:"ipOverrideData,omitempty"` + // ForceSendFields is a list of field names (e.g. "IpOverrideData") 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. "IpOverrideData") 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 GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse: Response for +// RemoveIpOverride. +type GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + // GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest: The reorder // firewall policies request message. type GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest struct { @@ -4118,6 +4177,152 @@ func (c *ProjectsKeysListCall) Pages(ctx context.Context, f func(*GoogleCloudRec } } +type ProjectsKeysListIpOverridesCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListIpOverrides: Lists all IP overrides for a key. +// +// - parent: The parent key for which the IP overrides are listed, in the +// format `projects/{project}/keys/{key}`. +func (r *ProjectsKeysService) ListIpOverrides(parent string) *ProjectsKeysListIpOverridesCall { + c := &ProjectsKeysListIpOverridesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// overrides to return. Default is 10. Max limit is 100. If the number of +// overrides is less than the page_size, all overrides are returned. If the +// page size is more than 100, it is coerced to 100. +func (c *ProjectsKeysListIpOverridesCall) PageSize(pageSize int64) *ProjectsKeysListIpOverridesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The next_page_token value +// returned from a previous ListIpOverridesRequest, if any. +func (c *ProjectsKeysListIpOverridesCall) PageToken(pageToken string) *ProjectsKeysListIpOverridesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsKeysListIpOverridesCall) Fields(s ...googleapi.Field) *ProjectsKeysListIpOverridesCall { + 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 *ProjectsKeysListIpOverridesCall) IfNoneMatch(entityTag string) *ProjectsKeysListIpOverridesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsKeysListIpOverridesCall) Context(ctx context.Context) *ProjectsKeysListIpOverridesCall { + 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 *ProjectsKeysListIpOverridesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsKeysListIpOverridesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:listIpOverrides") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recaptchaenterprise.projects.keys.listIpOverrides" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse.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 *ProjectsKeysListIpOverridesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse, 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 := &GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + 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 *ProjectsKeysListIpOverridesCall) Pages(ctx context.Context, f func(*GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse) 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 ProjectsKeysMigrateCall struct { s *Service name string @@ -4336,6 +4541,113 @@ func (c *ProjectsKeysPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRe return ret, nil } +type ProjectsKeysRemoveIpOverrideCall struct { + s *Service + name string + googlecloudrecaptchaenterprisev1removeipoverriderequest *GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveIpOverride: Removes an IP override from a key. The following +// restrictions hold: * If the IP isn't found in an existing IP override, a +// `NOT_FOUND` error will be returned. * If the IP is found in an existing IP +// override, but the override type does not match, a `NOT_FOUND` error will be +// returned. +// +// - name: The name of the key from which the IP override is removed, in the +// format `projects/{project}/keys/{key}`. +func (r *ProjectsKeysService) RemoveIpOverride(name string, googlecloudrecaptchaenterprisev1removeipoverriderequest *GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest) *ProjectsKeysRemoveIpOverrideCall { + c := &ProjectsKeysRemoveIpOverrideCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecaptchaenterprisev1removeipoverriderequest = googlecloudrecaptchaenterprisev1removeipoverriderequest + 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 *ProjectsKeysRemoveIpOverrideCall) Fields(s ...googleapi.Field) *ProjectsKeysRemoveIpOverrideCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsKeysRemoveIpOverrideCall) Context(ctx context.Context) *ProjectsKeysRemoveIpOverrideCall { + 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 *ProjectsKeysRemoveIpOverrideCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsKeysRemoveIpOverrideCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecaptchaenterprisev1removeipoverriderequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:removeIpOverride") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recaptchaenterprise.projects.keys.removeIpOverride" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse.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 *ProjectsKeysRemoveIpOverrideCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse, 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 := &GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsKeysRetrieveLegacySecretKeyCall struct { s *Service key string diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 862c71346ce..79318d50bb7 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -371,6 +371,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "rescheduleClusterMaintenance": { + "description": "Reschedules upcoming maintenance event.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:rescheduleClusterMaintenance", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.rescheduleClusterMaintenance", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis Cluster instance resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:rescheduleClusterMaintenance", + "request": { + "$ref": "RescheduleClusterMaintenanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -821,7 +849,7 @@ } } }, - "revision": "20240711", + "revision": "20240822", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -840,7 +868,7 @@ "Not set. Default: EVERYSEC", "Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.", "fsync every second. Fast enough, and you may lose 1 second of data if there is a disaster", - "fsync every time new commands are appended to the AOF. It has the best data loss protection at the cost of performance" + "fsync every time new write commands are appended to the AOF. It has the best data loss protection at the cost of performance" ], "type": "string" } @@ -851,6 +879,10 @@ "description": "Configuration for availability of database instance", "id": "AvailabilityConfiguration", "properties": { + "automaticFailoverRoutingConfigured": { + "description": "Checks for existence of (multi-cluster) routing configuration that allows automatic failover to a different zone/region in case of an outage. Applicable to Bigtable resources.", + "type": "boolean" + }, "availabilityType": { "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", "enum": [ @@ -987,6 +1019,10 @@ "readOnly": true, "type": "string" }, + "crossClusterReplicationConfig": { + "$ref": "CrossClusterReplicationConfig", + "description": "Optional. Cross cluster replication config." + }, "deletionProtectionEnabled": { "description": "Optional. The delete operation will fail when the value is set to true.", "type": "boolean" @@ -999,6 +1035,15 @@ "readOnly": true, "type": "array" }, + "maintenancePolicy": { + "$ref": "ClusterMaintenancePolicy", + "description": "Optional. ClusterMaintenancePolicy determines when to allow or deny updates." + }, + "maintenanceSchedule": { + "$ref": "ClusterMaintenanceSchedule", + "description": "Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.", + "readOnly": true + }, "name": { "description": "Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", "type": "string" @@ -1059,7 +1104,7 @@ "type": "integer" }, "shardCount": { - "description": "Required. Number of shards for the Redis cluster.", + "description": "Optional. Number of shards for the Redis cluster.", "format": "int32", "type": "integer" }, @@ -1119,6 +1164,57 @@ }, "type": "object" }, + "ClusterMaintenancePolicy": { + "description": "Maintenance policy per cluster.", + "id": "ClusterMaintenancePolicy", + "properties": { + "createTime": { + "description": "Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyMaintenanceWindow": { + "description": "Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one.", + "items": { + "$ref": "ClusterWeeklyMaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "ClusterMaintenanceSchedule": { + "description": "Upcoming maitenance schedule.", + "id": "ClusterMaintenanceSchedule", + "properties": { + "endTime": { + "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scheduleDeadlineTime": { + "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ClusterPersistenceConfig": { "description": "Configuration of the persistence functionality.", "id": "ClusterPersistenceConfig", @@ -1150,6 +1246,46 @@ }, "type": "object" }, + "ClusterWeeklyMaintenanceWindow": { + "description": "Time window specified for weekly operations.", + "id": "ClusterWeeklyMaintenanceWindow", + "properties": { + "day": { + "description": "Allows to define schedule that runs specified day of the week.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Duration of the time window.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Start time of the window in UTC." + } + }, + "type": "object" + }, "Compliance": { "description": "Contains compliance information about a security standard indicating unmet recommendations.", "id": "Compliance", @@ -1165,40 +1301,61 @@ }, "type": "object" }, - "CustomMetadataData": { - "description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", - "id": "CustomMetadataData", + "CrossClusterReplicationConfig": { + "description": "Cross cluster replication config.", + "id": "CrossClusterReplicationConfig", "properties": { - "databaseMetadata": { + "clusterRole": { + "description": "The role of the cluster in cross cluster replication.", + "enum": [ + "CLUSTER_ROLE_UNSPECIFIED", + "NONE", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "Cluster role is not set. The behavior is equivalent to NONE.", + "This cluster does not participate in cross cluster replication. It is an independent cluster and does not replicate to or from any other clusters.", + "A cluster that allows both reads and writes. Any data written to this cluster is also replicated to the attached secondary clusters.", + "A cluster that allows only reads and replicates data from a primary cluster." + ], + "type": "string" + }, + "membership": { + "$ref": "Membership", + "description": "Output only. An output only view of all the member clusters participating in the cross cluster replication. This view will be provided by every member cluster irrespective of its cluster role(primary or secondary). A primary cluster can provide information about all the secondary clusters replicating from it. However, a secondary cluster only knows about the primary cluster from which it is replicating. However, for scenarios, where the primary cluster is unavailable(e.g. regional outage), a GetCluster request can be sent to any other member cluster and this field will list all the member clusters participating in cross cluster replication.", + "readOnly": true + }, + "primaryCluster": { + "$ref": "RemoteCluster", + "description": "Details of the primary cluster that is used as the replication source for this secondary cluster. This field is only set for a secondary cluster." + }, + "secondaryClusters": { + "description": "List of secondary clusters that are replicating from this primary cluster. This field is only set for a primary cluster.", "items": { - "$ref": "DatabaseMetadata" + "$ref": "RemoteCluster" }, "type": "array" + }, + "updateTime": { + "description": "Output only. The last time cross cluster replication config was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "DatabaseMetadata": { - "description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", - "id": "DatabaseMetadata", + "CustomMetadataData": { + "description": "Any custom metadata associated with the resource. e.g. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", + "id": "CustomMetadataData", "properties": { - "backupConfiguration": { - "$ref": "BackupConfiguration", - "description": "Backup configuration for this database" - }, - "backupRun": { - "$ref": "BackupRun", - "description": "Information about the last backup attempt for this database" - }, - "product": { - "$ref": "Product" - }, - "resourceId": { - "$ref": "DatabaseResourceId" - }, - "resourceName": { - "description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", - "type": "string" + "internalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration.", + "items": { + "$ref": "InternalResourceMetadata" + }, + "type": "array" } }, "type": "object" @@ -1340,6 +1497,24 @@ "description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", "type": "string" }, + "signalSeverity": { + "description": "The severity of the signal, such as if it's a HIGH or LOW severity.", + "enum": [ + "SIGNAL_SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "This value is used for findings when a source doesn't write a severity value.", + "A critical vulnerability is easily discoverable by an external actor, exploitable.", + "A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities.", + "A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually gain access and the ability to execute arbitrary code or exfiltrate data.", + "A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment." + ], + "type": "string" + }, "signalType": { "description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", "enum": [ @@ -1636,7 +1811,7 @@ "type": "string" }, "resourceType": { - "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", + "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance, spanner.googleapis.com/Database, firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", "type": "string" }, "uniqueId": { @@ -2570,6 +2745,31 @@ }, "type": "object" }, + "InternalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration settings. Similarly bigtable can have multiple clusters within same bigtable instance.", + "id": "InternalResourceMetadata", + "properties": { + "backupConfiguration": { + "$ref": "BackupConfiguration", + "description": "Backup configuration for this database" + }, + "backupRun": { + "$ref": "BackupRun", + "description": "Information about the last backup attempt for this database" + }, + "product": { + "$ref": "Product" + }, + "resourceId": { + "$ref": "DatabaseResourceId" + }, + "resourceName": { + "description": "Required. internal resource name for spanner this will be database name e.g.\"spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1\"", + "type": "string" + } + }, + "type": "object" + }, "ListClustersResponse": { "description": "Response for ListClusters.", "id": "ListClustersResponse", @@ -2780,6 +2980,26 @@ }, "type": "object" }, + "Membership": { + "description": "An output only view of all the member clusters participating in the cross cluster replication.", + "id": "Membership", + "properties": { + "primaryCluster": { + "$ref": "RemoteCluster", + "description": "Output only. The primary cluster that acts as the source of replication for the secondary clusters.", + "readOnly": true + }, + "secondaryClusters": { + "description": "Output only. The list of secondary clusters replicating from the primary cluster.", + "items": { + "$ref": "RemoteCluster" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "NodeInfo": { "description": "Node specific properties.", "id": "NodeInfo", @@ -3050,7 +3270,9 @@ "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", "ENGINE_MEMORYSTORE_FOR_REDIS", "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", - "ENGINE_OTHER" + "ENGINE_OTHER", + "ENGINE_FIRESTORE_WITH_NATIVE_MODE", + "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" ], "enumDeprecated": [ false, @@ -3066,6 +3288,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -3082,7 +3306,9 @@ "Cloud Spanner with Google SQL dialect.", "Memorystore with Redis dialect.", "Memorystore with Redis cluster dialect.", - "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum.", + "Firestore with native mode.", + "Firestore with datastore mode." ], "type": "string" }, @@ -3099,7 +3325,8 @@ "ON_PREM", "PRODUCT_TYPE_MEMORYSTORE", "PRODUCT_TYPE_BIGTABLE", - "PRODUCT_TYPE_OTHER" + "PRODUCT_TYPE_OTHER", + "PRODUCT_TYPE_FIRESTORE" ], "enumDeprecated": [ false, @@ -3112,6 +3339,7 @@ true, false, false, + false, false ], "enumDescriptions": [ @@ -3125,7 +3353,8 @@ "On premises database product.", "Memorystore product area in GCP", "Bigtable product area in GCP", - "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum.", + "Firestore product area in GCP." ], "type": "string" }, @@ -3238,6 +3467,48 @@ }, "type": "object" }, + "RemoteCluster": { + "description": "Details of the remote cluster associated with this cluster in a cross cluster replication setup.", + "id": "RemoteCluster", + "properties": { + "cluster": { + "description": "The full resource path of the remote cluster in the format: projects//locations//clusters/", + "type": "string" + }, + "uid": { + "description": "Output only. The unique identifier of the remote cluster.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "RescheduleClusterMaintenanceRequest": { + "description": "Request for rescheduling a cluster maintenance.", + "id": "RescheduleClusterMaintenanceRequest", + "properties": { + "rescheduleType": { + "description": "Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.", + "enum": [ + "RESCHEDULE_TYPE_UNSPECIFIED", + "IMMEDIATE", + "SPECIFIC_TIME" + ], + "enumDescriptions": [ + "Not set.", + "If the user wants to schedule the maintenance to happen now.", + "If the user wants to reschedule the maintenance to a specific time." + ], + "type": "string" + }, + "scheduleTime": { + "description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 6f66010a01a..4226d5a6cab 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -223,8 +223,8 @@ type AOFConfig struct { // this configuration, but it's up to the kernel's exact tuning. // "EVERYSEC" - fsync every second. Fast enough, and you may lose 1 second of // data if there is a disaster - // "ALWAYS" - fsync every time new commands are appended to the AOF. It has - // the best data loss protection at the cost of performance + // "ALWAYS" - fsync every time new write commands are appended to the AOF. It + // has the best data loss protection at the cost of performance AppendFsync string `json:"appendFsync,omitempty"` // ForceSendFields is a list of field names (e.g. "AppendFsync") to // unconditionally include in API requests. By default, fields with empty or @@ -247,6 +247,10 @@ func (s AOFConfig) MarshalJSON() ([]byte, error) { // AvailabilityConfiguration: Configuration for availability of database // instance type AvailabilityConfiguration struct { + // AutomaticFailoverRoutingConfigured: Checks for existence of (multi-cluster) + // routing configuration that allows automatic failover to a different + // zone/region in case of an outage. Applicable to Bigtable resources. + AutomaticFailoverRoutingConfigured bool `json:"automaticFailoverRoutingConfigured,omitempty"` // AvailabilityType: Availability type. Potential values: * `ZONAL`: The // instance serves data from only one zone. Outages in that zone affect data // accessibility. * `REGIONAL`: The instance can serve data from more than one @@ -264,16 +268,18 @@ type AvailabilityConfiguration struct { CrossRegionReplicaConfigured bool `json:"crossRegionReplicaConfigured,omitempty"` ExternalReplicaConfigured bool `json:"externalReplicaConfigured,omitempty"` PromotableReplicaConfigured bool `json:"promotableReplicaConfigured,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilityType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. + // "AutomaticFailoverRoutingConfigured") 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. "AvailabilityType") 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 is a list of field names (e.g. + // "AutomaticFailoverRoutingConfigured") 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:"-"` } @@ -409,6 +415,8 @@ type Cluster struct { // CreateTime: Output only. The timestamp associated with the cluster creation // request. CreateTime string `json:"createTime,omitempty"` + // CrossClusterReplicationConfig: Optional. Cross cluster replication config. + CrossClusterReplicationConfig *CrossClusterReplicationConfig `json:"crossClusterReplicationConfig,omitempty"` // DeletionProtectionEnabled: Optional. The delete operation will fail when the // value is set to true. DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"` @@ -416,6 +424,12 @@ type Cluster struct { // for Redis clients to connect to the cluster. Currently only one discovery // endpoint is supported. DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"` + // MaintenancePolicy: Optional. ClusterMaintenancePolicy determines when to + // allow or deny updates. + MaintenancePolicy *ClusterMaintenancePolicy `json:"maintenancePolicy,omitempty"` + // MaintenanceSchedule: Output only. ClusterMaintenanceSchedule Output only + // Published maintenance schedule. + MaintenanceSchedule *ClusterMaintenanceSchedule `json:"maintenanceSchedule,omitempty"` // Name: Required. Identifier. Unique name of the resource in this scope // including project and location using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` @@ -447,7 +461,7 @@ type Cluster struct { RedisConfigs map[string]string `json:"redisConfigs,omitempty"` // ReplicaCount: Optional. The number of replica nodes per shard. ReplicaCount int64 `json:"replicaCount,omitempty"` - // ShardCount: Required. Number of shards for the Redis cluster. + // ShardCount: Optional. Number of shards for the Redis cluster. ShardCount int64 `json:"shardCount,omitempty"` // SizeGb: Output only. Redis memory size in GB for the entire cluster rounded // up to the next integer. @@ -514,6 +528,65 @@ func (s *Cluster) UnmarshalJSON(data []byte) error { return nil } +// ClusterMaintenancePolicy: Maintenance policy per cluster. +type ClusterMaintenancePolicy struct { + // CreateTime: Output only. The time when the policy was created i.e. + // Maintenance Window or Deny Period was assigned. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Output only. The time when the policy was updated i.e. + // Maintenance Window or Deny Period was updated. + UpdateTime string `json:"updateTime,omitempty"` + // WeeklyMaintenanceWindow: Optional. Maintenance window that is applied to + // resources covered by this policy. Minimum 1. For the current version, the + // maximum number of weekly_maintenance_window is expected to be one. + WeeklyMaintenanceWindow []*ClusterWeeklyMaintenanceWindow `json:"weeklyMaintenanceWindow,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 ClusterMaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ClusterMaintenancePolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ClusterMaintenanceSchedule: Upcoming maitenance schedule. +type ClusterMaintenanceSchedule struct { + // EndTime: Output only. The end time of any upcoming scheduled maintenance for + // this instance. + EndTime string `json:"endTime,omitempty"` + // ScheduleDeadlineTime: Output only. The deadline that the maintenance + // schedule start time can not go beyond, including reschedule. + ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"` + // StartTime: Output only. The start time of any upcoming scheduled maintenance + // for this instance. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 ClusterMaintenanceSchedule) MarshalJSON() ([]byte, error) { + type NoMethod ClusterMaintenanceSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ClusterPersistenceConfig: Configuration of the persistence functionality. type ClusterPersistenceConfig struct { // AofConfig: Optional. AOF configuration. This field will be ignored if mode @@ -548,6 +621,42 @@ func (s ClusterPersistenceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ClusterWeeklyMaintenanceWindow: Time window specified for weekly operations. +type ClusterWeeklyMaintenanceWindow struct { + // Day: Allows to define schedule that runs specified day of the week. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + // Duration: Duration of the time window. + Duration string `json:"duration,omitempty"` + // StartTime: Start time of the window in UTC. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") 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 ClusterWeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod ClusterWeeklyMaintenanceWindow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Compliance: Contains compliance information about a security standard // indicating unmet recommendations. type Compliance struct { @@ -574,58 +683,84 @@ func (s Compliance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CustomMetadataData: Any custom metadata associated with the resource. i.e. A -// spanner instance can have multiple databases with its own unique metadata. -// Information for these individual databases can be captured in custom -// metadata data -type CustomMetadataData struct { - DatabaseMetadata []*DatabaseMetadata `json:"databaseMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseMetadata") to +// CrossClusterReplicationConfig: Cross cluster replication config. +type CrossClusterReplicationConfig struct { + // ClusterRole: The role of the cluster in cross cluster replication. + // + // Possible values: + // "CLUSTER_ROLE_UNSPECIFIED" - Cluster role is not set. The behavior is + // equivalent to NONE. + // "NONE" - This cluster does not participate in cross cluster replication. + // It is an independent cluster and does not replicate to or from any other + // clusters. + // "PRIMARY" - A cluster that allows both reads and writes. Any data written + // to this cluster is also replicated to the attached secondary clusters. + // "SECONDARY" - A cluster that allows only reads and replicates data from a + // primary cluster. + ClusterRole string `json:"clusterRole,omitempty"` + // Membership: Output only. An output only view of all the member clusters + // participating in the cross cluster replication. This view will be provided + // by every member cluster irrespective of its cluster role(primary or + // secondary). A primary cluster can provide information about all the + // secondary clusters replicating from it. However, a secondary cluster only + // knows about the primary cluster from which it is replicating. However, for + // scenarios, where the primary cluster is unavailable(e.g. regional outage), a + // GetCluster request can be sent to any other member cluster and this field + // will list all the member clusters participating in cross cluster + // replication. + Membership *Membership `json:"membership,omitempty"` + // PrimaryCluster: Details of the primary cluster that is used as the + // replication source for this secondary cluster. This field is only set for a + // secondary cluster. + PrimaryCluster *RemoteCluster `json:"primaryCluster,omitempty"` + // SecondaryClusters: List of secondary clusters that are replicating from this + // primary cluster. This field is only set for a primary cluster. + SecondaryClusters []*RemoteCluster `json:"secondaryClusters,omitempty"` + // UpdateTime: Output only. The last time cross cluster replication config was + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterRole") 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. "DatabaseMetadata") 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. "ClusterRole") 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 CustomMetadataData) MarshalJSON() ([]byte, error) { - type NoMethod CustomMetadataData +func (s CrossClusterReplicationConfig) MarshalJSON() ([]byte, error) { + type NoMethod CrossClusterReplicationConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DatabaseMetadata: Metadata for individual databases created in an instance. -// i.e. spanner instance can have multiple databases with unique configuration -// settings. -type DatabaseMetadata struct { - // BackupConfiguration: Backup configuration for this database - BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` - // BackupRun: Information about the last backup attempt for this database - BackupRun *BackupRun `json:"backupRun,omitempty"` - Product *Product `json:"product,omitempty"` - ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` - // ResourceName: Required. Database name. Resource name to follow CAIS - // resource_name format as noted here go/condor-common-datamodel - ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupConfiguration") to - // unconditionally include in API requests. By default, fields with empty or +// CustomMetadataData: Any custom metadata associated with the resource. e.g. A +// spanner instance can have multiple databases with its own unique metadata. +// Information for these individual databases can be captured in custom +// metadata data +type CustomMetadataData struct { + // InternalResourceMetadata: Metadata for individual internal resources in an + // instance. e.g. spanner instance can have multiple databases with unique + // configuration. + InternalResourceMetadata []*InternalResourceMetadata `json:"internalResourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "InternalResourceMetadata") + // 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. "BackupConfiguration") 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. "InternalResourceMetadata") 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 DatabaseMetadata) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseMetadata +func (s CustomMetadataData) MarshalJSON() ([]byte, error) { + type NoMethod CustomMetadataData return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -736,6 +871,22 @@ type DatabaseResourceHealthSignalData struct { // SignalId: Required. Unique identifier for the signal. This is an unique id // which would be mainatined by partner to identify a signal. SignalId string `json:"signalId,omitempty"` + // SignalSeverity: The severity of the signal, such as if it's a HIGH or LOW + // severity. + // + // Possible values: + // "SIGNAL_SEVERITY_UNSPECIFIED" - This value is used for findings when a + // source doesn't write a severity value. + // "CRITICAL" - A critical vulnerability is easily discoverable by an + // external actor, exploitable. + // "HIGH" - A high risk vulnerability can be easily discovered and exploited + // in combination with other vulnerabilities. + // "MEDIUM" - A medium risk vulnerability could be used by an actor to gain + // access to resources or privileges that enable them to eventually gain access + // and the ability to execute arbitrary code or exfiltrate data. + // "LOW" - A low risk vulnerability hampers a security organization's ability + // to detect vulnerabilities or active threats in their deployment. + SignalSeverity string `json:"signalSeverity,omitempty"` // SignalType: Required. Type of signal, for example, // `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. // @@ -973,8 +1124,10 @@ type DatabaseResourceId struct { // ResourceType: Required. The type of resource this ID is identifying. Ex // redis.googleapis.com/Instance, redis.googleapis.com/Cluster, // alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, - // spanner.googleapis.com/Instance REQUIRED Please refer - // go/condor-common-datamodel + // spanner.googleapis.com/Instance, spanner.googleapis.com/Database, + // firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, + // bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance + // REQUIRED Please refer go/condor-common-datamodel ResourceType string `json:"resourceType,omitempty"` // UniqueId: Required. A service-local token that distinguishes this resource // from other resources within the same service. @@ -1875,6 +2028,39 @@ func (s InstanceAuthString) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InternalResourceMetadata: Metadata for individual internal resources in an +// instance. e.g. spanner instance can have multiple databases with unique +// configuration settings. Similarly bigtable can have multiple clusters within +// same bigtable instance. +type InternalResourceMetadata struct { + // BackupConfiguration: Backup configuration for this database + BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Information about the last backup attempt for this database + BackupRun *BackupRun `json:"backupRun,omitempty"` + Product *Product `json:"product,omitempty"` + ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` + // ResourceName: Required. internal resource name for spanner this will be + // database name + // e.g."spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1" + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 InternalResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InternalResourceMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListClustersResponse: Response for ListClusters. type ListClustersResponse struct { // Clusters: A list of Redis clusters in the project in the specified location, @@ -2159,6 +2345,33 @@ func (s ManagedCertificateAuthority) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Membership: An output only view of all the member clusters participating in +// the cross cluster replication. +type Membership struct { + // PrimaryCluster: Output only. The primary cluster that acts as the source of + // replication for the secondary clusters. + PrimaryCluster *RemoteCluster `json:"primaryCluster,omitempty"` + // SecondaryClusters: Output only. The list of secondary clusters replicating + // from the primary cluster. + SecondaryClusters []*RemoteCluster `json:"secondaryClusters,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrimaryCluster") 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. "PrimaryCluster") 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 Membership) MarshalJSON() ([]byte, error) { + type NoMethod Membership + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // NodeInfo: Node specific properties. type NodeInfo struct { // Id: Output only. Node identifying string. e.g. 'node-0', 'node-1' @@ -2456,6 +2669,8 @@ type Product struct { // dialect. // "ENGINE_OTHER" - Other refers to rest of other database engine. This is to // be when engine is known, but it is not present in this enum. + // "ENGINE_FIRESTORE_WITH_NATIVE_MODE" - Firestore with native mode. + // "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" - Firestore with datastore mode. Engine string `json:"engine,omitempty"` // Type: Type of specific database product. It could be CloudSQL, AlloyDB etc.. // @@ -2473,6 +2688,7 @@ type Product struct { // "PRODUCT_TYPE_BIGTABLE" - Bigtable product area in GCP // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. This is // to be when product type is known, but it is not present in this enum. + // "PRODUCT_TYPE_FIRESTORE" - Firestore product area in GCP. Type string `json:"type,omitempty"` // Version: Version of the underlying database engine. Example values: For // MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" @@ -2623,6 +2839,66 @@ func (s ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RemoteCluster: Details of the remote cluster associated with this cluster in +// a cross cluster replication setup. +type RemoteCluster struct { + // Cluster: The full resource path of the remote cluster in the format: + // projects//locations//clusters/ + Cluster string `json:"cluster,omitempty"` + // Uid: Output only. The unique identifier of the remote cluster. + Uid string `json:"uid,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cluster") 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. "Cluster") 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 RemoteCluster) MarshalJSON() ([]byte, error) { + type NoMethod RemoteCluster + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RescheduleClusterMaintenanceRequest: Request for rescheduling a cluster +// maintenance. +type RescheduleClusterMaintenanceRequest struct { + // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up + // schedule_time as well. + // + // Possible values: + // "RESCHEDULE_TYPE_UNSPECIFIED" - Not set. + // "IMMEDIATE" - If the user wants to schedule the maintenance to happen now. + // "SPECIFIC_TIME" - If the user wants to reschedule the maintenance to a + // specific time. + RescheduleType string `json:"rescheduleType,omitempty"` + // ScheduleTime: Optional. Timestamp when the maintenance shall be rescheduled + // to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example + // `2012-11-15T16:19:00.094Z`. + ScheduleTime string `json:"scheduleTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "RescheduleType") 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. "RescheduleType") 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 RescheduleClusterMaintenanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RescheduleClusterMaintenanceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RescheduleMaintenanceRequest: Request for RescheduleMaintenance. type RescheduleMaintenanceRequest struct { // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up @@ -3982,6 +4258,109 @@ func (c *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (* return ret, nil } +type ProjectsLocationsClustersRescheduleClusterMaintenanceCall struct { + s *Service + name string + rescheduleclustermaintenancerequest *RescheduleClusterMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RescheduleClusterMaintenance: Reschedules upcoming maintenance event. +// +// - name: Redis Cluster instance resource name using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` +// where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) RescheduleClusterMaintenance(name string, rescheduleclustermaintenancerequest *RescheduleClusterMaintenanceRequest) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c := &ProjectsLocationsClustersRescheduleClusterMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rescheduleclustermaintenancerequest = rescheduleclustermaintenancerequest + 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 *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Context(ctx context.Context) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + 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 *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.rescheduleclustermaintenancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rescheduleClusterMaintenance") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.rescheduleClusterMaintenance" 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 *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsInstancesCreateCall struct { s *Service parent string diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index 4760ddc20df..56333dd5c80 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -371,6 +371,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "rescheduleClusterMaintenance": { + "description": "Reschedules upcoming maintenance event.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:rescheduleClusterMaintenance", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.rescheduleClusterMaintenance", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis Cluster instance resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:rescheduleClusterMaintenance", + "request": { + "$ref": "RescheduleClusterMaintenanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -821,7 +849,7 @@ } } }, - "revision": "20240711", + "revision": "20240822", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -840,7 +868,7 @@ "Not set. Default: EVERYSEC", "Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.", "fsync every second. Fast enough, and you may lose 1 second of data if there is a disaster", - "fsync every time new commands are appended to the AOF. It has the best data loss protection at the cost of performance" + "fsync every time new write commands are appended to the AOF. It has the best data loss protection at the cost of performance" ], "type": "string" } @@ -851,6 +879,10 @@ "description": "Configuration for availability of database instance", "id": "AvailabilityConfiguration", "properties": { + "automaticFailoverRoutingConfigured": { + "description": "Checks for existence of (multi-cluster) routing configuration that allows automatic failover to a different zone/region in case of an outage. Applicable to Bigtable resources.", + "type": "boolean" + }, "availabilityType": { "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", "enum": [ @@ -987,6 +1019,10 @@ "readOnly": true, "type": "string" }, + "crossClusterReplicationConfig": { + "$ref": "CrossClusterReplicationConfig", + "description": "Optional. Cross cluster replication config." + }, "deletionProtectionEnabled": { "description": "Optional. The delete operation will fail when the value is set to true.", "type": "boolean" @@ -999,6 +1035,15 @@ "readOnly": true, "type": "array" }, + "maintenancePolicy": { + "$ref": "ClusterMaintenancePolicy", + "description": "Optional. ClusterMaintenancePolicy determines when to allow or deny updates." + }, + "maintenanceSchedule": { + "$ref": "ClusterMaintenanceSchedule", + "description": "Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.", + "readOnly": true + }, "name": { "description": "Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", "type": "string" @@ -1059,7 +1104,7 @@ "type": "integer" }, "shardCount": { - "description": "Required. Number of shards for the Redis cluster.", + "description": "Optional. Number of shards for the Redis cluster.", "format": "int32", "type": "integer" }, @@ -1119,6 +1164,57 @@ }, "type": "object" }, + "ClusterMaintenancePolicy": { + "description": "Maintenance policy per cluster.", + "id": "ClusterMaintenancePolicy", + "properties": { + "createTime": { + "description": "Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyMaintenanceWindow": { + "description": "Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one.", + "items": { + "$ref": "ClusterWeeklyMaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "ClusterMaintenanceSchedule": { + "description": "Upcoming maitenance schedule.", + "id": "ClusterMaintenanceSchedule", + "properties": { + "endTime": { + "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scheduleDeadlineTime": { + "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ClusterPersistenceConfig": { "description": "Configuration of the persistence functionality.", "id": "ClusterPersistenceConfig", @@ -1150,6 +1246,46 @@ }, "type": "object" }, + "ClusterWeeklyMaintenanceWindow": { + "description": "Time window specified for weekly operations.", + "id": "ClusterWeeklyMaintenanceWindow", + "properties": { + "day": { + "description": "Allows to define schedule that runs specified day of the week.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Duration of the time window.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Start time of the window in UTC." + } + }, + "type": "object" + }, "Compliance": { "description": "Contains compliance information about a security standard indicating unmet recommendations.", "id": "Compliance", @@ -1165,40 +1301,61 @@ }, "type": "object" }, - "CustomMetadataData": { - "description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", - "id": "CustomMetadataData", + "CrossClusterReplicationConfig": { + "description": "Cross cluster replication config.", + "id": "CrossClusterReplicationConfig", "properties": { - "databaseMetadata": { + "clusterRole": { + "description": "The role of the cluster in cross cluster replication.", + "enum": [ + "CLUSTER_ROLE_UNSPECIFIED", + "NONE", + "PRIMARY", + "SECONDARY" + ], + "enumDescriptions": [ + "Cluster role is not set. The behavior is equivalent to NONE.", + "This cluster does not participate in cross cluster replication. It is an independent cluster and does not replicate to or from any other clusters.", + "A cluster that allows both reads and writes. Any data written to this cluster is also replicated to the attached secondary clusters.", + "A cluster that allows only reads and replicates data from a primary cluster." + ], + "type": "string" + }, + "membership": { + "$ref": "Membership", + "description": "Output only. An output only view of all the member clusters participating in the cross cluster replication. This view will be provided by every member cluster irrespective of its cluster role(primary or secondary). A primary cluster can provide information about all the secondary clusters replicating from it. However, a secondary cluster only knows about the primary cluster from which it is replicating. However, for scenarios, where the primary cluster is unavailable(e.g. regional outage), a GetCluster request can be sent to any other member cluster and this field will list all the member clusters participating in cross cluster replication.", + "readOnly": true + }, + "primaryCluster": { + "$ref": "RemoteCluster", + "description": "Details of the primary cluster that is used as the replication source for this secondary cluster. This field is only set for a secondary cluster." + }, + "secondaryClusters": { + "description": "List of secondary clusters that are replicating from this primary cluster. This field is only set for a primary cluster.", "items": { - "$ref": "DatabaseMetadata" + "$ref": "RemoteCluster" }, "type": "array" + }, + "updateTime": { + "description": "Output only. The last time cross cluster replication config was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "DatabaseMetadata": { - "description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", - "id": "DatabaseMetadata", + "CustomMetadataData": { + "description": "Any custom metadata associated with the resource. e.g. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", + "id": "CustomMetadataData", "properties": { - "backupConfiguration": { - "$ref": "BackupConfiguration", - "description": "Backup configuration for this database" - }, - "backupRun": { - "$ref": "BackupRun", - "description": "Information about the last backup attempt for this database" - }, - "product": { - "$ref": "Product" - }, - "resourceId": { - "$ref": "DatabaseResourceId" - }, - "resourceName": { - "description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", - "type": "string" + "internalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration.", + "items": { + "$ref": "InternalResourceMetadata" + }, + "type": "array" } }, "type": "object" @@ -1340,6 +1497,24 @@ "description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", "type": "string" }, + "signalSeverity": { + "description": "The severity of the signal, such as if it's a HIGH or LOW severity.", + "enum": [ + "SIGNAL_SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "This value is used for findings when a source doesn't write a severity value.", + "A critical vulnerability is easily discoverable by an external actor, exploitable.", + "A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities.", + "A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually gain access and the ability to execute arbitrary code or exfiltrate data.", + "A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment." + ], + "type": "string" + }, "signalType": { "description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", "enum": [ @@ -1636,7 +1811,7 @@ "type": "string" }, "resourceType": { - "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", + "description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance, spanner.googleapis.com/Database, firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", "type": "string" }, "uniqueId": { @@ -2577,6 +2752,31 @@ }, "type": "object" }, + "InternalResourceMetadata": { + "description": "Metadata for individual internal resources in an instance. e.g. spanner instance can have multiple databases with unique configuration settings. Similarly bigtable can have multiple clusters within same bigtable instance.", + "id": "InternalResourceMetadata", + "properties": { + "backupConfiguration": { + "$ref": "BackupConfiguration", + "description": "Backup configuration for this database" + }, + "backupRun": { + "$ref": "BackupRun", + "description": "Information about the last backup attempt for this database" + }, + "product": { + "$ref": "Product" + }, + "resourceId": { + "$ref": "DatabaseResourceId" + }, + "resourceName": { + "description": "Required. internal resource name for spanner this will be database name e.g.\"spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1\"", + "type": "string" + } + }, + "type": "object" + }, "ListClustersResponse": { "description": "Response for ListClusters.", "id": "ListClustersResponse", @@ -2787,6 +2987,26 @@ }, "type": "object" }, + "Membership": { + "description": "An output only view of all the member clusters participating in the cross cluster replication.", + "id": "Membership", + "properties": { + "primaryCluster": { + "$ref": "RemoteCluster", + "description": "Output only. The primary cluster that acts as the source of replication for the secondary clusters.", + "readOnly": true + }, + "secondaryClusters": { + "description": "Output only. The list of secondary clusters replicating from the primary cluster.", + "items": { + "$ref": "RemoteCluster" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "NodeInfo": { "description": "Node specific properties.", "id": "NodeInfo", @@ -3057,7 +3277,9 @@ "ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", "ENGINE_MEMORYSTORE_FOR_REDIS", "ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", - "ENGINE_OTHER" + "ENGINE_OTHER", + "ENGINE_FIRESTORE_WITH_NATIVE_MODE", + "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" ], "enumDeprecated": [ false, @@ -3073,6 +3295,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -3089,7 +3313,9 @@ "Cloud Spanner with Google SQL dialect.", "Memorystore with Redis dialect.", "Memorystore with Redis cluster dialect.", - "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." + "Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum.", + "Firestore with native mode.", + "Firestore with datastore mode." ], "type": "string" }, @@ -3106,7 +3332,8 @@ "ON_PREM", "PRODUCT_TYPE_MEMORYSTORE", "PRODUCT_TYPE_BIGTABLE", - "PRODUCT_TYPE_OTHER" + "PRODUCT_TYPE_OTHER", + "PRODUCT_TYPE_FIRESTORE" ], "enumDeprecated": [ false, @@ -3119,6 +3346,7 @@ true, false, false, + false, false ], "enumDescriptions": [ @@ -3132,7 +3360,8 @@ "On premises database product.", "Memorystore product area in GCP", "Bigtable product area in GCP", - "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." + "Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum.", + "Firestore product area in GCP." ], "type": "string" }, @@ -3245,6 +3474,48 @@ }, "type": "object" }, + "RemoteCluster": { + "description": "Details of the remote cluster associated with this cluster in a cross cluster replication setup.", + "id": "RemoteCluster", + "properties": { + "cluster": { + "description": "The full resource path of the remote cluster in the format: projects//locations//clusters/", + "type": "string" + }, + "uid": { + "description": "Output only. The unique identifier of the remote cluster.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "RescheduleClusterMaintenanceRequest": { + "description": "Request for rescheduling a cluster maintenance.", + "id": "RescheduleClusterMaintenanceRequest", + "properties": { + "rescheduleType": { + "description": "Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.", + "enum": [ + "RESCHEDULE_TYPE_UNSPECIFIED", + "IMMEDIATE", + "SPECIFIC_TIME" + ], + "enumDescriptions": [ + "Not set.", + "If the user wants to schedule the maintenance to happen now.", + "If the user wants to reschedule the maintenance to a specific time." + ], + "type": "string" + }, + "scheduleTime": { + "description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index c3a5b40177f..e2dc9f649e8 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -223,8 +223,8 @@ type AOFConfig struct { // this configuration, but it's up to the kernel's exact tuning. // "EVERYSEC" - fsync every second. Fast enough, and you may lose 1 second of // data if there is a disaster - // "ALWAYS" - fsync every time new commands are appended to the AOF. It has - // the best data loss protection at the cost of performance + // "ALWAYS" - fsync every time new write commands are appended to the AOF. It + // has the best data loss protection at the cost of performance AppendFsync string `json:"appendFsync,omitempty"` // ForceSendFields is a list of field names (e.g. "AppendFsync") to // unconditionally include in API requests. By default, fields with empty or @@ -247,6 +247,10 @@ func (s AOFConfig) MarshalJSON() ([]byte, error) { // AvailabilityConfiguration: Configuration for availability of database // instance type AvailabilityConfiguration struct { + // AutomaticFailoverRoutingConfigured: Checks for existence of (multi-cluster) + // routing configuration that allows automatic failover to a different + // zone/region in case of an outage. Applicable to Bigtable resources. + AutomaticFailoverRoutingConfigured bool `json:"automaticFailoverRoutingConfigured,omitempty"` // AvailabilityType: Availability type. Potential values: * `ZONAL`: The // instance serves data from only one zone. Outages in that zone affect data // accessibility. * `REGIONAL`: The instance can serve data from more than one @@ -264,16 +268,18 @@ type AvailabilityConfiguration struct { CrossRegionReplicaConfigured bool `json:"crossRegionReplicaConfigured,omitempty"` ExternalReplicaConfigured bool `json:"externalReplicaConfigured,omitempty"` PromotableReplicaConfigured bool `json:"promotableReplicaConfigured,omitempty"` - // ForceSendFields is a list of field names (e.g. "AvailabilityType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See + // ForceSendFields is a list of field names (e.g. + // "AutomaticFailoverRoutingConfigured") 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. "AvailabilityType") 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 is a list of field names (e.g. + // "AutomaticFailoverRoutingConfigured") 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:"-"` } @@ -409,6 +415,8 @@ type Cluster struct { // CreateTime: Output only. The timestamp associated with the cluster creation // request. CreateTime string `json:"createTime,omitempty"` + // CrossClusterReplicationConfig: Optional. Cross cluster replication config. + CrossClusterReplicationConfig *CrossClusterReplicationConfig `json:"crossClusterReplicationConfig,omitempty"` // DeletionProtectionEnabled: Optional. The delete operation will fail when the // value is set to true. DeletionProtectionEnabled bool `json:"deletionProtectionEnabled,omitempty"` @@ -416,6 +424,12 @@ type Cluster struct { // for Redis clients to connect to the cluster. Currently only one discovery // endpoint is supported. DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"` + // MaintenancePolicy: Optional. ClusterMaintenancePolicy determines when to + // allow or deny updates. + MaintenancePolicy *ClusterMaintenancePolicy `json:"maintenancePolicy,omitempty"` + // MaintenanceSchedule: Output only. ClusterMaintenanceSchedule Output only + // Published maintenance schedule. + MaintenanceSchedule *ClusterMaintenanceSchedule `json:"maintenanceSchedule,omitempty"` // Name: Required. Identifier. Unique name of the resource in this scope // including project and location using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` @@ -447,7 +461,7 @@ type Cluster struct { RedisConfigs map[string]string `json:"redisConfigs,omitempty"` // ReplicaCount: Optional. The number of replica nodes per shard. ReplicaCount int64 `json:"replicaCount,omitempty"` - // ShardCount: Required. Number of shards for the Redis cluster. + // ShardCount: Optional. Number of shards for the Redis cluster. ShardCount int64 `json:"shardCount,omitempty"` // SizeGb: Output only. Redis memory size in GB for the entire cluster rounded // up to the next integer. @@ -514,6 +528,65 @@ func (s *Cluster) UnmarshalJSON(data []byte) error { return nil } +// ClusterMaintenancePolicy: Maintenance policy per cluster. +type ClusterMaintenancePolicy struct { + // CreateTime: Output only. The time when the policy was created i.e. + // Maintenance Window or Deny Period was assigned. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Output only. The time when the policy was updated i.e. + // Maintenance Window or Deny Period was updated. + UpdateTime string `json:"updateTime,omitempty"` + // WeeklyMaintenanceWindow: Optional. Maintenance window that is applied to + // resources covered by this policy. Minimum 1. For the current version, the + // maximum number of weekly_maintenance_window is expected to be one. + WeeklyMaintenanceWindow []*ClusterWeeklyMaintenanceWindow `json:"weeklyMaintenanceWindow,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 ClusterMaintenancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod ClusterMaintenancePolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ClusterMaintenanceSchedule: Upcoming maitenance schedule. +type ClusterMaintenanceSchedule struct { + // EndTime: Output only. The end time of any upcoming scheduled maintenance for + // this instance. + EndTime string `json:"endTime,omitempty"` + // ScheduleDeadlineTime: Output only. The deadline that the maintenance + // schedule start time can not go beyond, including reschedule. + ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"` + // StartTime: Output only. The start time of any upcoming scheduled maintenance + // for this instance. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") 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. "EndTime") 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 ClusterMaintenanceSchedule) MarshalJSON() ([]byte, error) { + type NoMethod ClusterMaintenanceSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ClusterPersistenceConfig: Configuration of the persistence functionality. type ClusterPersistenceConfig struct { // AofConfig: Optional. AOF configuration. This field will be ignored if mode @@ -548,6 +621,42 @@ func (s ClusterPersistenceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ClusterWeeklyMaintenanceWindow: Time window specified for weekly operations. +type ClusterWeeklyMaintenanceWindow struct { + // Day: Allows to define schedule that runs specified day of the week. + // + // Possible values: + // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. + // "MONDAY" - Monday + // "TUESDAY" - Tuesday + // "WEDNESDAY" - Wednesday + // "THURSDAY" - Thursday + // "FRIDAY" - Friday + // "SATURDAY" - Saturday + // "SUNDAY" - Sunday + Day string `json:"day,omitempty"` + // Duration: Duration of the time window. + Duration string `json:"duration,omitempty"` + // StartTime: Start time of the window in UTC. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") 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. "Day") 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 ClusterWeeklyMaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod ClusterWeeklyMaintenanceWindow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Compliance: Contains compliance information about a security standard // indicating unmet recommendations. type Compliance struct { @@ -574,58 +683,84 @@ func (s Compliance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// CustomMetadataData: Any custom metadata associated with the resource. i.e. A -// spanner instance can have multiple databases with its own unique metadata. -// Information for these individual databases can be captured in custom -// metadata data -type CustomMetadataData struct { - DatabaseMetadata []*DatabaseMetadata `json:"databaseMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseMetadata") to +// CrossClusterReplicationConfig: Cross cluster replication config. +type CrossClusterReplicationConfig struct { + // ClusterRole: The role of the cluster in cross cluster replication. + // + // Possible values: + // "CLUSTER_ROLE_UNSPECIFIED" - Cluster role is not set. The behavior is + // equivalent to NONE. + // "NONE" - This cluster does not participate in cross cluster replication. + // It is an independent cluster and does not replicate to or from any other + // clusters. + // "PRIMARY" - A cluster that allows both reads and writes. Any data written + // to this cluster is also replicated to the attached secondary clusters. + // "SECONDARY" - A cluster that allows only reads and replicates data from a + // primary cluster. + ClusterRole string `json:"clusterRole,omitempty"` + // Membership: Output only. An output only view of all the member clusters + // participating in the cross cluster replication. This view will be provided + // by every member cluster irrespective of its cluster role(primary or + // secondary). A primary cluster can provide information about all the + // secondary clusters replicating from it. However, a secondary cluster only + // knows about the primary cluster from which it is replicating. However, for + // scenarios, where the primary cluster is unavailable(e.g. regional outage), a + // GetCluster request can be sent to any other member cluster and this field + // will list all the member clusters participating in cross cluster + // replication. + Membership *Membership `json:"membership,omitempty"` + // PrimaryCluster: Details of the primary cluster that is used as the + // replication source for this secondary cluster. This field is only set for a + // secondary cluster. + PrimaryCluster *RemoteCluster `json:"primaryCluster,omitempty"` + // SecondaryClusters: List of secondary clusters that are replicating from this + // primary cluster. This field is only set for a primary cluster. + SecondaryClusters []*RemoteCluster `json:"secondaryClusters,omitempty"` + // UpdateTime: Output only. The last time cross cluster replication config was + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterRole") 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. "DatabaseMetadata") 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. "ClusterRole") 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 CustomMetadataData) MarshalJSON() ([]byte, error) { - type NoMethod CustomMetadataData +func (s CrossClusterReplicationConfig) MarshalJSON() ([]byte, error) { + type NoMethod CrossClusterReplicationConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// DatabaseMetadata: Metadata for individual databases created in an instance. -// i.e. spanner instance can have multiple databases with unique configuration -// settings. -type DatabaseMetadata struct { - // BackupConfiguration: Backup configuration for this database - BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` - // BackupRun: Information about the last backup attempt for this database - BackupRun *BackupRun `json:"backupRun,omitempty"` - Product *Product `json:"product,omitempty"` - ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` - // ResourceName: Required. Database name. Resource name to follow CAIS - // resource_name format as noted here go/condor-common-datamodel - ResourceName string `json:"resourceName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupConfiguration") to - // unconditionally include in API requests. By default, fields with empty or +// CustomMetadataData: Any custom metadata associated with the resource. e.g. A +// spanner instance can have multiple databases with its own unique metadata. +// Information for these individual databases can be captured in custom +// metadata data +type CustomMetadataData struct { + // InternalResourceMetadata: Metadata for individual internal resources in an + // instance. e.g. spanner instance can have multiple databases with unique + // configuration. + InternalResourceMetadata []*InternalResourceMetadata `json:"internalResourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "InternalResourceMetadata") + // 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. "BackupConfiguration") 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. "InternalResourceMetadata") 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 DatabaseMetadata) MarshalJSON() ([]byte, error) { - type NoMethod DatabaseMetadata +func (s CustomMetadataData) MarshalJSON() ([]byte, error) { + type NoMethod CustomMetadataData return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -736,6 +871,22 @@ type DatabaseResourceHealthSignalData struct { // SignalId: Required. Unique identifier for the signal. This is an unique id // which would be mainatined by partner to identify a signal. SignalId string `json:"signalId,omitempty"` + // SignalSeverity: The severity of the signal, such as if it's a HIGH or LOW + // severity. + // + // Possible values: + // "SIGNAL_SEVERITY_UNSPECIFIED" - This value is used for findings when a + // source doesn't write a severity value. + // "CRITICAL" - A critical vulnerability is easily discoverable by an + // external actor, exploitable. + // "HIGH" - A high risk vulnerability can be easily discovered and exploited + // in combination with other vulnerabilities. + // "MEDIUM" - A medium risk vulnerability could be used by an actor to gain + // access to resources or privileges that enable them to eventually gain access + // and the ability to execute arbitrary code or exfiltrate data. + // "LOW" - A low risk vulnerability hampers a security organization's ability + // to detect vulnerabilities or active threats in their deployment. + SignalSeverity string `json:"signalSeverity,omitempty"` // SignalType: Required. Type of signal, for example, // `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc. // @@ -973,8 +1124,10 @@ type DatabaseResourceId struct { // ResourceType: Required. The type of resource this ID is identifying. Ex // redis.googleapis.com/Instance, redis.googleapis.com/Cluster, // alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, - // spanner.googleapis.com/Instance REQUIRED Please refer - // go/condor-common-datamodel + // spanner.googleapis.com/Instance, spanner.googleapis.com/Database, + // firestore.googleapis.com/Database, sqladmin.googleapis.com/Instance, + // bigtableadmin.googleapis.com/Cluster, bigtableadmin.googleapis.com/Instance + // REQUIRED Please refer go/condor-common-datamodel ResourceType string `json:"resourceType,omitempty"` // UniqueId: Required. A service-local token that distinguishes this resource // from other resources within the same service. @@ -1879,6 +2032,39 @@ func (s InstanceAuthString) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InternalResourceMetadata: Metadata for individual internal resources in an +// instance. e.g. spanner instance can have multiple databases with unique +// configuration settings. Similarly bigtable can have multiple clusters within +// same bigtable instance. +type InternalResourceMetadata struct { + // BackupConfiguration: Backup configuration for this database + BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + // BackupRun: Information about the last backup attempt for this database + BackupRun *BackupRun `json:"backupRun,omitempty"` + Product *Product `json:"product,omitempty"` + ResourceId *DatabaseResourceId `json:"resourceId,omitempty"` + // ResourceName: Required. internal resource name for spanner this will be + // database name + // e.g."spanner.googleapis.com/projects/123/abc/instances/inst1/databases/db1" + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupConfiguration") 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. "BackupConfiguration") 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 InternalResourceMetadata) MarshalJSON() ([]byte, error) { + type NoMethod InternalResourceMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListClustersResponse: Response for ListClusters. type ListClustersResponse struct { // Clusters: A list of Redis clusters in the project in the specified location, @@ -2163,6 +2349,33 @@ func (s ManagedCertificateAuthority) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Membership: An output only view of all the member clusters participating in +// the cross cluster replication. +type Membership struct { + // PrimaryCluster: Output only. The primary cluster that acts as the source of + // replication for the secondary clusters. + PrimaryCluster *RemoteCluster `json:"primaryCluster,omitempty"` + // SecondaryClusters: Output only. The list of secondary clusters replicating + // from the primary cluster. + SecondaryClusters []*RemoteCluster `json:"secondaryClusters,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrimaryCluster") 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. "PrimaryCluster") 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 Membership) MarshalJSON() ([]byte, error) { + type NoMethod Membership + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // NodeInfo: Node specific properties. type NodeInfo struct { // Id: Output only. Node identifying string. e.g. 'node-0', 'node-1' @@ -2460,6 +2673,8 @@ type Product struct { // dialect. // "ENGINE_OTHER" - Other refers to rest of other database engine. This is to // be when engine is known, but it is not present in this enum. + // "ENGINE_FIRESTORE_WITH_NATIVE_MODE" - Firestore with native mode. + // "ENGINE_FIRESTORE_WITH_DATASTORE_MODE" - Firestore with datastore mode. Engine string `json:"engine,omitempty"` // Type: Type of specific database product. It could be CloudSQL, AlloyDB etc.. // @@ -2477,6 +2692,7 @@ type Product struct { // "PRODUCT_TYPE_BIGTABLE" - Bigtable product area in GCP // "PRODUCT_TYPE_OTHER" - Other refers to rest of other product type. This is // to be when product type is known, but it is not present in this enum. + // "PRODUCT_TYPE_FIRESTORE" - Firestore product area in GCP. Type string `json:"type,omitempty"` // Version: Version of the underlying database engine. Example values: For // MySQL, it could be "8.0", "5.7" etc.. For Postgres, it could be "14", "15" @@ -2627,6 +2843,66 @@ func (s ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RemoteCluster: Details of the remote cluster associated with this cluster in +// a cross cluster replication setup. +type RemoteCluster struct { + // Cluster: The full resource path of the remote cluster in the format: + // projects//locations//clusters/ + Cluster string `json:"cluster,omitempty"` + // Uid: Output only. The unique identifier of the remote cluster. + Uid string `json:"uid,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cluster") 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. "Cluster") 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 RemoteCluster) MarshalJSON() ([]byte, error) { + type NoMethod RemoteCluster + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RescheduleClusterMaintenanceRequest: Request for rescheduling a cluster +// maintenance. +type RescheduleClusterMaintenanceRequest struct { + // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up + // schedule_time as well. + // + // Possible values: + // "RESCHEDULE_TYPE_UNSPECIFIED" - Not set. + // "IMMEDIATE" - If the user wants to schedule the maintenance to happen now. + // "SPECIFIC_TIME" - If the user wants to reschedule the maintenance to a + // specific time. + RescheduleType string `json:"rescheduleType,omitempty"` + // ScheduleTime: Optional. Timestamp when the maintenance shall be rescheduled + // to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example + // `2012-11-15T16:19:00.094Z`. + ScheduleTime string `json:"scheduleTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "RescheduleType") 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. "RescheduleType") 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 RescheduleClusterMaintenanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod RescheduleClusterMaintenanceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RescheduleMaintenanceRequest: Request for RescheduleMaintenance. type RescheduleMaintenanceRequest struct { // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must set up @@ -3986,6 +4262,109 @@ func (c *ProjectsLocationsClustersPatchCall) Do(opts ...googleapi.CallOption) (* return ret, nil } +type ProjectsLocationsClustersRescheduleClusterMaintenanceCall struct { + s *Service + name string + rescheduleclustermaintenancerequest *RescheduleClusterMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RescheduleClusterMaintenance: Reschedules upcoming maintenance event. +// +// - name: Redis Cluster instance resource name using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` +// where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) RescheduleClusterMaintenance(name string, rescheduleclustermaintenancerequest *RescheduleClusterMaintenanceRequest) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c := &ProjectsLocationsClustersRescheduleClusterMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.rescheduleclustermaintenancerequest = rescheduleclustermaintenancerequest + 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 *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Context(ctx context.Context) *ProjectsLocationsClustersRescheduleClusterMaintenanceCall { + 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 *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.rescheduleclustermaintenancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:rescheduleClusterMaintenance") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "redis.projects.locations.clusters.rescheduleClusterMaintenance" 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 *ProjectsLocationsClustersRescheduleClusterMaintenanceCall) 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 + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsInstancesCreateCall struct { s *Service parent string diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index e86502f43e1..37aabd36b09 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -2092,7 +2092,7 @@ } } }, - "revision": "20240801", + "revision": "20240822", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2732,7 +2732,7 @@ "type": "object" }, "GoogleCloudRetailV2CompleteQueryResponseAttributeResult": { - "description": "Resource that represents attribute results.", + "description": "Resource that represents attribute results. The list of suggestions for the attribute.", "id": "GoogleCloudRetailV2CompleteQueryResponseAttributeResult", "properties": { "suggestions": { @@ -3945,7 +3945,7 @@ "description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." }, "availability": { - "description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", + "description": "The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered \"in stock\" as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", "enum": [ "AVAILABILITY_UNSPECIFIED", "IN_STOCK", @@ -4641,7 +4641,7 @@ "id": "GoogleCloudRetailV2RuleForceReturnFacetAction", "properties": { "facetPositionAdjustments": { - "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", + "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 15 instances here.", "items": { "$ref": "GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment" }, diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 1bd94aea2b9..74966cdb2e5 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -1314,7 +1314,7 @@ func (s GoogleCloudRetailV2CompleteQueryResponse) MarshalJSON() ([]byte, error) } // GoogleCloudRetailV2CompleteQueryResponseAttributeResult: Resource that -// represents attribute results. +// represents attribute results. The list of suggestions for the attribute. type GoogleCloudRetailV2CompleteQueryResponseAttributeResult struct { Suggestions []string `json:"suggestions,omitempty"` // ForceSendFields is a list of field names (e.g. "Suggestions") to @@ -3213,8 +3213,13 @@ type GoogleCloudRetailV2Product struct { // veterans, car owners, musicians, etc.) of the product. Audience *GoogleCloudRetailV2Audience `json:"audience,omitempty"` // Availability: The online availability of the Product. Default to - // Availability.IN_STOCK. Corresponding properties: Google Merchant Center - // property availability (https://support.google.com/merchants/answer/6324448). + // Availability.IN_STOCK. For primary products with variants set the + // availability of the primary as Availability.OUT_OF_STOCK and set the true + // availability at the variant level. This way the primary product will be + // considered "in stock" as long as it has at least one variant in stock. For + // primary products with no variants set the true availability at the primary + // level. Corresponding properties: Google Merchant Center property + // availability (https://support.google.com/merchants/answer/6324448). // Schema.org property Offer.availability (https://schema.org/availability). // // Possible values: @@ -4355,7 +4360,7 @@ func (s GoogleCloudRetailV2RuleFilterAction) MarshalJSON() ([]byte, error) { // current rank. type GoogleCloudRetailV2RuleForceReturnFacetAction struct { // FacetPositionAdjustments: Each instance corresponds to a force return - // attribute for the given condition. There can't be more 3 instances here. + // attribute for the given condition. There can't be more 15 instances here. FacetPositionAdjustments []*GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment `json:"facetPositionAdjustments,omitempty"` // ForceSendFields is a list of field names (e.g. "FacetPositionAdjustments") // to unconditionally include in API requests. By default, fields with empty or diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 8572689cf8a..17ddacc84b1 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2613,7 +2613,7 @@ } } }, - "revision": "20240801", + "revision": "20240822", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4043,7 +4043,7 @@ "type": "object" }, "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult": { - "description": "Resource that represents attribute results.", + "description": "Resource that represents attribute results. The list of suggestions for the attribute.", "id": "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult", "properties": { "suggestions": { @@ -5768,7 +5768,7 @@ "description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." }, "availability": { - "description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", + "description": "The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered \"in stock\" as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", "enum": [ "AVAILABILITY_UNSPECIFIED", "IN_STOCK", @@ -6494,7 +6494,7 @@ "id": "GoogleCloudRetailV2alphaRuleForceReturnFacetAction", "properties": { "facetPositionAdjustments": { - "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", + "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 15 instances here.", "items": { "$ref": "GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment" }, diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index ff42ee52377..55c4357307c 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -2482,7 +2482,7 @@ func (s GoogleCloudRetailV2alphaCompleteQueryResponse) MarshalJSON() ([]byte, er } // GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult: Resource that -// represents attribute results. +// represents attribute results. The list of suggestions for the attribute. type GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult struct { Suggestions []string `json:"suggestions,omitempty"` // ForceSendFields is a list of field names (e.g. "Suggestions") to @@ -5210,8 +5210,13 @@ type GoogleCloudRetailV2alphaProduct struct { // veterans, car owners, musicians, etc.) of the product. Audience *GoogleCloudRetailV2alphaAudience `json:"audience,omitempty"` // Availability: The online availability of the Product. Default to - // Availability.IN_STOCK. Corresponding properties: Google Merchant Center - // property availability (https://support.google.com/merchants/answer/6324448). + // Availability.IN_STOCK. For primary products with variants set the + // availability of the primary as Availability.OUT_OF_STOCK and set the true + // availability at the variant level. This way the primary product will be + // considered "in stock" as long as it has at least one variant in stock. For + // primary products with no variants set the true availability at the primary + // level. Corresponding properties: Google Merchant Center property + // availability (https://support.google.com/merchants/answer/6324448). // Schema.org property Offer.availability (https://schema.org/availability). // // Possible values: @@ -6389,7 +6394,7 @@ func (s GoogleCloudRetailV2alphaRuleFilterAction) MarshalJSON() ([]byte, error) // current rank. type GoogleCloudRetailV2alphaRuleForceReturnFacetAction struct { // FacetPositionAdjustments: Each instance corresponds to a force return - // attribute for the given condition. There can't be more 3 instances here. + // attribute for the given condition. There can't be more 15 instances here. FacetPositionAdjustments []*GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment `json:"facetPositionAdjustments,omitempty"` // ForceSendFields is a list of field names (e.g. "FacetPositionAdjustments") // to unconditionally include in API requests. By default, fields with empty or diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index cb388d27240..49ead852fca 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2237,7 +2237,7 @@ } } }, - "revision": "20240801", + "revision": "20240822", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4386,7 +4386,7 @@ "type": "object" }, "GoogleCloudRetailV2betaCompleteQueryResponseAttributeResult": { - "description": "Resource that represents attribute results.", + "description": "Resource that represents attribute results. The list of suggestions for the attribute.", "id": "GoogleCloudRetailV2betaCompleteQueryResponseAttributeResult", "properties": { "suggestions": { @@ -5746,7 +5746,7 @@ "description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." }, "availability": { - "description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", + "description": "The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered \"in stock\" as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", "enum": [ "AVAILABILITY_UNSPECIFIED", "IN_STOCK", @@ -6442,7 +6442,7 @@ "id": "GoogleCloudRetailV2betaRuleForceReturnFacetAction", "properties": { "facetPositionAdjustments": { - "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", + "description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 15 instances here.", "items": { "$ref": "GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment" }, diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 0a01ea1c9ab..0234cc281df 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -3451,7 +3451,7 @@ func (s GoogleCloudRetailV2betaCompleteQueryResponse) MarshalJSON() ([]byte, err } // GoogleCloudRetailV2betaCompleteQueryResponseAttributeResult: Resource that -// represents attribute results. +// represents attribute results. The list of suggestions for the attribute. type GoogleCloudRetailV2betaCompleteQueryResponseAttributeResult struct { Suggestions []string `json:"suggestions,omitempty"` // ForceSendFields is a list of field names (e.g. "Suggestions") to @@ -5617,8 +5617,13 @@ type GoogleCloudRetailV2betaProduct struct { // veterans, car owners, musicians, etc.) of the product. Audience *GoogleCloudRetailV2betaAudience `json:"audience,omitempty"` // Availability: The online availability of the Product. Default to - // Availability.IN_STOCK. Corresponding properties: Google Merchant Center - // property availability (https://support.google.com/merchants/answer/6324448). + // Availability.IN_STOCK. For primary products with variants set the + // availability of the primary as Availability.OUT_OF_STOCK and set the true + // availability at the variant level. This way the primary product will be + // considered "in stock" as long as it has at least one variant in stock. For + // primary products with no variants set the true availability at the primary + // level. Corresponding properties: Google Merchant Center property + // availability (https://support.google.com/merchants/answer/6324448). // Schema.org property Offer.availability (https://schema.org/availability). // // Possible values: @@ -6761,7 +6766,7 @@ func (s GoogleCloudRetailV2betaRuleFilterAction) MarshalJSON() ([]byte, error) { // current rank. type GoogleCloudRetailV2betaRuleForceReturnFacetAction struct { // FacetPositionAdjustments: Each instance corresponds to a force return - // attribute for the given condition. There can't be more 3 instances here. + // attribute for the given condition. There can't be more 15 instances here. FacetPositionAdjustments []*GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment `json:"facetPositionAdjustments,omitempty"` // ForceSendFields is a list of field names (e.g. "FacetPositionAdjustments") // to unconditionally include in API requests. By default, fields with empty or diff --git a/run/v2/run-api.json b/run/v2/run-api.json index b45bfb60e6a..c4e4331a98d 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -416,6 +416,38 @@ } }, "resources": { + "builds": { + "methods": { + "submit": { + "description": "Submits a build in a given project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/builds:submit", + "httpMethod": "POST", + "id": "run.projects.locations.builds.submit", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project and location to build in. Location must be a region, e.g., 'us-central1' or 'global' if the global builder is to be used. Format: projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/builds:submit", + "request": { + "$ref": "GoogleCloudRunV2SubmitBuildRequest" + }, + "response": { + "$ref": "GoogleCloudRunV2SubmitBuildResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "jobs": { "methods": { "create": { @@ -1494,7 +1526,7 @@ } } }, - "revision": "20240802", + "revision": "20240816", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -1516,6 +1548,41 @@ }, "type": "object" }, + "GoogleCloudRunV2BuildpacksBuild": { + "description": "Build the source using Buildpacks.", + "id": "GoogleCloudRunV2BuildpacksBuild", + "properties": { + "baseImage": { + "description": "Optional. The base image used to opt into automatic base image updates.", + "type": "string" + }, + "cacheImageUri": { + "description": "Optional. cache_image_uri is the GCR/AR URL where the cache image will be stored. cache_image_uri is optional and omitting it will disable caching. This URL must be stable across builds. It is used to derive a build-specific temporary URL by substituting the tag with the build ID. The build will clean up the temporary image on a best-effort basis.", + "type": "string" + }, + "enableAutomaticUpdates": { + "description": "Optional. Whether or not the application container will be enrolled in automatic base image updates. When true, the application will be built on a scratch base image, so the base layers can be appended at run time.", + "type": "boolean" + }, + "environmentVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. User-provided build-time environment variables.", + "type": "object" + }, + "functionTarget": { + "description": "Optional. Name of the function target if the source is a function source. Required for function builds.", + "type": "string" + }, + "runtime": { + "deprecated": true, + "description": "The runtime name, e.g. 'go113'. Leave blank for generic builds.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRunV2CancelExecutionRequest": { "description": "Request message for deleting an Execution.", "id": "GoogleCloudRunV2CancelExecutionRequest", @@ -1812,6 +1879,12 @@ }, "type": "object" }, + "GoogleCloudRunV2DockerBuild": { + "description": "Build the source using Docker. This means the source has a Dockerfile.", + "id": "GoogleCloudRunV2DockerBuild", + "properties": {}, + "type": "object" + }, "GoogleCloudRunV2EmptyDirVolumeSource": { "description": "In memory (tmpfs) ephemeral storage. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs).", "id": "GoogleCloudRunV2EmptyDirVolumeSource", @@ -1844,7 +1917,7 @@ "type": "string" }, "value": { - "description": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\", and the maximum length is 32768 bytes.", + "description": "Literal value of the environment variable. Defaults to \"\", and the maximum length is 32768 bytes. Variable references are not supported in Cloud Run.", "type": "string" }, "valueSource": { @@ -3294,6 +3367,14 @@ "description": "Output only. The main URI in which this Service is serving traffic.", "readOnly": true, "type": "string" + }, + "urls": { + "description": "Output only. All URLs serving traffic for this Service.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" } }, "type": "object" @@ -3321,6 +3402,79 @@ }, "type": "object" }, + "GoogleCloudRunV2StorageSource": { + "description": "Location of the source in an archive file in Google Cloud Storage.", + "id": "GoogleCloudRunV2StorageSource", + "properties": { + "bucket": { + "description": "Required. Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Optional. Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Required. Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRunV2SubmitBuildRequest": { + "description": "Request message for submitting a Build.", + "id": "GoogleCloudRunV2SubmitBuildRequest", + "properties": { + "buildpackBuild": { + "$ref": "GoogleCloudRunV2BuildpacksBuild", + "description": "Build the source using Buildpacks." + }, + "dockerBuild": { + "$ref": "GoogleCloudRunV2DockerBuild", + "description": "Build the source using Docker. This means the source has a Dockerfile." + }, + "imageUri": { + "description": "Required. Artifact Registry URI to store the built image.", + "type": "string" + }, + "serviceAccount": { + "description": "Optional. The service account to use for the build. If not set, the default Cloud Build service account for the project will be used.", + "type": "string" + }, + "storageSource": { + "$ref": "GoogleCloudRunV2StorageSource", + "description": "Required. Source for the build." + }, + "tags": { + "description": "Optional. Additional tags to annotate the build.", + "items": { + "type": "string" + }, + "type": "array" + }, + "workerPool": { + "description": "Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is `projects/{project}/locations/{region}/workerPools/{workerPool}` where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRunV2SubmitBuildResponse": { + "description": "Response message for submitting a Build.", + "id": "GoogleCloudRunV2SubmitBuildResponse", + "properties": { + "baseImageUri": { + "description": "URI of the base builder image in Artifact Registry being used in the build. Used to opt into automatic base image updates.", + "type": "string" + }, + "buildOperation": { + "$ref": "GoogleLongrunningOperation", + "description": "Cloud Build operation to be polled via CloudBuild API." + } + }, + "type": "object" + }, "GoogleCloudRunV2TCPSocketAction": { "description": "TCPSocketAction describes an action based on opening a socket", "id": "GoogleCloudRunV2TCPSocketAction", diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 1c12e78e19f..3713d208445 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -168,6 +168,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Builds = NewProjectsLocationsBuildsService(s) rs.Jobs = NewProjectsLocationsJobsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.Services = NewProjectsLocationsServicesService(s) @@ -177,6 +178,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + Builds *ProjectsLocationsBuildsService + Jobs *ProjectsLocationsJobsService Operations *ProjectsLocationsOperationsService @@ -184,6 +187,15 @@ type ProjectsLocationsService struct { Services *ProjectsLocationsServicesService } +func NewProjectsLocationsBuildsService(s *Service) *ProjectsLocationsBuildsService { + rs := &ProjectsLocationsBuildsService{s: s} + return rs +} + +type ProjectsLocationsBuildsService struct { + s *Service +} + func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService { rs := &ProjectsLocationsJobsService{s: s} rs.Executions = NewProjectsLocationsJobsExecutionsService(s) @@ -279,6 +291,48 @@ func (s GoogleCloudRunV2BinaryAuthorization) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRunV2BuildpacksBuild: Build the source using Buildpacks. +type GoogleCloudRunV2BuildpacksBuild struct { + // BaseImage: Optional. The base image used to opt into automatic base image + // updates. + BaseImage string `json:"baseImage,omitempty"` + // CacheImageUri: Optional. cache_image_uri is the GCR/AR URL where the cache + // image will be stored. cache_image_uri is optional and omitting it will + // disable caching. This URL must be stable across builds. It is used to derive + // a build-specific temporary URL by substituting the tag with the build ID. + // The build will clean up the temporary image on a best-effort basis. + CacheImageUri string `json:"cacheImageUri,omitempty"` + // EnableAutomaticUpdates: Optional. Whether or not the application container + // will be enrolled in automatic base image updates. When true, the application + // will be built on a scratch base image, so the base layers can be appended at + // run time. + EnableAutomaticUpdates bool `json:"enableAutomaticUpdates,omitempty"` + // EnvironmentVariables: Optional. User-provided build-time environment + // variables. + EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` + // FunctionTarget: Optional. Name of the function target if the source is a + // function source. Required for function builds. + FunctionTarget string `json:"functionTarget,omitempty"` + // Runtime: The runtime name, e.g. 'go113'. Leave blank for generic builds. + Runtime string `json:"runtime,omitempty"` + // ForceSendFields is a list of field names (e.g. "BaseImage") 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. "BaseImage") 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 GoogleCloudRunV2BuildpacksBuild) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2BuildpacksBuild + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRunV2CancelExecutionRequest: Request message for deleting an // Execution. type GoogleCloudRunV2CancelExecutionRequest struct { @@ -567,6 +621,11 @@ func (s GoogleCloudRunV2ContainerPort) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRunV2DockerBuild: Build the source using Docker. This means the +// source has a Dockerfile. +type GoogleCloudRunV2DockerBuild struct { +} + // GoogleCloudRunV2EmptyDirVolumeSource: In memory (tmpfs) ephemeral storage. // It is ephemeral in the sense that when the sandbox is taken down, the data // is destroyed with it (it does not persist across sandbox runs). @@ -613,13 +672,9 @@ type GoogleCloudRunV2EnvVar struct { // Name: Required. Name of the environment variable. Must not exceed 32768 // characters. Name string `json:"name,omitempty"` - // Value: Variable references $(VAR_NAME) are expanded using the previous - // defined environment variables in the container and any route environment - // variables. If a variable cannot be resolved, the reference in the input - // string will be unchanged. The $(VAR_NAME) syntax can be escaped with a - // double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, - // regardless of whether the variable exists or not. Defaults to "", and the - // maximum length is 32768 bytes. + // Value: Literal value of the environment variable. Defaults to "", and the + // maximum length is 32768 bytes. Variable references are not supported in + // Cloud Run. Value string `json:"value,omitempty"` // ValueSource: Source for the environment variable's value. ValueSource *GoogleCloudRunV2EnvVarSource `json:"valueSource,omitempty"` @@ -2282,6 +2337,8 @@ type GoogleCloudRunV2Service struct { UpdateTime string `json:"updateTime,omitempty"` // Uri: Output only. The main URI in which this Service is serving traffic. Uri string `json:"uri,omitempty"` + // Urls: Output only. All URLs serving traffic for this Service. + Urls []string `json:"urls,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -2351,6 +2408,108 @@ func (s GoogleCloudRunV2ServiceScaling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRunV2StorageSource: Location of the source in an archive file in +// Google Cloud Storage. +type GoogleCloudRunV2StorageSource struct { + // Bucket: Required. Google Cloud Storage bucket containing the source (see + // Bucket Name Requirements + // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). + Bucket string `json:"bucket,omitempty"` + // Generation: Optional. Google Cloud Storage generation for the object. If the + // generation is omitted, the latest generation will be used. + Generation int64 `json:"generation,omitempty,string"` + // Object: Required. Google Cloud Storage object containing the source. This + // object must be a gzipped archive file (`.tar.gz`) containing source to + // build. + Object string `json:"object,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") 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. "Bucket") 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 GoogleCloudRunV2StorageSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2StorageSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRunV2SubmitBuildRequest: Request message for submitting a Build. +type GoogleCloudRunV2SubmitBuildRequest struct { + // BuildpackBuild: Build the source using Buildpacks. + BuildpackBuild *GoogleCloudRunV2BuildpacksBuild `json:"buildpackBuild,omitempty"` + // DockerBuild: Build the source using Docker. This means the source has a + // Dockerfile. + DockerBuild *GoogleCloudRunV2DockerBuild `json:"dockerBuild,omitempty"` + // ImageUri: Required. Artifact Registry URI to store the built image. + ImageUri string `json:"imageUri,omitempty"` + // ServiceAccount: Optional. The service account to use for the build. If not + // set, the default Cloud Build service account for the project will be used. + ServiceAccount string `json:"serviceAccount,omitempty"` + // StorageSource: Required. Source for the build. + StorageSource *GoogleCloudRunV2StorageSource `json:"storageSource,omitempty"` + // Tags: Optional. Additional tags to annotate the build. + Tags []string `json:"tags,omitempty"` + // WorkerPool: Optional. Name of the Cloud Build Custom Worker Pool that should + // be used to build the function. The format of this field is + // `projects/{project}/locations/{region}/workerPools/{workerPool}` where + // {project} and {region} are the project id and region respectively where the + // worker pool is defined and {workerPool} is the short name of the worker + // pool. + WorkerPool string `json:"workerPool,omitempty"` + // ForceSendFields is a list of field names (e.g. "BuildpackBuild") 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. "BuildpackBuild") 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 GoogleCloudRunV2SubmitBuildRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2SubmitBuildRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRunV2SubmitBuildResponse: Response message for submitting a +// Build. +type GoogleCloudRunV2SubmitBuildResponse struct { + // BaseImageUri: URI of the base builder image in Artifact Registry being used + // in the build. Used to opt into automatic base image updates. + BaseImageUri string `json:"baseImageUri,omitempty"` + // BuildOperation: Cloud Build operation to be polled via CloudBuild API. + BuildOperation *GoogleLongrunningOperation `json:"buildOperation,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BaseImageUri") 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. "BaseImageUri") 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 GoogleCloudRunV2SubmitBuildResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRunV2SubmitBuildResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRunV2TCPSocketAction: TCPSocketAction describes an action based // on opening a socket type GoogleCloudRunV2TCPSocketAction struct { @@ -5361,6 +5520,110 @@ func (c *ProjectsLocationsExportProjectMetadataCall) Do(opts ...googleapi.CallOp return ret, nil } +type ProjectsLocationsBuildsSubmitCall struct { + s *Service + parent string + googlecloudrunv2submitbuildrequest *GoogleCloudRunV2SubmitBuildRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Submit: Submits a build in a given project. +// +// - parent: The project and location to build in. Location must be a region, +// e.g., 'us-central1' or 'global' if the global builder is to be used. +// Format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsBuildsService) Submit(parent string, googlecloudrunv2submitbuildrequest *GoogleCloudRunV2SubmitBuildRequest) *ProjectsLocationsBuildsSubmitCall { + c := &ProjectsLocationsBuildsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudrunv2submitbuildrequest = googlecloudrunv2submitbuildrequest + 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 *ProjectsLocationsBuildsSubmitCall) Fields(s ...googleapi.Field) *ProjectsLocationsBuildsSubmitCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBuildsSubmitCall) Context(ctx context.Context) *ProjectsLocationsBuildsSubmitCall { + 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 *ProjectsLocationsBuildsSubmitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBuildsSubmitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrunv2submitbuildrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/builds:submit") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "run.projects.locations.builds.submit" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudRunV2SubmitBuildResponse.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 *ProjectsLocationsBuildsSubmitCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRunV2SubmitBuildResponse, 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 := &GoogleCloudRunV2SubmitBuildResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsJobsCreateCall struct { s *Service parent string diff --git a/searchads360/v0/searchads360-api.json b/searchads360/v0/searchads360-api.json index 7ac13f7a467..a81c1109c11 100644 --- a/searchads360/v0/searchads360-api.json +++ b/searchads360/v0/searchads360-api.json @@ -260,7 +260,7 @@ } } }, - "revision": "20240414", + "revision": "20240822", "rootUrl": "https://searchads360.googleapis.com/", "schemas": { "GoogleAdsSearchads360V0Common__AdScheduleInfo": { @@ -346,6 +346,17 @@ }, "type": "object" }, + "GoogleAdsSearchads360V0Common__AdTextAsset": { + "description": "A text asset used inside an ad.", + "id": "GoogleAdsSearchads360V0Common__AdTextAsset", + "properties": { + "text": { + "description": "Asset text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleAdsSearchads360V0Common__AgeRangeInfo": { "description": "An age range criterion.", "id": "GoogleAdsSearchads360V0Common__AgeRangeInfo", @@ -1012,6 +1023,11 @@ "format": "double", "type": "number" }, + "averageQualityScore": { + "description": "The average quality score.", + "format": "double", + "type": "number" + }, "clicks": { "description": "The number of clicks.", "format": "int64", @@ -1540,6 +1556,20 @@ "format": "int64", "type": "string" }, + "descriptions": { + "description": "List of text assets for descriptions. When the ad serves the descriptions will be selected from this list.", + "items": { + "$ref": "GoogleAdsSearchads360V0Common__AdTextAsset" + }, + "type": "array" + }, + "headlines": { + "description": "List of text assets for headlines. When the ad serves the headlines will be selected from this list.", + "items": { + "$ref": "GoogleAdsSearchads360V0Common__AdTextAsset" + }, + "type": "array" + }, "path1": { "description": "Text appended to the auto-generated visible URL with a delimiter.", "type": "string" @@ -1738,6 +1768,27 @@ ], "type": "string" }, + "geoTargetCity": { + "description": "Resource name of the geo target constant that represents a city.", + "type": "string" + }, + "geoTargetCountry": { + "description": "Resource name of the geo target constant that represents a country.", + "type": "string" + }, + "geoTargetMetro": { + "description": "Resource name of the geo target constant that represents a metro.", + "type": "string" + }, + "geoTargetRegion": { + "description": "Resource name of the geo target constant that represents a region.", + "type": "string" + }, + "hour": { + "description": "Hour of day as a number between 0 and 23, inclusive.", + "format": "int32", + "type": "integer" + }, "keyword": { "$ref": "GoogleAdsSearchads360V0Common__Keyword", "description": "Keyword criterion." @@ -2144,7 +2195,7 @@ }, "targetSpendMicros": { "deprecated": true, - "description": "The spend target under which to maximize clicks. A TargetSpend bidder will attempt to spend the smaller of this value or the natural throttling spend amount. If not specified, the budget is used as the spend target. This field is deprecated and should no longer be used. See https://ads-developers.googleblog.com/2020/05/reminder-about-sunset-creation-of.html for details.", + "description": "Deprecated: The spend target under which to maximize clicks. A TargetSpend bidder will attempt to spend the smaller of this value or the natural throttling spend amount. If not specified, the budget is used as the spend target. This field is deprecated and should no longer be used. See https://ads-developers.googleblog.com/2020/05/reminder-about-sunset-creation-of.html for details.", "format": "int64", "type": "string" } @@ -2181,7 +2232,7 @@ "id": "GoogleAdsSearchads360V0Common__TextLabel", "properties": { "backgroundColor": { - "description": "Background color of the label in RGB format. This string must match the regular expression '^\\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'. Note: The background color may not be visible for manager accounts.", + "description": "Background color of the label in HEX format. This string must match the regular expression '^\\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'. Note: The background color may not be visible for manager accounts.", "type": "string" }, "description": { @@ -3032,7 +3083,7 @@ "type": "object" }, "GoogleAdsSearchads360V0Errors__SearchAds360Error": { - "description": "SearchAds360-specific error.", + "description": "Search Ads 360-specific error.", "id": "GoogleAdsSearchads360V0Errors__SearchAds360Error", "properties": { "details": { @@ -3893,7 +3944,8 @@ "DISCOVERY_MULTI_ASSET_AD", "DISCOVERY_CAROUSEL_AD", "TRAVEL_AD", - "DISCOVERY_VIDEO_RESPONSIVE_AD" + "DISCOVERY_VIDEO_RESPONSIVE_AD", + "MULTIMEDIA_AD" ], "enumDescriptions": [ "No value has been specified.", @@ -3929,7 +3981,8 @@ "Discovery multi asset ad.", "Discovery carousel ad.", "Travel ad.", - "Discovery video responsive ad." + "Discovery video responsive ad.", + "Multimedia ad." ], "readOnly": true, "type": "string" @@ -4145,7 +4198,7 @@ "type": "string" }, "engineId": { - "description": "Output only. ID of the ad in the external engine account. This field is for SearchAds 360 account only, for example, Yahoo Japan, Microsoft, Baidu etc. For non-SearchAds 360 entity, use \"ad_group_ad.ad.id\" instead.", + "description": "Output only. ID of the ad in the external engine account. This field is for Search Ads 360 account only, for example, Yahoo Japan, Microsoft, Baidu etc. For non-Search Ads 360 entity, use \"ad_group_ad.ad.id\" instead.", "readOnly": true, "type": "string" }, @@ -4267,6 +4320,12 @@ "description": "Immutable. The label assigned to the ad group ad.", "type": "string" }, + "ownerCustomerId": { + "description": "Output only. The ID of the Customer which owns the label.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. The resource name of the ad group ad label. Ad group ad label resource names have the form: `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}`", "type": "string" @@ -4689,6 +4748,12 @@ "description": "Immutable. The label assigned to the ad group criterion.", "type": "string" }, + "ownerCustomerId": { + "description": "Output only. The ID of the Customer which owns the label.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. The resource name of the ad group criterion label. Ad group criterion label resource names have the form: `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}`", "type": "string" @@ -4708,6 +4773,12 @@ "description": "Immutable. The label assigned to the ad group.", "type": "string" }, + "ownerCustomerId": { + "description": "Output only. The ID of the Customer which owns the label.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. The resource name of the ad group label. Ad group label resource names have the form: `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}`", "type": "string" @@ -5512,7 +5583,8 @@ "VIDEO_SEQUENCE", "APP_CAMPAIGN_FOR_PRE_REGISTRATION", "VIDEO_REACH_TARGET_FREQUENCY", - "TRAVEL_ACTIVITIES" + "TRAVEL_ACTIVITIES", + "SOCIAL_FACEBOOK_TRACKING_ONLY" ], "enumDescriptions": [ "Not specified.", @@ -5535,7 +5607,8 @@ "Video campaigns with sequence video ads.", "App Campaign for pre registration, specialized for advertising mobile app pre-registration, that targets multiple advertising channels across Google Play, YouTube and Display Network.", "Video reach campaign with Target Frequency bidding strategy.", - "Travel Activities campaigns." + "Travel Activities campaigns.", + "Facebook tracking only social campaigns." ], "type": "string" }, @@ -5555,7 +5628,8 @@ "PERFORMANCE_MAX", "LOCAL_SERVICES", "DISCOVERY", - "TRAVEL" + "TRAVEL", + "SOCIAL" ], "enumDescriptions": [ "Not specified.", @@ -5571,7 +5645,8 @@ "Performance Max campaigns.", "Local services campaigns.", "Discovery campaigns.", - "Travel campaigns." + "Travel campaigns.", + "Social campaigns." ], "type": "string" }, @@ -6288,6 +6363,12 @@ "description": "Immutable. The label assigned to the campaign.", "type": "string" }, + "ownerCustomerId": { + "description": "Output only. The ID of the Customer which owns the label.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. Name of the resource. Campaign label resource names have the form: `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}`", "type": "string" @@ -6470,7 +6551,7 @@ "type": "string" }, "merchantId": { - "description": "Output only. The SearchAds360 inventory account ID containing the product that was clicked on. SearchAds360 generates this ID when you link an inventory account in SearchAds360.", + "description": "Output only. The Search Ads 360 inventory account ID containing the product that was clicked on. Search Ads 360 generates this ID when you link an inventory account in Search Ads 360.", "format": "int64", "readOnly": true, "type": "string" @@ -6535,7 +6616,7 @@ "type": "string" }, "visitId": { - "description": "Output only. The SearchAds360 visit ID that the conversion is attributed to.", + "description": "Output only. The Search Ads 360 visit ID that the conversion is attributed to.", "format": "int64", "readOnly": true, "type": "string" @@ -6979,6 +7060,31 @@ "readOnly": true, "type": "boolean" }, + "renderType": { + "description": "Output only. How the result value of the custom column should be interpreted.", + "enum": [ + "UNSPECIFIED", + "UNKNOWN", + "NUMBER", + "PERCENT", + "MONEY", + "STRING", + "BOOLEAN", + "DATE" + ], + "enumDescriptions": [ + "Not specified.", + "Unknown.", + "The custom column is a raw numerical value. See value_type field to determine if it is an integer or a double.", + "The custom column should be multiplied by 100 to retrieve the percentage value.", + "The custom column value is a monetary value and is in micros.", + "The custom column value is a string.", + "The custom column value is a boolean.", + "The custom column value is a date represented as an integer in YYYYMMDD format." + ], + "readOnly": true, + "type": "string" + }, "resourceName": { "description": "Immutable. The resource name of the custom column. Custom column resource names have the form: `customers/{customer_id}/customColumns/{custom_column_id}`", "type": "string" @@ -6991,7 +7097,8 @@ "STRING", "INT64", "DOUBLE", - "BOOLEAN" + "BOOLEAN", + "DATE" ], "enumDescriptions": [ "Not specified.", @@ -6999,7 +7106,8 @@ "The custom column value is a string.", "The custom column value is an int64 number.", "The custom column value is a double number.", - "The custom column value is a boolean." + "The custom column value is a boolean.", + "The custom column value is a date, in YYYYMMDD format." ], "readOnly": true, "type": "string" @@ -7327,6 +7435,11 @@ "description": "Immutable. Name of the resource. CustomerManagerLink resource names have the form: `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}`", "type": "string" }, + "startTime": { + "description": "Output only. The timestamp when the CustomerManagerLink was created. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format.", + "readOnly": true, + "type": "string" + }, "status": { "description": "Status of the link between the customer and the manager.", "enum": [ diff --git a/searchads360/v0/searchads360-gen.go b/searchads360/v0/searchads360-gen.go index 6b5c50ac636..db0eac98804 100644 --- a/searchads360/v0/searchads360-gen.go +++ b/searchads360/v0/searchads360-gen.go @@ -267,6 +267,28 @@ func (s GoogleAdsSearchads360V0Common__AdScheduleInfo) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleAdsSearchads360V0Common__AdTextAsset: A text asset used inside an ad. +type GoogleAdsSearchads360V0Common__AdTextAsset struct { + // Text: Asset text. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "Text") 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. "Text") 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 GoogleAdsSearchads360V0Common__AdTextAsset) MarshalJSON() ([]byte, error) { + type NoMethod GoogleAdsSearchads360V0Common__AdTextAsset + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleAdsSearchads360V0Common__AgeRangeInfo: An age range criterion. type GoogleAdsSearchads360V0Common__AgeRangeInfo struct { // Type: Type of the age range. @@ -1035,6 +1057,8 @@ type GoogleAdsSearchads360V0Common__Metrics struct { // metrics_currency parameter at // https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause AverageCpm float64 `json:"averageCpm,omitempty"` + // AverageQualityScore: The average quality score. + AverageQualityScore float64 `json:"averageQualityScore,omitempty"` // Clicks: The number of clicks. Clicks int64 `json:"clicks,omitempty,string"` // ClientAccountConversions: The number of client account conversions. This @@ -1574,6 +1598,7 @@ func (s *GoogleAdsSearchads360V0Common__Metrics) UnmarshalJSON(data []byte) erro AverageCost gensupport.JSONFloat64 `json:"averageCost"` AverageCpc gensupport.JSONFloat64 `json:"averageCpc"` AverageCpm gensupport.JSONFloat64 `json:"averageCpm"` + AverageQualityScore gensupport.JSONFloat64 `json:"averageQualityScore"` ClientAccountConversions gensupport.JSONFloat64 `json:"clientAccountConversions"` ClientAccountConversionsValue gensupport.JSONFloat64 `json:"clientAccountConversionsValue"` ClientAccountCrossSellUnitsSold gensupport.JSONFloat64 `json:"clientAccountCrossSellUnitsSold"` @@ -1640,6 +1665,7 @@ func (s *GoogleAdsSearchads360V0Common__Metrics) UnmarshalJSON(data []byte) erro s.AverageCost = float64(s1.AverageCost) s.AverageCpc = float64(s1.AverageCpc) s.AverageCpm = float64(s1.AverageCpm) + s.AverageQualityScore = float64(s1.AverageQualityScore) s.ClientAccountConversions = float64(s1.ClientAccountConversions) s.ClientAccountConversionsValue = float64(s1.ClientAccountConversionsValue) s.ClientAccountCrossSellUnitsSold = float64(s1.ClientAccountCrossSellUnitsSold) @@ -1849,6 +1875,12 @@ type GoogleAdsSearchads360V0Common__SearchAds360ProductAdInfo struct { type GoogleAdsSearchads360V0Common__SearchAds360ResponsiveSearchAdInfo struct { // AdTrackingId: The tracking id of the ad. AdTrackingId int64 `json:"adTrackingId,omitempty,string"` + // Descriptions: List of text assets for descriptions. When the ad serves the + // descriptions will be selected from this list. + Descriptions []*GoogleAdsSearchads360V0Common__AdTextAsset `json:"descriptions,omitempty"` + // Headlines: List of text assets for headlines. When the ad serves the + // headlines will be selected from this list. + Headlines []*GoogleAdsSearchads360V0Common__AdTextAsset `json:"headlines,omitempty"` // Path1: Text appended to the auto-generated visible URL with a delimiter. Path1 string `json:"path1,omitempty"` // Path2: Text appended to path1 with a delimiter. @@ -2008,6 +2040,20 @@ type GoogleAdsSearchads360V0Common__Segments struct { // "CONNECTED_TV" - Smart TVs and game consoles. // "OTHER" - Other device types. Device string `json:"device,omitempty"` + // GeoTargetCity: Resource name of the geo target constant that represents a + // city. + GeoTargetCity string `json:"geoTargetCity,omitempty"` + // GeoTargetCountry: Resource name of the geo target constant that represents a + // country. + GeoTargetCountry string `json:"geoTargetCountry,omitempty"` + // GeoTargetMetro: Resource name of the geo target constant that represents a + // metro. + GeoTargetMetro string `json:"geoTargetMetro,omitempty"` + // GeoTargetRegion: Resource name of the geo target constant that represents a + // region. + GeoTargetRegion string `json:"geoTargetRegion,omitempty"` + // Hour: Hour of day as a number between 0 and 23, inclusive. + Hour int64 `json:"hour,omitempty"` // Keyword: Keyword criterion. Keyword *GoogleAdsSearchads360V0Common__Keyword `json:"keyword,omitempty"` // Month: Month as represented by the date of the first day of a month. @@ -2377,10 +2423,11 @@ type GoogleAdsSearchads360V0Common__TargetSpend struct { // CpcBidCeilingMicros: Maximum bid limit that can be set by the bid strategy. // The limit applies to all keywords managed by the strategy. CpcBidCeilingMicros int64 `json:"cpcBidCeilingMicros,omitempty,string"` - // TargetSpendMicros: The spend target under which to maximize clicks. A - // TargetSpend bidder will attempt to spend the smaller of this value or the - // natural throttling spend amount. If not specified, the budget is used as the - // spend target. This field is deprecated and should no longer be used. See + // TargetSpendMicros: Deprecated: The spend target under which to maximize + // clicks. A TargetSpend bidder will attempt to spend the smaller of this value + // or the natural throttling spend amount. If not specified, the budget is used + // as the spend target. This field is deprecated and should no longer be used. + // See // https://ads-developers.googleblog.com/2020/05/reminder-about-sunset-creation-of.html // for details. TargetSpendMicros int64 `json:"targetSpendMicros,omitempty,string"` @@ -2453,7 +2500,7 @@ func (s GoogleAdsSearchads360V0Common__TextAsset) MarshalJSON() ([]byte, error) // GoogleAdsSearchads360V0Common__TextLabel: A type of label displaying text on // a colored background. type GoogleAdsSearchads360V0Common__TextLabel struct { - // BackgroundColor: Background color of the label in RGB format. This string + // BackgroundColor: Background color of the label in HEX format. This string // must match the regular expression '^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'. // Note: The background color may not be visible for manager accounts. BackgroundColor string `json:"backgroundColor,omitempty"` @@ -3339,7 +3386,7 @@ func (s GoogleAdsSearchads360V0Errors__QuotaErrorDetails) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAdsSearchads360V0Errors__SearchAds360Error: SearchAds360-specific +// GoogleAdsSearchads360V0Errors__SearchAds360Error: Search Ads 360-specific // error. type GoogleAdsSearchads360V0Errors__SearchAds360Error struct { // Details: Additional error details, which are returned by certain error @@ -4481,6 +4528,7 @@ type GoogleAdsSearchads360V0Resources__Ad struct { // "DISCOVERY_CAROUSEL_AD" - Discovery carousel ad. // "TRAVEL_AD" - Travel ad. // "DISCOVERY_VIDEO_RESPONSIVE_AD" - Discovery video responsive ad. + // "MULTIMEDIA_AD" - Multimedia ad. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayUrl") to // unconditionally include in API requests. By default, fields with empty or @@ -4644,8 +4692,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupAd struct { // HH:mm:ss.ssssss" format. CreationTime string `json:"creationTime,omitempty"` // EngineId: Output only. ID of the ad in the external engine account. This - // field is for SearchAds 360 account only, for example, Yahoo Japan, - // Microsoft, Baidu etc. For non-SearchAds 360 entity, use "ad_group_ad.ad.id" + // field is for Search Ads 360 account only, for example, Yahoo Japan, + // Microsoft, Baidu etc. For non-Search Ads 360 entity, use "ad_group_ad.ad.id" // instead. EngineId string `json:"engineId,omitempty"` // EngineStatus: Output only. Additional status of the ad in the external @@ -4726,6 +4774,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupAdLabel struct { AdGroupAd string `json:"adGroupAd,omitempty"` // Label: Immutable. The label assigned to the ad group ad. Label string `json:"label,omitempty"` + // OwnerCustomerId: Output only. The ID of the Customer which owns the label. + OwnerCustomerId int64 `json:"ownerCustomerId,omitempty,string"` // ResourceName: Immutable. The resource name of the ad group ad label. Ad // group ad label resource names have the form: // `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` @@ -5106,6 +5156,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupCriterionLabel struct { AdGroupCriterion string `json:"adGroupCriterion,omitempty"` // Label: Immutable. The label assigned to the ad group criterion. Label string `json:"label,omitempty"` + // OwnerCustomerId: Output only. The ID of the Customer which owns the label. + OwnerCustomerId int64 `json:"ownerCustomerId,omitempty,string"` // ResourceName: Immutable. The resource name of the ad group criterion label. // Ad group criterion label resource names have the form: // `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~ @@ -5136,6 +5188,8 @@ type GoogleAdsSearchads360V0Resources__AdGroupLabel struct { AdGroup string `json:"adGroup,omitempty"` // Label: Immutable. The label assigned to the ad group. Label string `json:"label,omitempty"` + // OwnerCustomerId: Output only. The ID of the Customer which owns the label. + OwnerCustomerId int64 `json:"ownerCustomerId,omitempty,string"` // ResourceName: Immutable. The resource name of the ad group label. Ad group // label resource names have the form: // `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` @@ -5915,6 +5969,7 @@ type GoogleAdsSearchads360V0Resources__Campaign struct { // "VIDEO_REACH_TARGET_FREQUENCY" - Video reach campaign with Target // Frequency bidding strategy. // "TRAVEL_ACTIVITIES" - Travel Activities campaigns. + // "SOCIAL_FACEBOOK_TRACKING_ONLY" - Facebook tracking only social campaigns. AdvertisingChannelSubType string `json:"advertisingChannelSubType,omitempty"` // AdvertisingChannelType: Immutable. The primary serving target for ads within // the campaign. The targeting options can be refined in `network_settings`. @@ -5941,6 +5996,7 @@ type GoogleAdsSearchads360V0Resources__Campaign struct { // "LOCAL_SERVICES" - Local services campaigns. // "DISCOVERY" - Discovery campaigns. // "TRAVEL" - Travel campaigns. + // "SOCIAL" - Social campaigns. AdvertisingChannelType string `json:"advertisingChannelType,omitempty"` // BiddingStrategy: Portfolio bidding strategy used by campaign. BiddingStrategy string `json:"biddingStrategy,omitempty"` @@ -6565,6 +6621,8 @@ type GoogleAdsSearchads360V0Resources__CampaignLabel struct { Campaign string `json:"campaign,omitempty"` // Label: Immutable. The label assigned to the campaign. Label string `json:"label,omitempty"` + // OwnerCustomerId: Output only. The ID of the Customer which owns the label. + OwnerCustomerId int64 `json:"ownerCustomerId,omitempty,string"` // ResourceName: Immutable. Name of the resource. Campaign label resource names // have the form: // `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` @@ -6711,9 +6769,9 @@ type GoogleAdsSearchads360V0Resources__Conversion struct { FloodlightOriginalRevenue int64 `json:"floodlightOriginalRevenue,omitempty,string"` // Id: Output only. The ID of the conversion Id int64 `json:"id,omitempty,string"` - // MerchantId: Output only. The SearchAds360 inventory account ID containing - // the product that was clicked on. SearchAds360 generates this ID when you - // link an inventory account in SearchAds360. + // MerchantId: Output only. The Search Ads 360 inventory account ID containing + // the product that was clicked on. Search Ads 360 generates this ID when you + // link an inventory account in Search Ads 360. MerchantId int64 `json:"merchantId,omitempty,string"` // ProductChannel: Output only. The sales channel of the product that was // clicked on: Online or Local. @@ -6752,7 +6810,7 @@ type GoogleAdsSearchads360V0Resources__Conversion struct { // "ENABLED" - The conversion is enabled. // "REMOVED" - The conversion has been removed. Status string `json:"status,omitempty"` - // VisitId: Output only. The SearchAds360 visit ID that the conversion is + // VisitId: Output only. The Search Ads 360 visit ID that the conversion is // attributed to. VisitId int64 `json:"visitId,omitempty,string"` // ForceSendFields is a list of field names (e.g. "AdId") to unconditionally @@ -7175,6 +7233,22 @@ type GoogleAdsSearchads360V0Resources__CustomColumn struct { // ReferencesMetrics: Output only. True when the custom column is referring to // one or more metrics. ReferencesMetrics bool `json:"referencesMetrics,omitempty"` + // RenderType: Output only. How the result value of the custom column should be + // interpreted. + // + // Possible values: + // "UNSPECIFIED" - Not specified. + // "UNKNOWN" - Unknown. + // "NUMBER" - The custom column is a raw numerical value. See value_type + // field to determine if it is an integer or a double. + // "PERCENT" - The custom column should be multiplied by 100 to retrieve the + // percentage value. + // "MONEY" - The custom column value is a monetary value and is in micros. + // "STRING" - The custom column value is a string. + // "BOOLEAN" - The custom column value is a boolean. + // "DATE" - The custom column value is a date represented as an integer in + // YYYYMMDD format. + RenderType string `json:"renderType,omitempty"` // ResourceName: Immutable. The resource name of the custom column. Custom // column resource names have the form: // `customers/{customer_id}/customColumns/{custom_column_id}` @@ -7188,6 +7262,7 @@ type GoogleAdsSearchads360V0Resources__CustomColumn struct { // "INT64" - The custom column value is an int64 number. // "DOUBLE" - The custom column value is a double number. // "BOOLEAN" - The custom column value is a boolean. + // "DATE" - The custom column value is a date, in YYYYMMDD format. ValueType string `json:"valueType,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -7467,6 +7542,10 @@ type GoogleAdsSearchads360V0Resources__CustomerManagerLink struct { // `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_ // link_id}` ResourceName string `json:"resourceName,omitempty"` + // StartTime: Output only. The timestamp when the CustomerManagerLink was + // created. The timestamp is in the customer's time zone and in "yyyy-MM-dd + // HH:mm:ss" format. + StartTime string `json:"startTime,omitempty"` // Status: Status of the link between the customer and the manager. // // Possible values: diff --git a/secretmanager/v1/secretmanager-api.json b/secretmanager/v1/secretmanager-api.json index 55c52f9d8b5..7698407fe4a 100644 --- a/secretmanager/v1/secretmanager-api.json +++ b/secretmanager/v1/secretmanager-api.json @@ -1190,7 +1190,7 @@ } } }, - "revision": "20240726", + "revision": "20240816", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -1814,7 +1814,7 @@ "id": "Topic", "properties": { "name": { - "description": "Required. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager service agent must have the `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role (`roles/pubsub.publisher`) includes this permission.", + "description": "Identifier. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager service agent must have the `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role (`roles/pubsub.publisher`) includes this permission.", "type": "string" } }, diff --git a/secretmanager/v1/secretmanager-gen.go b/secretmanager/v1/secretmanager-gen.go index 1ea1fc8ebab..a15d2ad1233 100644 --- a/secretmanager/v1/secretmanager-gen.go +++ b/secretmanager/v1/secretmanager-gen.go @@ -1323,7 +1323,7 @@ func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { // Topic: A Pub/Sub topic which Secret Manager will publish to when control // plane events occur on this secret. type Topic struct { - // Name: Required. The resource name of the Pub/Sub topic that will be + // Name: Identifier. The resource name of the Pub/Sub topic that will be // published to, in the following format: `projects/*/topics/*`. For // publication to succeed, the Secret Manager service agent must have the // `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index cde70d19cd3..76cf152c492 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -15,6 +15,13 @@ "description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/security-command-center", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://securitycenter.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -6027,7 +6034,7 @@ } } }, - "revision": "20240806", + "revision": "20240809", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index d9c964c1875..7cb1c9cb423 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -15,6 +15,13 @@ "description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/security-command-center", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://securitycenter.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -896,7 +903,7 @@ } } }, - "revision": "20240806", + "revision": "20240809", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index e71294b9a51..788f2fcff95 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -15,6 +15,13 @@ "description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/security-command-center", + "endpoints": [ + { + "description": "Regional Endpoint", + "endpointUrl": "https://securitycenter.me-central2.rep.googleapis.com/", + "location": "me-central2" + } + ], "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -1906,7 +1913,7 @@ } } }, - "revision": "20240806", + "revision": "20240809", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index 5249f3a86ad..196f7adf294 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -1029,7 +1029,7 @@ } } }, - "revision": "20240716", + "revision": "20240825", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1211,6 +1211,10 @@ }, "type": "array" }, + "skipRequestedAddressValidation": { + "description": "Optional. Skips validating if the requested_address is in use by SN VPC’s peering group. Compute Engine will still perform this check and fail the request if the requested_address is in use. Note that Compute Engine does not check for the existence of dynamic routes when performing this check. Caller of this API should make sure that there are no dynamic routes overlapping with the requested_address/prefix_length IP address range otherwise the created subnet could cause misrouting.", + "type": "boolean" + }, "subnetwork": { "description": "Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", "type": "string" @@ -2182,6 +2186,17 @@ }, "type": "object" }, + "ExperimentalFeatures": { + "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", + "id": "ExperimentalFeatures", + "properties": { + "restAsyncIoEnabled": { + "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -2943,6 +2958,25 @@ "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", "format": "google-duration", "type": "string" + }, + "timeSeriesResourceHierarchyLevel": { + "description": "The scope of the timeseries data of the metric.", + "items": { + "enum": [ + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", + "PROJECT", + "ORGANIZATION", + "FOLDER" + ], + "enumDescriptions": [ + "Do not use this default value.", + "Scopes a metric to a project.", + "Scopes a metric to an organization.", + "Scopes a metric to a folder." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -3219,7 +3253,7 @@ "type": "string" }, "role": { - "description": "Required. Role to apply. Only allowlisted roles can be used at the specified granularity. The role must be one of the following: - 'roles/container.hostServiceAgentUser' applied on the shared VPC host project - 'roles/compute.securityAdmin' applied on the shared VPC host project - 'roles/compute.networkAdmin' applied on the shared VPC host project - 'roles/compute.xpnAdmin' applied on the shared VPC host project - 'roles/dns.admin' applied on the shared VPC host project - 'roles/logging.admin' applied on the shared VPC host project", + "description": "Required. Role to apply. Only allowlisted roles can be used at the specified granularity. The role must be one of the following: - 'roles/container.hostServiceAgentUser' applied on the shared VPC host project - 'roles/compute.securityAdmin' applied on the shared VPC host project - 'roles/compute.networkAdmin' applied on the shared VPC host project - 'roles/tpu.xpnAgent' applied on the shared VPC host project - 'roles/dns.admin' applied on the shared VPC host project - 'roles/logging.admin' applied on the shared VPC host project - 'roles/monitoring.viewer' applied on the shared VPC host project", "type": "string" } }, @@ -3312,6 +3346,10 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "experimentalFeatures": { + "$ref": "ExperimentalFeatures", + "description": "Experimental features to be included during client library generation." } }, "type": "object" diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index 282a20fb4d1..84d0454f46b 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -542,6 +542,15 @@ type AddSubnetworkRequest struct { // SecondaryIpRangeSpecs: Optional. A list of secondary IP ranges to be created // within the new subnetwork. SecondaryIpRangeSpecs []*SecondaryIpRangeSpec `json:"secondaryIpRangeSpecs,omitempty"` + // SkipRequestedAddressValidation: Optional. Skips validating if the + // requested_address is in use by SN VPC’s peering group. Compute Engine will + // still perform this check and fail the request if the requested_address is in + // use. Note that Compute Engine does not check for the existence of dynamic + // routes when performing this check. Caller of this API should make sure that + // there are no dynamic routes overlapping with the + // requested_address/prefix_length IP address range otherwise the created + // subnet could cause misrouting. + SkipRequestedAddressValidation bool `json:"skipRequestedAddressValidation,omitempty"` // Subnetwork: Required. A name for the new subnet. For information about the // naming requirements, see subnetwork // (/compute/docs/reference/rest/v1/subnetworks) in the Compute API @@ -1940,6 +1949,33 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExperimentalFeatures: Experimental features to be included during client +// library generation. These fields will be deprecated once the feature +// graduates and is enabled by default. +type ExperimentalFeatures struct { + // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if + // `rest` transport is enabled. By default, asynchronous REST clients will not + // be generated. This feature will be enabled by default 1 month after + // launching the feature in preview packages. + RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") 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. "RestAsyncIoEnabled") 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 ExperimentalFeatures) MarshalJSON() ([]byte, error) { + type NoMethod ExperimentalFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -3134,6 +3170,16 @@ type MetricDescriptorMetadata struct { // interval, excluding data loss due to errors. Metrics with a higher // granularity have a smaller sampling period. SamplePeriod string `json:"samplePeriod,omitempty"` + // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the + // metric. + // + // Possible values: + // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this + // default value. + // "PROJECT" - Scopes a metric to a project. + // "ORGANIZATION" - Scopes a metric to an organization. + // "FOLDER" - Scopes a metric to a folder. + TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IngestDelay") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3658,9 +3704,10 @@ type PolicyBinding struct { // 'roles/container.hostServiceAgentUser' applied on the shared VPC host // project - 'roles/compute.securityAdmin' applied on the shared VPC host // project - 'roles/compute.networkAdmin' applied on the shared VPC host - // project - 'roles/compute.xpnAdmin' applied on the shared VPC host project - + // project - 'roles/tpu.xpnAgent' applied on the shared VPC host project - // 'roles/dns.admin' applied on the shared VPC host project - - // 'roles/logging.admin' applied on the shared VPC host project + // 'roles/logging.admin' applied on the shared VPC host project - + // 'roles/monitoring.viewer' applied on the shared VPC host project Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Member") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -3753,6 +3800,9 @@ func (s Publishing) MarshalJSON() ([]byte, error) { type PythonSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // ExperimentalFeatures: Experimental features to be included during client + // library generation. + ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/servicenetworking/v1beta/servicenetworking-api.json b/servicenetworking/v1beta/servicenetworking-api.json index 14b899f551c..df63291f544 100644 --- a/servicenetworking/v1beta/servicenetworking-api.json +++ b/servicenetworking/v1beta/servicenetworking-api.json @@ -307,7 +307,7 @@ } } }, - "revision": "20240716", + "revision": "20240825", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1281,6 +1281,17 @@ }, "type": "object" }, + "ExperimentalFeatures": { + "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", + "id": "ExperimentalFeatures", + "properties": { + "restAsyncIoEnabled": { + "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -1967,6 +1978,25 @@ "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", "format": "google-duration", "type": "string" + }, + "timeSeriesResourceHierarchyLevel": { + "description": "The scope of the timeseries data of the metric.", + "items": { + "enum": [ + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", + "PROJECT", + "ORGANIZATION", + "FOLDER" + ], + "enumDescriptions": [ + "Do not use this default value.", + "Scopes a metric to a project.", + "Scopes a metric to an organization.", + "Scopes a metric to a folder." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -2243,7 +2273,7 @@ "type": "string" }, "role": { - "description": "Required. Role to apply. Only allowlisted roles can be used at the specified granularity. The role must be one of the following: - 'roles/container.hostServiceAgentUser' applied on the shared VPC host project - 'roles/compute.securityAdmin' applied on the shared VPC host project - 'roles/compute.networkAdmin' applied on the shared VPC host project - 'roles/compute.xpnAdmin' applied on the shared VPC host project - 'roles/dns.admin' applied on the shared VPC host project - 'roles/logging.admin' applied on the shared VPC host project", + "description": "Required. Role to apply. Only allowlisted roles can be used at the specified granularity. The role must be one of the following: - 'roles/container.hostServiceAgentUser' applied on the shared VPC host project - 'roles/compute.securityAdmin' applied on the shared VPC host project - 'roles/compute.networkAdmin' applied on the shared VPC host project - 'roles/tpu.xpnAgent' applied on the shared VPC host project - 'roles/dns.admin' applied on the shared VPC host project - 'roles/logging.admin' applied on the shared VPC host project - 'roles/monitoring.viewer' applied on the shared VPC host project", "type": "string" } }, @@ -2336,6 +2366,10 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "experimentalFeatures": { + "$ref": "ExperimentalFeatures", + "description": "Experimental features to be included during client library generation." } }, "type": "object" diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go index 47a1bff9827..d2f0b2adf3f 100644 --- a/servicenetworking/v1beta/servicenetworking-gen.go +++ b/servicenetworking/v1beta/servicenetworking-gen.go @@ -1537,6 +1537,33 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExperimentalFeatures: Experimental features to be included during client +// library generation. These fields will be deprecated once the feature +// graduates and is enabled by default. +type ExperimentalFeatures struct { + // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if + // `rest` transport is enabled. By default, asynchronous REST clients will not + // be generated. This feature will be enabled by default 1 month after + // launching the feature in preview packages. + RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") 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. "RestAsyncIoEnabled") 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 ExperimentalFeatures) MarshalJSON() ([]byte, error) { + type NoMethod ExperimentalFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -2595,6 +2622,16 @@ type MetricDescriptorMetadata struct { // interval, excluding data loss due to errors. Metrics with a higher // granularity have a smaller sampling period. SamplePeriod string `json:"samplePeriod,omitempty"` + // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the + // metric. + // + // Possible values: + // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this + // default value. + // "PROJECT" - Scopes a metric to a project. + // "ORGANIZATION" - Scopes a metric to an organization. + // "FOLDER" - Scopes a metric to a folder. + TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IngestDelay") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3119,9 +3156,10 @@ type PolicyBinding struct { // 'roles/container.hostServiceAgentUser' applied on the shared VPC host // project - 'roles/compute.securityAdmin' applied on the shared VPC host // project - 'roles/compute.networkAdmin' applied on the shared VPC host - // project - 'roles/compute.xpnAdmin' applied on the shared VPC host project - + // project - 'roles/tpu.xpnAgent' applied on the shared VPC host project - // 'roles/dns.admin' applied on the shared VPC host project - - // 'roles/logging.admin' applied on the shared VPC host project + // 'roles/logging.admin' applied on the shared VPC host project - + // 'roles/monitoring.viewer' applied on the shared VPC host project Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Member") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -3214,6 +3252,9 @@ func (s Publishing) MarshalJSON() ([]byte, error) { type PythonSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // ExperimentalFeatures: Experimental features to be included during client + // library generation. + ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json index 74e89d1c2a2..e6b34e1bdf7 100644 --- a/serviceusage/v1/serviceusage-api.json +++ b/serviceusage/v1/serviceusage-api.json @@ -426,7 +426,7 @@ } } }, - "revision": "20240712", + "revision": "20240811", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -488,6 +488,83 @@ }, "type": "object" }, + "Analysis": { + "description": "A message to group the analysis information.", + "id": "Analysis", + "properties": { + "analysis": { + "$ref": "AnalysisResult", + "description": "Output only. Analysis result of updating a policy.", + "readOnly": true + }, + "analysisType": { + "description": "Output only. The type of analysis.", + "enum": [ + "ANALYSIS_TYPE_UNSPECIFIED", + "ANALYSIS_TYPE_DEPENDENCY", + "ANALYSIS_TYPE_RESOURCE_USAGE" + ], + "enumDescriptions": [ + "Unspecified analysis type. Do not use.", + "The analysis of service dependencies.", + "The analysis of service resource usage." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. The user friendly display name of the analysis type. E.g. service dependency analysis, service resource usage analysis, etc.", + "readOnly": true, + "type": "string" + }, + "service": { + "description": "The names of the service that has analysis result of warnings or blockers. Example: `services/storage.googleapis.com`.", + "type": "string" + } + }, + "type": "object" + }, + "AnalysisResult": { + "description": "An analysis result including blockers and warnings.", + "id": "AnalysisResult", + "properties": { + "blockers": { + "description": "Blocking information that would prevent the policy changes at runtime.", + "items": { + "$ref": "Impact" + }, + "type": "array" + }, + "warnings": { + "description": "Warning information indicating that the policy changes might be unsafe, but will not block the changes at runtime.", + "items": { + "$ref": "Impact" + }, + "type": "array" + } + }, + "type": "object" + }, + "AnalyzeConsumerPolicyMetadata": { + "description": "Metadata for the `AnalyzeConsumerPolicy` method.", + "id": "AnalyzeConsumerPolicyMetadata", + "properties": {}, + "type": "object" + }, + "AnalyzeConsumerPolicyResponse": { + "description": "The response of analyzing a consumer policy update.", + "id": "AnalyzeConsumerPolicyResponse", + "properties": { + "analysis": { + "description": "The list of analyses returned from performing the intended policy update analysis. The analysis is grouped by service name and different analysis types. The empty analysis list means that the consumer policy can be updated without any warnings or blockers.", + "items": { + "$ref": "Analysis" + }, + "type": "array" + } + }, + "type": "object" + }, "Api": { "description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", "id": "Api", @@ -2020,6 +2097,31 @@ }, "type": "object" }, + "Impact": { + "description": "A message to group impacts of updating a policy.", + "id": "Impact", + "properties": { + "detail": { + "description": "Output only. User friendly impact detail in a free form message.", + "readOnly": true, + "type": "string" + }, + "impactType": { + "description": "Output only. The type of impact.", + "enum": [ + "IMPACT_TYPE_UNSPECIFIED", + "DEPENDENCY_MISSING_DEPENDENCIES" + ], + "enumDescriptions": [ + "Reserved Blocks (Block n contains codes from 100n to 100(n+1) -1 Block 0 - Special/Admin codes Block 1 - Impact Type of ANALYSIS_TYPE_DEPENDENCY Block 2 - Impact Type of ANALYSIS_TYPE_RESOURCE_USAGE ...", + "Block 1 - Impact Type of ANALYSIS_TYPE_DEPENDENCY" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ImportAdminOverridesMetadata": { "description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by ImportAdminOverrides.", "id": "ImportAdminOverridesMetadata", diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index 7010ee5af38..8c0bdb5b258 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -269,6 +269,99 @@ func (s AdminQuotaPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Analysis: A message to group the analysis information. +type Analysis struct { + // Analysis: Output only. Analysis result of updating a policy. + Analysis *AnalysisResult `json:"analysis,omitempty"` + // AnalysisType: Output only. The type of analysis. + // + // Possible values: + // "ANALYSIS_TYPE_UNSPECIFIED" - Unspecified analysis type. Do not use. + // "ANALYSIS_TYPE_DEPENDENCY" - The analysis of service dependencies. + // "ANALYSIS_TYPE_RESOURCE_USAGE" - The analysis of service resource usage. + AnalysisType string `json:"analysisType,omitempty"` + // DisplayName: Output only. The user friendly display name of the analysis + // type. E.g. service dependency analysis, service resource usage analysis, + // etc. + DisplayName string `json:"displayName,omitempty"` + // Service: The names of the service that has analysis result of warnings or + // blockers. Example: `services/storage.googleapis.com`. + Service string `json:"service,omitempty"` + // ForceSendFields is a list of field names (e.g. "Analysis") 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. "Analysis") 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 Analysis) MarshalJSON() ([]byte, error) { + type NoMethod Analysis + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AnalysisResult: An analysis result including blockers and warnings. +type AnalysisResult struct { + // Blockers: Blocking information that would prevent the policy changes at + // runtime. + Blockers []*Impact `json:"blockers,omitempty"` + // Warnings: Warning information indicating that the policy changes might be + // unsafe, but will not block the changes at runtime. + Warnings []*Impact `json:"warnings,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blockers") 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. "Blockers") 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 AnalysisResult) MarshalJSON() ([]byte, error) { + type NoMethod AnalysisResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AnalyzeConsumerPolicyMetadata: Metadata for the `AnalyzeConsumerPolicy` +// method. +type AnalyzeConsumerPolicyMetadata struct { +} + +// AnalyzeConsumerPolicyResponse: The response of analyzing a consumer policy +// update. +type AnalyzeConsumerPolicyResponse struct { + // Analysis: The list of analyses returned from performing the intended policy + // update analysis. The analysis is grouped by service name and different + // analysis types. The empty analysis list means that the consumer policy can + // be updated without any warnings or blockers. + Analysis []*Analysis `json:"analysis,omitempty"` + // ForceSendFields is a list of field names (e.g. "Analysis") 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. "Analysis") 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 AnalyzeConsumerPolicyResponse) MarshalJSON() ([]byte, error) { + type NoMethod AnalyzeConsumerPolicyResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Api: Api is a light-weight descriptor for an API Interface. Interfaces are // also described as "protocol buffer services" in some contexts, such as by // the "service" keyword in a .proto file, but they are different from API @@ -2393,6 +2486,38 @@ func (s HttpRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Impact: A message to group impacts of updating a policy. +type Impact struct { + // Detail: Output only. User friendly impact detail in a free form message. + Detail string `json:"detail,omitempty"` + // ImpactType: Output only. The type of impact. + // + // Possible values: + // "IMPACT_TYPE_UNSPECIFIED" - Reserved Blocks (Block n contains codes from + // 100n to 100(n+1) -1 Block 0 - Special/Admin codes Block 1 - Impact Type of + // ANALYSIS_TYPE_DEPENDENCY Block 2 - Impact Type of + // ANALYSIS_TYPE_RESOURCE_USAGE ... + // "DEPENDENCY_MISSING_DEPENDENCIES" - Block 1 - Impact Type of + // ANALYSIS_TYPE_DEPENDENCY + ImpactType string `json:"impactType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Detail") 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. "Detail") 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 Impact) MarshalJSON() ([]byte, error) { + type NoMethod Impact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ImportAdminOverridesMetadata: Metadata message that provides information // such as progress, partial failures, and similar information on each // GetOperation call of LRO returned by ImportAdminOverrides. diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json index 6eb28168259..0d60f34212a 100644 --- a/serviceusage/v1beta1/serviceusage-api.json +++ b/serviceusage/v1beta1/serviceusage-api.json @@ -964,7 +964,7 @@ } } }, - "revision": "20240712", + "revision": "20240811", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -1026,6 +1026,83 @@ }, "type": "object" }, + "Analysis": { + "description": "A message to group the analysis information.", + "id": "Analysis", + "properties": { + "analysis": { + "$ref": "AnalysisResult", + "description": "Output only. Analysis result of updating a policy.", + "readOnly": true + }, + "analysisType": { + "description": "Output only. The type of analysis.", + "enum": [ + "ANALYSIS_TYPE_UNSPECIFIED", + "ANALYSIS_TYPE_DEPENDENCY", + "ANALYSIS_TYPE_RESOURCE_USAGE" + ], + "enumDescriptions": [ + "Unspecified analysis type. Do not use.", + "The analysis of service dependencies.", + "The analysis of service resource usage." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. The user friendly display name of the analysis type. E.g. service dependency analysis, service resource usage analysis, etc.", + "readOnly": true, + "type": "string" + }, + "service": { + "description": "The names of the service that has analysis result of warnings or blockers. Example: `services/storage.googleapis.com`.", + "type": "string" + } + }, + "type": "object" + }, + "AnalysisResult": { + "description": "An analysis result including blockers and warnings.", + "id": "AnalysisResult", + "properties": { + "blockers": { + "description": "Blocking information that would prevent the policy changes at runtime.", + "items": { + "$ref": "Impact" + }, + "type": "array" + }, + "warnings": { + "description": "Warning information indicating that the policy changes might be unsafe, but will not block the changes at runtime.", + "items": { + "$ref": "Impact" + }, + "type": "array" + } + }, + "type": "object" + }, + "AnalyzeConsumerPolicyMetadata": { + "description": "Metadata for the `AnalyzeConsumerPolicy` method.", + "id": "AnalyzeConsumerPolicyMetadata", + "properties": {}, + "type": "object" + }, + "AnalyzeConsumerPolicyResponse": { + "description": "The response of analyzing a consumer policy update.", + "id": "AnalyzeConsumerPolicyResponse", + "properties": { + "analysis": { + "description": "The list of analyses returned from performing the intended policy update analysis. The analysis is grouped by service name and different analysis types. The empty analysis list means that the consumer policy can be updated without any warnings or blockers.", + "items": { + "$ref": "Analysis" + }, + "type": "array" + } + }, + "type": "object" + }, "Api": { "description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", "id": "Api", @@ -2597,6 +2674,31 @@ }, "type": "object" }, + "Impact": { + "description": "A message to group impacts of updating a policy.", + "id": "Impact", + "properties": { + "detail": { + "description": "Output only. User friendly impact detail in a free form message.", + "readOnly": true, + "type": "string" + }, + "impactType": { + "description": "Output only. The type of impact.", + "enum": [ + "IMPACT_TYPE_UNSPECIFIED", + "DEPENDENCY_MISSING_DEPENDENCIES" + ], + "enumDescriptions": [ + "Reserved Blocks (Block n contains codes from 100n to 100(n+1) -1 Block 0 - Special/Admin codes Block 1 - Impact Type of ANALYSIS_TYPE_DEPENDENCY Block 2 - Impact Type of ANALYSIS_TYPE_RESOURCE_USAGE ...", + "Block 1 - Impact Type of ANALYSIS_TYPE_DEPENDENCY" + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ImportAdminOverridesMetadata": { "description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by ImportAdminOverrides.", "id": "ImportAdminOverridesMetadata", diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index 32fe10cf515..dee89abafd2 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -317,6 +317,99 @@ func (s AdminQuotaPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Analysis: A message to group the analysis information. +type Analysis struct { + // Analysis: Output only. Analysis result of updating a policy. + Analysis *AnalysisResult `json:"analysis,omitempty"` + // AnalysisType: Output only. The type of analysis. + // + // Possible values: + // "ANALYSIS_TYPE_UNSPECIFIED" - Unspecified analysis type. Do not use. + // "ANALYSIS_TYPE_DEPENDENCY" - The analysis of service dependencies. + // "ANALYSIS_TYPE_RESOURCE_USAGE" - The analysis of service resource usage. + AnalysisType string `json:"analysisType,omitempty"` + // DisplayName: Output only. The user friendly display name of the analysis + // type. E.g. service dependency analysis, service resource usage analysis, + // etc. + DisplayName string `json:"displayName,omitempty"` + // Service: The names of the service that has analysis result of warnings or + // blockers. Example: `services/storage.googleapis.com`. + Service string `json:"service,omitempty"` + // ForceSendFields is a list of field names (e.g. "Analysis") 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. "Analysis") 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 Analysis) MarshalJSON() ([]byte, error) { + type NoMethod Analysis + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AnalysisResult: An analysis result including blockers and warnings. +type AnalysisResult struct { + // Blockers: Blocking information that would prevent the policy changes at + // runtime. + Blockers []*Impact `json:"blockers,omitempty"` + // Warnings: Warning information indicating that the policy changes might be + // unsafe, but will not block the changes at runtime. + Warnings []*Impact `json:"warnings,omitempty"` + // ForceSendFields is a list of field names (e.g. "Blockers") 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. "Blockers") 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 AnalysisResult) MarshalJSON() ([]byte, error) { + type NoMethod AnalysisResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AnalyzeConsumerPolicyMetadata: Metadata for the `AnalyzeConsumerPolicy` +// method. +type AnalyzeConsumerPolicyMetadata struct { +} + +// AnalyzeConsumerPolicyResponse: The response of analyzing a consumer policy +// update. +type AnalyzeConsumerPolicyResponse struct { + // Analysis: The list of analyses returned from performing the intended policy + // update analysis. The analysis is grouped by service name and different + // analysis types. The empty analysis list means that the consumer policy can + // be updated without any warnings or blockers. + Analysis []*Analysis `json:"analysis,omitempty"` + // ForceSendFields is a list of field names (e.g. "Analysis") 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. "Analysis") 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 AnalyzeConsumerPolicyResponse) MarshalJSON() ([]byte, error) { + type NoMethod AnalyzeConsumerPolicyResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Api: Api is a light-weight descriptor for an API Interface. Interfaces are // also described as "protocol buffer services" in some contexts, such as by // the "service" keyword in a .proto file, but they are different from API @@ -2469,6 +2562,38 @@ func (s HttpRule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Impact: A message to group impacts of updating a policy. +type Impact struct { + // Detail: Output only. User friendly impact detail in a free form message. + Detail string `json:"detail,omitempty"` + // ImpactType: Output only. The type of impact. + // + // Possible values: + // "IMPACT_TYPE_UNSPECIFIED" - Reserved Blocks (Block n contains codes from + // 100n to 100(n+1) -1 Block 0 - Special/Admin codes Block 1 - Impact Type of + // ANALYSIS_TYPE_DEPENDENCY Block 2 - Impact Type of + // ANALYSIS_TYPE_RESOURCE_USAGE ... + // "DEPENDENCY_MISSING_DEPENDENCIES" - Block 1 - Impact Type of + // ANALYSIS_TYPE_DEPENDENCY + ImpactType string `json:"impactType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Detail") 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. "Detail") 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 Impact) MarshalJSON() ([]byte, error) { + type NoMethod Impact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ImportAdminOverridesMetadata: Metadata message that provides information // such as progress, partial failures, and similar information on each // GetOperation call of LRO returned by ImportAdminOverrides. diff --git a/solar/v1/solar-api.json b/solar/v1/solar-api.json index 207a4c5827d..66406cf9b50 100644 --- a/solar/v1/solar-api.json +++ b/solar/v1/solar-api.json @@ -114,6 +114,20 @@ "id": "solar.buildingInsights.findClosest", "parameterOrder": [], "parameters": { + "experiments": { + "description": "Optional. Specifies the pre-GA features to enable.", + "enum": [ + "EXPERIMENT_UNSPECIFIED", + "EXPANDED_COVERAGE" + ], + "enumDescriptions": [ + "No experiments are specified.", + "Expands the geographic region available for querying solar data." + ], + "location": "query", + "repeated": true, + "type": "string" + }, "location.latitude": { "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", "format": "double", @@ -132,12 +146,14 @@ "IMAGERY_QUALITY_UNSPECIFIED", "HIGH", "MEDIUM", - "LOW" + "LOW", + "BASE" ], "enumDescriptions": [ "No quality is known.", "Solar data is derived from aerial imagery captured at low-altitude and processed at 0.1 m/pixel.", "Solar data is derived from enhanced aerial imagery captured at high-altitude and processed at 0.25 m/pixel.", + "Solar data is derived from enhanced satellite imagery processed at 0.25 m/pixel.", "Solar data is derived from enhanced satellite imagery processed at 0.25 m/pixel." ], "location": "query", @@ -168,6 +184,20 @@ "location": "query", "type": "boolean" }, + "experiments": { + "description": "Optional. Specifies the pre-GA experiments to enable.", + "enum": [ + "EXPERIMENT_UNSPECIFIED", + "EXPANDED_COVERAGE" + ], + "enumDescriptions": [ + "No experiments are specified.", + "Expands the geographic region available for querying solar data." + ], + "location": "query", + "repeated": true, + "type": "string" + }, "location.latitude": { "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", "format": "double", @@ -198,12 +228,14 @@ "IMAGERY_QUALITY_UNSPECIFIED", "HIGH", "MEDIUM", - "LOW" + "LOW", + "BASE" ], "enumDescriptions": [ "No quality is known.", "Solar data is derived from aerial imagery captured at low-altitude and processed at 0.1 m/pixel.", "Solar data is derived from enhanced aerial imagery captured at high-altitude and processed at 0.25 m/pixel.", + "Solar data is derived from enhanced satellite imagery processed at 0.25 m/pixel.", "Solar data is derived from enhanced satellite imagery processed at 0.25 m/pixel." ], "location": "query", @@ -267,7 +299,7 @@ } } }, - "revision": "20240630", + "revision": "20240820", "rootUrl": "https://solar.googleapis.com/", "schemas": { "BuildingInsights": { @@ -300,12 +332,14 @@ "IMAGERY_QUALITY_UNSPECIFIED", "HIGH", "MEDIUM", - "LOW" + "LOW", + "BASE" ], "enumDescriptions": [ "No quality is known.", "Solar data is derived from aerial imagery captured at low-altitude and processed at 0.1 m/pixel.", "Solar data is derived from enhanced aerial imagery captured at high-altitude and processed at 0.25 m/pixel.", + "Solar data is derived from enhanced satellite imagery processed at 0.25 m/pixel.", "Solar data is derived from enhanced satellite imagery processed at 0.25 m/pixel." ], "type": "string" @@ -394,12 +428,14 @@ "IMAGERY_QUALITY_UNSPECIFIED", "HIGH", "MEDIUM", - "LOW" + "LOW", + "BASE" ], "enumDescriptions": [ "No quality is known.", "Solar data is derived from aerial imagery captured at low-altitude and processed at 0.1 m/pixel.", "Solar data is derived from enhanced aerial imagery captured at high-altitude and processed at 0.25 m/pixel.", + "Solar data is derived from enhanced satellite imagery processed at 0.25 m/pixel.", "Solar data is derived from enhanced satellite imagery processed at 0.25 m/pixel." ], "type": "string" diff --git a/solar/v1/solar-gen.go b/solar/v1/solar-gen.go index bcfdec3baab..de20ebe0340 100644 --- a/solar/v1/solar-gen.go +++ b/solar/v1/solar-gen.go @@ -215,6 +215,8 @@ type BuildingInsights struct { // high-altitude and processed at 0.25 m/pixel. // "LOW" - Solar data is derived from enhanced satellite imagery processed at // 0.25 m/pixel. + // "BASE" - Solar data is derived from enhanced satellite imagery processed + // at 0.25 m/pixel. ImageryQuality string `json:"imageryQuality,omitempty"` // Name: The resource name for the building, of the format `building/`. Name string `json:"name,omitempty"` @@ -359,6 +361,8 @@ type DataLayers struct { // high-altitude and processed at 0.25 m/pixel. // "LOW" - Solar data is derived from enhanced satellite imagery processed at // 0.25 m/pixel. + // "BASE" - Solar data is derived from enhanced satellite imagery processed + // at 0.25 m/pixel. ImageryQuality string `json:"imageryQuality,omitempty"` // MaskUrl: The URL for the building mask image: one bit per pixel saying // whether that pixel is considered to be part of a rooftop or not. @@ -1210,6 +1214,20 @@ func (r *BuildingInsightsService) FindClosest() *BuildingInsightsFindClosestCall return c } +// Experiments sets the optional parameter "experiments": Specifies the pre-GA +// features to enable. +// +// Possible values: +// +// "EXPERIMENT_UNSPECIFIED" - No experiments are specified. +// "EXPANDED_COVERAGE" - Expands the geographic region available for querying +// +// solar data. +func (c *BuildingInsightsFindClosestCall) Experiments(experiments ...string) *BuildingInsightsFindClosestCall { + c.urlParams_.SetMulti("experiments", append([]string{}, experiments...)) + return c +} + // LocationLatitude sets the optional parameter "location.latitude": The // latitude in degrees. It must be in the range [-90.0, +90.0]. func (c *BuildingInsightsFindClosestCall) LocationLatitude(locationLatitude float64) *BuildingInsightsFindClosestCall { @@ -1243,6 +1261,10 @@ func (c *BuildingInsightsFindClosestCall) LocationLongitude(locationLongitude fl // "LOW" - Solar data is derived from enhanced satellite imagery processed at // // 0.25 m/pixel. +// +// "BASE" - Solar data is derived from enhanced satellite imagery processed +// +// at 0.25 m/pixel. func (c *BuildingInsightsFindClosestCall) RequiredQuality(requiredQuality string) *BuildingInsightsFindClosestCall { c.urlParams_.Set("requiredQuality", requiredQuality) return c @@ -1362,6 +1384,20 @@ func (c *DataLayersGetCall) ExactQualityRequired(exactQualityRequired bool) *Dat return c } +// Experiments sets the optional parameter "experiments": Specifies the pre-GA +// experiments to enable. +// +// Possible values: +// +// "EXPERIMENT_UNSPECIFIED" - No experiments are specified. +// "EXPANDED_COVERAGE" - Expands the geographic region available for querying +// +// solar data. +func (c *DataLayersGetCall) Experiments(experiments ...string) *DataLayersGetCall { + c.urlParams_.SetMulti("experiments", append([]string{}, experiments...)) + return c +} + // LocationLatitude sets the optional parameter "location.latitude": The // latitude in degrees. It must be in the range [-90.0, +90.0]. func (c *DataLayersGetCall) LocationLatitude(locationLatitude float64) *DataLayersGetCall { @@ -1420,6 +1456,10 @@ func (c *DataLayersGetCall) RadiusMeters(radiusMeters float64) *DataLayersGetCal // "LOW" - Solar data is derived from enhanced satellite imagery processed at // // 0.25 m/pixel. +// +// "BASE" - Solar data is derived from enhanced satellite imagery processed +// +// at 0.25 m/pixel. func (c *DataLayersGetCall) RequiredQuality(requiredQuality string) *DataLayersGetCall { c.urlParams_.Set("requiredQuality", requiredQuality) return c diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index 6669f96f8e0..e1852a77879 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -26,6 +26,11 @@ "description": "Regional Endpoint", "endpointUrl": "https://spanner.me-central2.rep.googleapis.com/", "location": "me-central2" + }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://spanner.us-west1.rep.googleapis.com/", + "location": "us-west1" } ], "fullyEncodeReservedExpansion": true, @@ -169,7 +174,7 @@ "instanceConfigs": { "methods": { "create": { - "description": "Creates an instance configuration and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The instance configuration name is assigned by the caller. If the named instance configuration already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the request returns: * The instance configuration is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is `CREATING`. While the operation is pending: * Cancelling the operation renders the instance configuration immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance config's reconciling field becomes false. Its state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance config. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.create` permission on the resource parent.", + "description": "Creates an instance configuration and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance configuration. The instance configuration name is assigned by the caller. If the named instance configuration already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the request returns: * The instance configuration is readable via the API, with all requested attributes. The instance configuration's reconciling field is set to true. Its state is `CREATING`. While the operation is pending: * Cancelling the operation renders the instance configuration immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the instance configuration are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance configuration's reconciling field becomes false. Its state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance configuration. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.create` permission on the resource parent.", "flatPath": "v1/projects/{projectsId}/instanceConfigs", "httpMethod": "POST", "id": "spanner.projects.instanceConfigs.create", @@ -178,7 +183,7 @@ ], "parameters": { "parent": { - "description": "Required. The name of the project in which to create the instance config. Values are of the form `projects/`.", + "description": "Required. The name of the project in which to create the instance configuration. Values are of the form `projects/`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -198,7 +203,7 @@ ] }, "delete": { - "description": "Deletes the instance config. Deletion is only allowed when no instances are using the configuration. If any instances are using the config, returns `FAILED_PRECONDITION`. Only user-managed configurations can be deleted. Authorization requires `spanner.instanceConfigs.delete` permission on the resource name.", + "description": "Deletes the instance configuration. Deletion is only allowed when no instances are using the configuration. If any instances are using the configuration, returns `FAILED_PRECONDITION`. Only user-managed configurations can be deleted. Authorization requires `spanner.instanceConfigs.delete` permission on the resource name.", "flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}", "httpMethod": "DELETE", "id": "spanner.projects.instanceConfigs.delete", @@ -207,7 +212,7 @@ ], "parameters": { "etag": { - "description": "Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance configuration from overwriting each other. If not empty, the API only deletes the instance configuration when the etag provided matches the current status of the requested instance config. Otherwise, deletes the instance configuration without checking the current status of the requested instance config.", + "description": "Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance configuration from overwriting each other. If not empty, the API only deletes the instance configuration when the etag provided matches the current status of the requested instance configuration. Otherwise, deletes the instance configuration without checking the current status of the requested instance configuration.", "location": "query", "type": "string" }, @@ -297,7 +302,7 @@ ] }, "patch": { - "description": "Updates an instance config. The returned long-running operation can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns `NOT_FOUND`. Only user-managed configurations can be updated. Immediately after the request returns: * The instance config's reconciling field is set to true. While the operation is pending: * Cancelling the operation sets its metadata's cancel_time. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance configuration are rejected. * Reading the instance configuration via the API continues to give the pre-request values. Upon completion of the returned operation: * Creating instances using the instance configuration uses the new values. * The instance config's new values are readable via the API. * The instance config's reconciling field becomes false. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance configuration modification. The metadata field type is UpdateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.update` permission on the resource name.", + "description": "Updates an instance configuration. The returned long-running operation can be used to track the progress of updating the instance. If the named instance configuration does not exist, returns `NOT_FOUND`. Only user-managed configurations can be updated. Immediately after the request returns: * The instance configuration's reconciling field is set to true. While the operation is pending: * Cancelling the operation sets its metadata's cancel_time. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance configuration are rejected. * Reading the instance configuration via the API continues to give the pre-request values. Upon completion of the returned operation: * Creating instances using the instance configuration uses the new values. * The new values of the instance configuration are readable via the API. * The instance configuration's reconciling field becomes false. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance configuration modification. The metadata field type is UpdateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.update` permission on the resource name.", "flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}", "httpMethod": "PATCH", "id": "spanner.projects.instanceConfigs.patch", @@ -748,7 +753,7 @@ ] }, "move": { - "description": "Moves the instance to the target instance config. The returned long-running operation can be used to track the progress of moving the instance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following criteria: * Has an ongoing move to a different instance config * Has backups * Has an ongoing update * Is under free trial * Contains any CMEK-enabled databases While the operation is pending: * All other attempts to modify the instance, including changes to its compute capacity, are rejected. * The following database and backup admin operations are rejected: * DatabaseAdmin.CreateDatabase, * DatabaseAdmin.UpdateDatabaseDdl (Disabled if default_leader is specified in the request.) * DatabaseAdmin.RestoreDatabase * DatabaseAdmin.CreateBackup * DatabaseAdmin.CopyBackup * Both the source and target instance configurations are subject to hourly compute and storage charges. * The instance may experience higher read-write latencies and a higher transaction abort rate. However, moving an instance does not cause any downtime. The returned long-running operation will have a name of the format `/operations/` and can be used to track the move instance operation. The metadata field type is MoveInstanceMetadata. The response field type is Instance, if successful. Cancelling the operation sets its metadata's cancel_time. Cancellation is not immediate since it involves moving any data previously moved to target instance configuration back to the original instance config. The same operation can be used to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with `CANCELLED` status. Upon completion(if not cancelled) of the returned operation: * Instance would be successfully moved to the target instance config. * You are billed for compute and storage in target instance config. Authorization requires `spanner.instances.update` permission on the resource instance. For more details, please see [documentation](https://cloud.google.com/spanner/docs/move-instance).", + "description": "Moves an instance to the target instance configuration. You can use the returned long-running operation to track the progress of moving the instance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following criteria: * Is undergoing a move to a different instance configuration * Has backups * Has an ongoing update * Contains any CMEK-enabled databases * Is a free trial instance While the operation is pending: * All other attempts to modify the instance, including changes to its compute capacity, are rejected. * The following database and backup admin operations are rejected: * `DatabaseAdmin.CreateDatabase` * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is specified in the request.) * `DatabaseAdmin.RestoreDatabase` * `DatabaseAdmin.CreateBackup` * `DatabaseAdmin.CopyBackup` * Both the source and target instance configurations are subject to hourly compute and storage charges. * The instance might experience higher read-write latencies and a higher transaction abort rate. However, moving an instance doesn't cause any downtime. The returned long-running operation has a name of the format `/operations/` and can be used to track the move instance operation. The metadata field type is MoveInstanceMetadata. The response field type is Instance, if successful. Cancelling the operation sets its metadata's cancel_time. Cancellation is not immediate because it involves moving any data previously moved to the target instance configuration back to the original instance configuration. You can use this operation to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with `CANCELLED` status. If not cancelled, upon completion of the returned operation: * The instance successfully moves to the target instance configuration. * You are billed for compute and storage in target instance configuration. Authorization requires the `spanner.instances.update` permission on the resource instance. For more details, see [Move an instance](https://cloud.google.com/spanner/docs/move-instance).", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:move", "httpMethod": "POST", "id": "spanner.projects.instances.move", @@ -1095,7 +1100,7 @@ ], "parameters": { "filter": { - "description": "An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: * `name` * `database` * `state` * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup's name contains the string \"howl\". * `database:prod` - The database's name contains the string \"prod\". * `state:CREATING` - The backup is pending creation. * `state:READY` - The backup is fully created and ready for use. * `(name:howl) AND (create_time \u003c \\\"2018-03-28T14:50:00Z\\\")` - The backup name contains the string \"howl\" and `create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time \u003c \\\"2018-03-28T14:50:00Z\\\"` - The backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes \u003e 10000000000` - The backup's size is greater than 10GB", + "description": "An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: * `name` * `database` * `state` * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` * `backup_schedules` You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup's name contains the string \"howl\". * `database:prod` - The database's name contains the string \"prod\". * `state:CREATING` - The backup is pending creation. * `state:READY` - The backup is fully created and ready for use. * `(name:howl) AND (create_time \u003c \\\"2018-03-28T14:50:00Z\\\")` - The backup name contains the string \"howl\" and `create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time \u003c \\\"2018-03-28T14:50:00Z\\\"` - The backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes \u003e 10000000000` - The backup's size is greater than 10GB * `backup_schedules:daily` - The backup is created from a schedule with \"daily\" in its name.", "location": "query", "type": "string" }, @@ -3254,7 +3259,7 @@ } } }, - "revision": "20240731", + "revision": "20240814", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "AutoscalingConfig": { @@ -3366,11 +3371,28 @@ "readOnly": true, "type": "array" }, + "exclusiveSizeBytes": { + "description": "Output only. For a backup in an incremental backup chain, this is the storage space needed to keep the data that has changed since the previous backup. For all other backups, this is always the size of the backup. This value may change if backups on the same chain get deleted or expired. This field can be used to calculate the total storage space used by a set of backups. For example, the total space used by all backups of a database can be computed by summing up this field.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "expireTime": { "description": "Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.", "format": "google-datetime", "type": "string" }, + "freeableSizeBytes": { + "description": "Output only. The number of bytes that will be freed by deleting this backup. This value will be zero if, for example, this backup is part of an incremental backup chain and younger backups in the chain require that we keep its data. For backups not in an incremental backup chain, this is always the size of the backup. This value may change if backups on the same chain get created, deleted or expired.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "incrementalBackupChainId": { + "description": "Output only. Populated only for backups in an incremental backup chain. Backups share the same chain id if and only if they belong to the same incremental backup chain. Use this field to determine which backups are part of the same incremental backup chain. The ordering of backups in the chain can be determined by ordering the backup `version_time`.", + "readOnly": true, + "type": "string" + }, "maxExpireTime": { "description": "Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup's expiration time can be configured in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing backup, the expiration time specified must be less than `Backup.max_expire_time`.", "format": "google-datetime", @@ -3381,6 +3403,12 @@ "description": "Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.", "type": "string" }, + "oldestVersionTime": { + "description": "Output only. Data deleted at a time older than this is guaranteed not to be retained in order to support this backup. For a backup in an incremental backup chain, this is the version time of the oldest backup that exists or ever existed in the chain. For all other backups, this is the version time of the backup. This field can be used to understand what data is being retained by the backup system.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, "referencingBackups": { "description": "Output only. The names of the destination backups being created by copying this source backup. The backup names are of the form `projects//instances//backups/`. Referencing backups may exist in different instances. The existence of any referencing backup prevents the backup from being deleted. When the copy operation is done (either successfully completed or cancelled or the destination backup is deleted), the reference to the backup is removed.", "items": { @@ -3398,7 +3426,7 @@ "type": "array" }, "sizeBytes": { - "description": "Output only. Size of the backup in bytes.", + "description": "Output only. Size of the backup in bytes. For a backup in an incremental backup chain, this is the sum of the `exclusive_size_bytes` of itself and all older backups in the chain.", "format": "int64", "readOnly": true, "type": "string" @@ -3463,6 +3491,10 @@ "$ref": "FullBackupSpec", "description": "The schedule creates only full backups." }, + "incrementalBackupSpec": { + "$ref": "IncrementalBackupSpec", + "description": "The schedule creates incremental backup chains." + }, "name": { "description": "Identifier. Output only for the CreateBackupSchedule operation. Required for the UpdateBackupSchedule operation. A globally unique identifier for the backup schedule which cannot be changed. Values are of the form `projects//instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length.", "type": "string" @@ -3989,7 +4021,7 @@ "properties": { "instanceConfig": { "$ref": "InstanceConfig", - "description": "Required. The InstanceConfig proto of the configuration to create. instance_config.name must be `/instanceConfigs/`. instance_config.base_config must be a Google-managed configuration name, e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3." + "description": "Required. The `InstanceConfig` proto of the configuration to create. `instance_config.name` must be `/instanceConfigs/`. `instance_config.base_config` must be a Google-managed configuration name, e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3." }, "instanceConfigId": { "description": "Required. The ID of the instance configuration to create. Valid identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-` prefix is required to avoid name conflicts with Google-managed configurations.", @@ -4680,6 +4712,12 @@ }, "type": "object" }, + "IncrementalBackupSpec": { + "description": "The specification for incremental backup chains. An incremental backup stores the delta of changes between a previous backup and the database contents at a given version time. An incremental backup chain consists of a full backup and zero or more successive incremental backups. The first backup created for an incremental backup chain is always a full backup.", + "id": "IncrementalBackupSpec", + "properties": {}, + "type": "object" + }, "IndexAdvice": { "description": "Recommendation to add new indexes to run queries more efficiently.", "id": "IndexAdvice", @@ -4750,6 +4788,22 @@ "description": "Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.", "type": "string" }, + "edition": { + "description": "Optional. The `Edition` of the current instance.", + "enum": [ + "EDITION_UNSPECIFIED", + "STANDARD", + "ENTERPRISE", + "ENTERPRISE_PLUS" + ], + "enumDescriptions": [ + "Edition not specified.", + "Standard edition.", + "Enterprise edition.", + "Enterprise Plus edition." + ], + "type": "string" + }, "endpointUris": { "description": "Deprecated. This field is not populated.", "items": { @@ -4787,12 +4841,12 @@ "type": "string" }, "nodeCount": { - "description": "The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the node_count field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, node_count is treated as an OUTPUT_ONLY field and reflects the current number of nodes allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes, and processing units](https://cloud.google.com/spanner/docs/compute-capacity).", + "description": "The number of nodes allocated to this instance. At most, one of either `node_count` or `processing_units` should be present in the message. Users can set the `node_count` field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` field and reflects the current number of nodes allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes, and processing units](https://cloud.google.com/spanner/docs/compute-capacity).", "format": "int32", "type": "integer" }, "processingUnits": { - "description": "The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and reflects the current number of processing units allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units.", + "description": "The number of processing units allocated to this instance. At most, one of either `processing_units` or `node_count` should be present in the message. Users can set the `processing_units` field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and reflects the current number of processing units allocated to the instance. This might be zero in API responses for instances that are not yet in the `READY` state. For more information, see [Compute capacity, nodes and processing units](https://cloud.google.com/spanner/docs/compute-capacity).", "format": "int32", "type": "integer" }, @@ -4829,7 +4883,7 @@ "type": "string" }, "configType": { - "description": "Output only. Whether this instance configuration is a Google- or user-managed configuration.", + "description": "Output only. Whether this instance configuration is a Google-managed or user-managed configuration.", "enum": [ "TYPE_UNSPECIFIED", "GOOGLE_MANAGED", @@ -4852,7 +4906,7 @@ "type": "string" }, "freeInstanceAvailability": { - "description": "Output only. Describes whether free instances are available to be created in this instance config.", + "description": "Output only. Describes whether free instances are available to be created in this instance configuration.", "enum": [ "FREE_INSTANCE_AVAILABILITY_UNSPECIFIED", "AVAILABLE", @@ -4862,9 +4916,9 @@ ], "enumDescriptions": [ "Not specified.", - "Indicates that free instances are available to be created in this instance config.", - "Indicates that free instances are not supported in this instance config.", - "Indicates that free instances are currently not available to be created in this instance config.", + "Indicates that free instances are available to be created in this instance configuration.", + "Indicates that free instances are not supported in this instance configuration.", + "Indicates that free instances are currently not available to be created in this instance configuration.", "Indicates that additional free instances cannot be created in this instance configuration because the project has reached its limit of free instances." ], "readOnly": true, @@ -4914,7 +4968,7 @@ "type": "string" }, "reconciling": { - "description": "Output only. If true, the instance configuration is being created or updated. If false, there are no ongoing operations for the instance config.", + "description": "Output only. If true, the instance configuration is being created or updated. If false, there are no ongoing operations for the instance configuration.", "readOnly": true, "type": "boolean" }, @@ -5298,7 +5352,7 @@ "type": "string" }, "operations": { - "description": "The list of matching instance configuration long-running operations. Each operation's name will be prefixed by the instance config's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata.", + "description": "The list of matching instance configuration long-running operations. Each operation's name will be prefixed by the name of the instance configuration. The operation's metadata field type `metadata.type_url` describes the type of the metadata.", "items": { "$ref": "Operation" }, @@ -5582,7 +5636,7 @@ "id": "MoveInstanceRequest", "properties": { "targetConfig": { - "description": "Required. The target instance configuration for the instance to move. Values are of the form `projects//instanceConfigs/`.", + "description": "Required. The target instance configuration where to move the instance. Values are of the form `projects//instanceConfigs/`.", "type": "string" } }, diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 1f91797c0a5..531974cda26 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -549,12 +549,34 @@ type Backup struct { // restored. If a key version is revoked in the middle of a restore, the // restore behavior is undefined. EncryptionInformation []*EncryptionInfo `json:"encryptionInformation,omitempty"` + // ExclusiveSizeBytes: Output only. For a backup in an incremental backup + // chain, this is the storage space needed to keep the data that has changed + // since the previous backup. For all other backups, this is always the size of + // the backup. This value may change if backups on the same chain get deleted + // or expired. This field can be used to calculate the total storage space used + // by a set of backups. For example, the total space used by all backups of a + // database can be computed by summing up this field. + ExclusiveSizeBytes int64 `json:"exclusiveSizeBytes,omitempty,string"` // ExpireTime: Required for the CreateBackup operation. The expiration time of // the backup, with microseconds granularity that must be at least 6 hours and // at most 366 days from the time the CreateBackup request is processed. Once // the `expire_time` has passed, the backup is eligible to be automatically // deleted by Cloud Spanner to free the resources used by the backup. ExpireTime string `json:"expireTime,omitempty"` + // FreeableSizeBytes: Output only. The number of bytes that will be freed by + // deleting this backup. This value will be zero if, for example, this backup + // is part of an incremental backup chain and younger backups in the chain + // require that we keep its data. For backups not in an incremental backup + // chain, this is always the size of the backup. This value may change if + // backups on the same chain get created, deleted or expired. + FreeableSizeBytes int64 `json:"freeableSizeBytes,omitempty,string"` + // IncrementalBackupChainId: Output only. Populated only for backups in an + // incremental backup chain. Backups share the same chain id if and only if + // they belong to the same incremental backup chain. Use this field to + // determine which backups are part of the same incremental backup chain. The + // ordering of backups in the chain can be determined by ordering the backup + // `version_time`. + IncrementalBackupChainId string `json:"incrementalBackupChainId,omitempty"` // MaxExpireTime: Output only. The max allowed expiration time of the backup, // with microseconds granularity. A backup's expiration time can be configured // in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or @@ -570,6 +592,13 @@ type Backup struct { // containing the backup, identified by the prefix of the backup name of the // form `projects//instances/`. Name string `json:"name,omitempty"` + // OldestVersionTime: Output only. Data deleted at a time older than this is + // guaranteed not to be retained in order to support this backup. For a backup + // in an incremental backup chain, this is the version time of the oldest + // backup that exists or ever existed in the chain. For all other backups, this + // is the version time of the backup. This field can be used to understand what + // data is being retained by the backup system. + OldestVersionTime string `json:"oldestVersionTime,omitempty"` // ReferencingBackups: Output only. The names of the destination backups being // created by copying this source backup. The backup names are of the form // `projects//instances//backups/`. Referencing backups may exist in different @@ -585,7 +614,9 @@ type Backup struct { // backup from being deleted. When a restored database from the backup enters // the `READY` state, the reference to the backup is removed. ReferencingDatabases []string `json:"referencingDatabases,omitempty"` - // SizeBytes: Output only. Size of the backup in bytes. + // SizeBytes: Output only. Size of the backup in bytes. For a backup in an + // incremental backup chain, this is the sum of the `exclusive_size_bytes` of + // itself and all older backups in the chain. SizeBytes int64 `json:"sizeBytes,omitempty,string"` // State: Output only. The current state of the backup. // @@ -661,6 +692,8 @@ type BackupSchedule struct { EncryptionConfig *CreateBackupEncryptionConfig `json:"encryptionConfig,omitempty"` // FullBackupSpec: The schedule creates only full backups. FullBackupSpec *FullBackupSpec `json:"fullBackupSpec,omitempty"` + // IncrementalBackupSpec: The schedule creates incremental backup chains. + IncrementalBackupSpec *IncrementalBackupSpec `json:"incrementalBackupSpec,omitempty"` // Name: Identifier. Output only for the CreateBackupSchedule operation. // Required for the UpdateBackupSchedule operation. A globally unique // identifier for the backup schedule which cannot be changed. Values are of @@ -1540,9 +1573,9 @@ func (s CreateInstanceConfigMetadata) MarshalJSON() ([]byte, error) { // CreateInstanceConfigRequest: The request for CreateInstanceConfigRequest. type CreateInstanceConfigRequest struct { - // InstanceConfig: Required. The InstanceConfig proto of the configuration to - // create. instance_config.name must be `/instanceConfigs/`. - // instance_config.base_config must be a Google-managed configuration name, + // InstanceConfig: Required. The `InstanceConfig` proto of the configuration to + // create. `instance_config.name` must be `/instanceConfigs/`. + // `instance_config.base_config` must be a Google-managed configuration name, // e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. InstanceConfig *InstanceConfig `json:"instanceConfig,omitempty"` // InstanceConfigId: Required. The ID of the instance configuration to create. @@ -2580,6 +2613,15 @@ func (s IncludeReplicas) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// IncrementalBackupSpec: The specification for incremental backup chains. An +// incremental backup stores the delta of changes between a previous backup and +// the database contents at a given version time. An incremental backup chain +// consists of a full backup and zero or more successive incremental backups. +// The first backup created for an incremental backup chain is always a full +// backup. +type IncrementalBackupSpec struct { +} + // IndexAdvice: Recommendation to add new indexes to run queries more // efficiently. type IndexAdvice struct { @@ -2690,6 +2732,14 @@ type Instance struct { // in UIs. Must be unique per project and between 4 and 30 characters in // length. DisplayName string `json:"displayName,omitempty"` + // Edition: Optional. The `Edition` of the current instance. + // + // Possible values: + // "EDITION_UNSPECIFIED" - Edition not specified. + // "STANDARD" - Standard edition. + // "ENTERPRISE" - Enterprise edition. + // "ENTERPRISE_PLUS" - Enterprise Plus edition. + Edition string `json:"edition,omitempty"` // EndpointUris: Deprecated. This field is not populated. EndpointUris []string `json:"endpointUris,omitempty"` // FreeInstanceMetadata: Free instance metadata. Only populated for free @@ -2729,12 +2779,12 @@ type Instance struct { Name string `json:"name,omitempty"` // NodeCount: The number of nodes allocated to this instance. At most, one of // either `node_count` or `processing_units` should be present in the message. - // Users can set the node_count field to specify the target number of nodes - // allocated to the instance. If autoscaling is enabled, node_count is treated - // as an OUTPUT_ONLY field and reflects the current number of nodes allocated - // to the instance. This might be zero in API responses for instances that are - // not yet in the `READY` state. For more information, see Compute capacity, - // nodes, and processing units + // Users can set the `node_count` field to specify the target number of nodes + // allocated to the instance. If autoscaling is enabled, `node_count` is + // treated as an `OUTPUT_ONLY` field and reflects the current number of nodes + // allocated to the instance. This might be zero in API responses for instances + // that are not yet in the `READY` state. For more information, see Compute + // capacity, nodes, and processing units // (https://cloud.google.com/spanner/docs/compute-capacity). NodeCount int64 `json:"nodeCount,omitempty"` // ProcessingUnits: The number of processing units allocated to this instance. @@ -2744,9 +2794,8 @@ type Instance struct { // is enabled, `processing_units` is treated as an `OUTPUT_ONLY` field and // reflects the current number of processing units allocated to the instance. // This might be zero in API responses for instances that are not yet in the - // `READY` state. See the documentation - // (https://cloud.google.com/spanner/docs/compute-capacity) for more - // information about nodes and processing units. + // `READY` state. For more information, see Compute capacity, nodes and + // processing units (https://cloud.google.com/spanner/docs/compute-capacity). ProcessingUnits int64 `json:"processingUnits,omitempty"` // State: Output only. The current instance state. For CreateInstance, the // state must be either omitted or set to `CREATING`. For UpdateInstance, the @@ -2792,8 +2841,8 @@ type InstanceConfig struct { // configurations. `base_config` must refer to a configuration of type // `GOOGLE_MANAGED` in the same project as this configuration. BaseConfig string `json:"baseConfig,omitempty"` - // ConfigType: Output only. Whether this instance configuration is a Google- or - // user-managed configuration. + // ConfigType: Output only. Whether this instance configuration is a + // Google-managed or user-managed configuration. // // Possible values: // "TYPE_UNSPECIFIED" - Unspecified. @@ -2814,16 +2863,16 @@ type InstanceConfig struct { // instance configuration is overwritten blindly. Etag string `json:"etag,omitempty"` // FreeInstanceAvailability: Output only. Describes whether free instances are - // available to be created in this instance config. + // available to be created in this instance configuration. // // Possible values: // "FREE_INSTANCE_AVAILABILITY_UNSPECIFIED" - Not specified. // "AVAILABLE" - Indicates that free instances are available to be created in - // this instance config. + // this instance configuration. // "UNSUPPORTED" - Indicates that free instances are not supported in this - // instance config. + // instance configuration. // "DISABLED" - Indicates that free instances are currently not available to - // be created in this instance config. + // be created in this instance configuration. // "QUOTA_EXCEEDED" - Indicates that additional free instances cannot be // created in this instance configuration because the project has reached its // limit of free instances. @@ -2872,7 +2921,7 @@ type InstanceConfig struct { QuorumType string `json:"quorumType,omitempty"` // Reconciling: Output only. If true, the instance configuration is being // created or updated. If false, there are no ongoing operations for the - // instance config. + // instance configuration. Reconciling bool `json:"reconciling,omitempty"` // Replicas: The geographic placement of nodes in this instance configuration // and their replication properties. To create user-managed configurations, @@ -3397,9 +3446,9 @@ type ListInstanceConfigOperationsResponse struct { // ListInstanceConfigOperations call to fetch more of the matching metadata. NextPageToken string `json:"nextPageToken,omitempty"` // Operations: The list of matching instance configuration long-running - // operations. Each operation's name will be prefixed by the instance config's - // name. The operation's metadata field type `metadata.type_url` describes the - // type of the metadata. + // operations. Each operation's name will be prefixed by the name of the + // instance configuration. The operation's metadata field type + // `metadata.type_url` describes the type of the metadata. Operations []*Operation `json:"operations,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -3802,8 +3851,8 @@ func (s *MetricMatrixRow) UnmarshalJSON(data []byte) error { // MoveInstanceRequest: The request for MoveInstance. type MoveInstanceRequest struct { - // TargetConfig: Required. The target instance configuration for the instance - // to move. Values are of the form `projects//instanceConfigs/`. + // TargetConfig: Required. The target instance configuration where to move the + // instance. Values are of the form `projects//instanceConfigs/`. TargetConfig string `json:"targetConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "TargetConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -6605,25 +6654,26 @@ type ProjectsInstanceConfigsCreateCall struct { // Create: Creates an instance configuration and begins preparing it to be // used. The returned long-running operation can be used to track the progress -// of preparing the new instance config. The instance configuration name is -// assigned by the caller. If the named instance configuration already exists, -// `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the -// request returns: * The instance configuration is readable via the API, with -// all requested attributes. The instance config's reconciling field is set to -// true. Its state is `CREATING`. While the operation is pending: * Cancelling -// the operation renders the instance configuration immediately unreadable via -// the API. * Except for deleting the creating resource, all other attempts to -// modify the instance configuration are rejected. Upon completion of the -// returned operation: * Instances can be created using the instance -// configuration. * The instance config's reconciling field becomes false. Its -// state becomes `READY`. The returned long-running operation will have a name -// of the format `/operations/` and can be used to track creation of the -// instance config. The metadata field type is CreateInstanceConfigMetadata. -// The response field type is InstanceConfig, if successful. Authorization -// requires `spanner.instanceConfigs.create` permission on the resource parent. +// of preparing the new instance configuration. The instance configuration name +// is assigned by the caller. If the named instance configuration already +// exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after +// the request returns: * The instance configuration is readable via the API, +// with all requested attributes. The instance configuration's reconciling +// field is set to true. Its state is `CREATING`. While the operation is +// pending: * Cancelling the operation renders the instance configuration +// immediately unreadable via the API. * Except for deleting the creating +// resource, all other attempts to modify the instance configuration are +// rejected. Upon completion of the returned operation: * Instances can be +// created using the instance configuration. * The instance configuration's +// reconciling field becomes false. Its state becomes `READY`. The returned +// long-running operation will have a name of the format `/operations/` and can +// be used to track creation of the instance configuration. The metadata field +// type is CreateInstanceConfigMetadata. The response field type is +// InstanceConfig, if successful. Authorization requires +// `spanner.instanceConfigs.create` permission on the resource parent. // -// - parent: The name of the project in which to create the instance config. -// Values are of the form `projects/`. +// - parent: The name of the project in which to create the instance +// configuration. Values are of the form `projects/`. func (r *ProjectsInstanceConfigsService) Create(parent string, createinstanceconfigrequest *CreateInstanceConfigRequest) *ProjectsInstanceConfigsCreateCall { c := &ProjectsInstanceConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -6721,11 +6771,11 @@ type ProjectsInstanceConfigsDeleteCall struct { header_ http.Header } -// Delete: Deletes the instance config. Deletion is only allowed when no +// Delete: Deletes the instance configuration. Deletion is only allowed when no // instances are using the configuration. If any instances are using the -// config, returns `FAILED_PRECONDITION`. Only user-managed configurations can -// be deleted. Authorization requires `spanner.instanceConfigs.delete` -// permission on the resource name. +// configuration, returns `FAILED_PRECONDITION`. Only user-managed +// configurations can be deleted. Authorization requires +// `spanner.instanceConfigs.delete` permission on the resource name. // // - name: The name of the instance configuration to be deleted. Values are of // the form `projects//instanceConfigs/`. @@ -6739,9 +6789,9 @@ func (r *ProjectsInstanceConfigsService) Delete(name string) *ProjectsInstanceCo // control as a way to help prevent simultaneous deletes of an instance // configuration from overwriting each other. If not empty, the API only // deletes the instance configuration when the etag provided matches the -// current status of the requested instance config. Otherwise, deletes the -// instance configuration without checking the current status of the requested -// instance config. +// current status of the requested instance configuration. Otherwise, deletes +// the instance configuration without checking the current status of the +// requested instance configuration. func (c *ProjectsInstanceConfigsDeleteCall) Etag(etag string) *ProjectsInstanceConfigsDeleteCall { c.urlParams_.Set("etag", etag) return c @@ -7097,23 +7147,24 @@ type ProjectsInstanceConfigsPatchCall struct { header_ http.Header } -// Patch: Updates an instance config. The returned long-running operation can -// be used to track the progress of updating the instance. If the named -// instance configuration does not exist, returns `NOT_FOUND`. Only +// Patch: Updates an instance configuration. The returned long-running +// operation can be used to track the progress of updating the instance. If the +// named instance configuration does not exist, returns `NOT_FOUND`. Only // user-managed configurations can be updated. Immediately after the request -// returns: * The instance config's reconciling field is set to true. While the -// operation is pending: * Cancelling the operation sets its metadata's -// cancel_time. The operation is guaranteed to succeed at undoing all changes, -// after which point it terminates with a `CANCELLED` status. * All other -// attempts to modify the instance configuration are rejected. * Reading the -// instance configuration via the API continues to give the pre-request values. -// Upon completion of the returned operation: * Creating instances using the -// instance configuration uses the new values. * The instance config's new -// values are readable via the API. * The instance config's reconciling field -// becomes false. The returned long-running operation will have a name of the -// format `/operations/` and can be used to track the instance configuration -// modification. The metadata field type is UpdateInstanceConfigMetadata. The -// response field type is InstanceConfig, if successful. Authorization requires +// returns: * The instance configuration's reconciling field is set to true. +// While the operation is pending: * Cancelling the operation sets its +// metadata's cancel_time. The operation is guaranteed to succeed at undoing +// all changes, after which point it terminates with a `CANCELLED` status. * +// All other attempts to modify the instance configuration are rejected. * +// Reading the instance configuration via the API continues to give the +// pre-request values. Upon completion of the returned operation: * Creating +// instances using the instance configuration uses the new values. * The new +// values of the instance configuration are readable via the API. * The +// instance configuration's reconciling field becomes false. The returned +// long-running operation will have a name of the format `/operations/` and can +// be used to track the instance configuration modification. The metadata field +// type is UpdateInstanceConfigMetadata. The response field type is +// InstanceConfig, if successful. Authorization requires // `spanner.instanceConfigs.update` permission on the resource name. // // - name: A unique identifier for the instance configuration. Values are of @@ -8747,34 +8798,35 @@ type ProjectsInstancesMoveCall struct { header_ http.Header } -// Move: Moves the instance to the target instance config. The returned -// long-running operation can be used to track the progress of moving the +// Move: Moves an instance to the target instance configuration. You can use +// the returned long-running operation to track the progress of moving the // instance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets -// any of the following criteria: * Has an ongoing move to a different instance -// config * Has backups * Has an ongoing update * Is under free trial * -// Contains any CMEK-enabled databases While the operation is pending: * All -// other attempts to modify the instance, including changes to its compute -// capacity, are rejected. * The following database and backup admin operations -// are rejected: * DatabaseAdmin.CreateDatabase, * -// DatabaseAdmin.UpdateDatabaseDdl (Disabled if default_leader is specified in -// the request.) * DatabaseAdmin.RestoreDatabase * DatabaseAdmin.CreateBackup * -// DatabaseAdmin.CopyBackup * Both the source and target instance -// configurations are subject to hourly compute and storage charges. * The -// instance may experience higher read-write latencies and a higher transaction -// abort rate. However, moving an instance does not cause any downtime. The -// returned long-running operation will have a name of the format +// any of the following criteria: * Is undergoing a move to a different +// instance configuration * Has backups * Has an ongoing update * Contains any +// CMEK-enabled databases * Is a free trial instance While the operation is +// pending: * All other attempts to modify the instance, including changes to +// its compute capacity, are rejected. * The following database and backup +// admin operations are rejected: * `DatabaseAdmin.CreateDatabase` * +// `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is specified +// in the request.) * `DatabaseAdmin.RestoreDatabase` * +// `DatabaseAdmin.CreateBackup` * `DatabaseAdmin.CopyBackup` * Both the source +// and target instance configurations are subject to hourly compute and storage +// charges. * The instance might experience higher read-write latencies and a +// higher transaction abort rate. However, moving an instance doesn't cause any +// downtime. The returned long-running operation has a name of the format // `/operations/` and can be used to track the move instance operation. The // metadata field type is MoveInstanceMetadata. The response field type is // Instance, if successful. Cancelling the operation sets its metadata's -// cancel_time. Cancellation is not immediate since it involves moving any data -// previously moved to target instance configuration back to the original -// instance config. The same operation can be used to track the progress of the -// cancellation. Upon successful completion of the cancellation, the operation -// terminates with `CANCELLED` status. Upon completion(if not cancelled) of the -// returned operation: * Instance would be successfully moved to the target -// instance config. * You are billed for compute and storage in target instance -// config. Authorization requires `spanner.instances.update` permission on the -// resource instance. For more details, please see documentation +// cancel_time. Cancellation is not immediate because it involves moving any +// data previously moved to the target instance configuration back to the +// original instance configuration. You can use this operation to track the +// progress of the cancellation. Upon successful completion of the +// cancellation, the operation terminates with `CANCELLED` status. If not +// cancelled, upon completion of the returned operation: * The instance +// successfully moves to the target instance configuration. * You are billed +// for compute and storage in target instance configuration. Authorization +// requires the `spanner.instances.update` permission on the resource instance. +// For more details, see Move an instance // (https://cloud.google.com/spanner/docs/move-instance). // // - name: The instance to move. Values are of the form `projects//instances/`. @@ -10030,18 +10082,20 @@ func (r *ProjectsInstancesBackupsService) List(parent string) *ProjectsInstances // eligible for filtering: * `name` * `database` * `state` * `create_time` (and // values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values // are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of -// the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` You can combine multiple -// expressions by enclosing each expression in parentheses. By default, -// expressions are combined with AND logic, but you can specify AND, OR, and -// NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup's -// name contains the string "howl". * `database:prod` - The database's name -// contains the string "prod". * `state:CREATING` - The backup is pending +// the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` * `backup_schedules` You can +// combine multiple expressions by enclosing each expression in parentheses. By +// default, expressions are combined with AND logic, but you can specify AND, +// OR, and NOT logic explicitly. Here are a few examples: * `name:Howl` - The +// backup's name contains the string "howl". * `database:prod` - The database's +// name contains the string "prod". * `state:CREATING` - The backup is pending // creation. * `state:READY` - The backup is fully created and ready for use. * // `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")` - The backup name // contains the string "howl" and `create_time` of the backup is before // 2018-03-28T14:50:00Z. * `expire_time < \"2018-03-28T14:50:00Z\" - The // backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes > -// 10000000000` - The backup's size is greater than 10GB +// 10000000000` - The backup's size is greater than 10GB * +// `backup_schedules:daily` - The backup is created from a schedule with +// "daily" in its name. func (c *ProjectsInstancesBackupsListCall) Filter(filter string) *ProjectsInstancesBackupsListCall { c.urlParams_.Set("filter", filter) return c diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index e0205577440..7874fd5409b 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240724", + "revision": "20240814", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2720,6 +2720,10 @@ "format": "google-datetime", "type": "string" }, + "preferredSecondaryZone": { + "description": "Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field. This field applies to all DB types.", + "type": "string" + }, "preferredZone": { "description": "Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance. This field applies to all DB types.", "type": "string" @@ -2791,7 +2795,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -2844,7 +2847,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -2883,7 +2885,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3100,7 +3101,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3153,7 +3153,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -3192,7 +3191,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3854,7 +3852,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3907,7 +3904,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -3946,7 +3942,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -6293,9 +6288,9 @@ "The database's built-in user type.", "Cloud IAM user.", "Cloud IAM service account.", - "Cloud IAM group non-login user.", - "Cloud IAM group login user.", - "Cloud IAM group login service account." + "Cloud IAM group. Not used for login.", + "Read-only. Login for a user that belongs to the Cloud IAM group.", + "Read-only. Login for a service account that belongs to the Cloud IAM group." ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 634534f0894..7c191572660 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -770,6 +770,11 @@ type CloneContext struct { // PointInTime: Timestamp, if specified, identifies the time to which the // source instance is cloned. PointInTime string `json:"pointInTime,omitempty"` + // PreferredSecondaryZone: Optional. Copy clone and point-in-time recovery + // clone of a regional instance in the specified zones. If not specified, clone + // to the same secondary zone as the source instance. This value cannot be the + // same as the preferred_zone field. This field applies to all DB types. + PreferredSecondaryZone string `json:"preferredSecondaryZone,omitempty"` // PreferredZone: Optional. Copy clone and point-in-time recovery clone of an // instance to the specified zone. If no zone is specified, clone to the same // primary zone as the source instance. This field applies to all DB types. @@ -871,8 +876,6 @@ type ConnectSettings struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -1118,8 +1121,6 @@ type DatabaseInstance struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -1898,8 +1899,6 @@ type Flag struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -4671,9 +4670,11 @@ type User struct { // "BUILT_IN" - The database's built-in user type. // "CLOUD_IAM_USER" - Cloud IAM user. // "CLOUD_IAM_SERVICE_ACCOUNT" - Cloud IAM service account. - // "CLOUD_IAM_GROUP" - Cloud IAM group non-login user. - // "CLOUD_IAM_GROUP_USER" - Cloud IAM group login user. - // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Cloud IAM group login service account. + // "CLOUD_IAM_GROUP" - Cloud IAM group. Not used for login. + // "CLOUD_IAM_GROUP_USER" - Read-only. Login for a user that belongs to the + // Cloud IAM group. + // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Read-only. Login for a service account + // that belongs to the Cloud IAM group. Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 103d8f79fae..ac7fa63ea16 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240724", + "revision": "20240814", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2720,6 +2720,10 @@ "format": "google-datetime", "type": "string" }, + "preferredSecondaryZone": { + "description": "Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field.", + "type": "string" + }, "preferredZone": { "description": "Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance.", "type": "string" @@ -2791,7 +2795,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -2844,7 +2847,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -2883,7 +2885,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3100,7 +3101,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3153,7 +3153,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -3192,7 +3191,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -3855,7 +3853,6 @@ "MYSQL_8_0_39", "MYSQL_8_0_40", "MYSQL_8_4", - "MYSQL_8_4_0", "SQLSERVER_2019_STANDARD", "SQLSERVER_2019_ENTERPRISE", "SQLSERVER_2019_EXPRESS", @@ -3908,7 +3905,6 @@ false, false, false, - false, false ], "enumDescriptions": [ @@ -3947,7 +3943,6 @@ "The database major version is MySQL 8.0 and the minor version is 39.", "The database major version is MySQL 8.0 and the minor version is 40.", "The database version is MySQL 8.4.", - "The database version is MySQL 8.4 and the patch version is 0.", "The database version is SQL Server 2019 Standard.", "The database version is SQL Server 2019 Enterprise.", "The database version is SQL Server 2019 Express.", @@ -6292,9 +6287,9 @@ "The database's built-in user type.", "Cloud IAM user.", "Cloud IAM service account.", - "Cloud IAM group non-login user.", - "Cloud IAM group login user.", - "Cloud IAM group service account." + "Cloud IAM group. Not used for login.", + "Read-only. Login for a user that belongs to the Cloud IAM group.", + "Read-only. Login for a service account that belongs to the Cloud IAM group." ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index dcce80c9abb..67ee4666614 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -769,6 +769,11 @@ type CloneContext struct { // PointInTime: Timestamp, if specified, identifies the time to which the // source instance is cloned. PointInTime string `json:"pointInTime,omitempty"` + // PreferredSecondaryZone: Optional. Copy clone and point-in-time recovery + // clone of a regional instance in the specified zones. If not specified, clone + // to the same secondary zone as the source instance. This value cannot be the + // same as the preferred_zone field. + PreferredSecondaryZone string `json:"preferredSecondaryZone,omitempty"` // PreferredZone: Optional. Copy clone and point-in-time recovery clone of an // instance to the specified zone. If no zone is specified, clone to the same // primary zone as the source instance. @@ -870,8 +875,6 @@ type ConnectSettings struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -1117,8 +1120,6 @@ type DatabaseInstance struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -1899,8 +1900,6 @@ type Flag struct { // "MYSQL_8_0_40" - The database major version is MySQL 8.0 and the minor // version is 40. // "MYSQL_8_4" - The database version is MySQL 8.4. - // "MYSQL_8_4_0" - The database version is MySQL 8.4 and the patch version is - // 0. // "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019 // Standard. // "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server 2019 @@ -4672,9 +4671,11 @@ type User struct { // "BUILT_IN" - The database's built-in user type. // "CLOUD_IAM_USER" - Cloud IAM user. // "CLOUD_IAM_SERVICE_ACCOUNT" - Cloud IAM service account. - // "CLOUD_IAM_GROUP" - Cloud IAM group non-login user. - // "CLOUD_IAM_GROUP_USER" - Cloud IAM group login user. - // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Cloud IAM group service account. + // "CLOUD_IAM_GROUP" - Cloud IAM group. Not used for login. + // "CLOUD_IAM_GROUP_USER" - Read-only. Login for a user that belongs to the + // Cloud IAM group. + // "CLOUD_IAM_GROUP_SERVICE_ACCOUNT" - Read-only. Login for a service account + // that belongs to the Cloud IAM group. Type string `json:"type,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/storage/v1/storage-api.json b/storage/v1/storage-api.json index 5ee9276a0b8..597daf0a724 100644 --- a/storage/v1/storage-api.json +++ b/storage/v1/storage-api.json @@ -43,7 +43,7 @@ "location": "me-central2" } ], - "etag": "\"34373939373134303235393739323331393435\"", + "etag": "\"38363036373236373330353534313035333932\"", "icons": { "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" @@ -4136,7 +4136,7 @@ } } }, - "revision": "20240809", + "revision": "20240819", "rootUrl": "https://storage.googleapis.com/", "schemas": { "AnywhereCache": { @@ -4349,6 +4349,11 @@ "format": "int64", "type": "string" }, + "hardDeleteTime": { + "description": "The hard delete time of the bucket in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, "hierarchicalNamespace": { "description": "The bucket's hierarchical namespace configuration.", "properties": { @@ -4675,6 +4680,11 @@ }, "type": "object" }, + "softDeleteTime": { + "description": "The soft delete time of the bucket in RFC 3339 format.", + "format": "date-time", + "type": "string" + }, "storageClass": { "description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see [Storage Classes](https://cloud.google.com/storage/docs/storage-classes).", "type": "string" diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go index 8a16d773485..b16e3f227b2 100644 --- a/storage/v1/storage-gen.go +++ b/storage/v1/storage-gen.go @@ -463,6 +463,8 @@ type Bucket struct { Etag string `json:"etag,omitempty"` // Generation: The generation of this bucket. Generation int64 `json:"generation,omitempty,string"` + // HardDeleteTime: The hard delete time of the bucket in RFC 3339 format. + HardDeleteTime string `json:"hardDeleteTime,omitempty"` // HierarchicalNamespace: The bucket's hierarchical namespace configuration. HierarchicalNamespace *BucketHierarchicalNamespace `json:"hierarchicalNamespace,omitempty"` // IamConfiguration: The bucket's IAM configuration. @@ -525,6 +527,8 @@ type Bucket struct { // of time that soft-deleted objects will be retained, and cannot be // permanently deleted. SoftDeletePolicy *BucketSoftDeletePolicy `json:"softDeletePolicy,omitempty"` + // SoftDeleteTime: The soft delete time of the bucket in RFC 3339 format. + SoftDeleteTime string `json:"softDeleteTime,omitempty"` // StorageClass: The bucket's default storage class, used whenever no // storageClass is specified for a newly-created object. This defines how // objects in the bucket are stored and determines the SLA and the cost of diff --git a/texttospeech/v1/texttospeech-api.json b/texttospeech/v1/texttospeech-api.json index c660a0a1fbe..3cb22a33b26 100644 --- a/texttospeech/v1/texttospeech-api.json +++ b/texttospeech/v1/texttospeech-api.json @@ -318,7 +318,7 @@ } } }, - "revision": "20240419", + "revision": "20240815", "rootUrl": "https://texttospeech.googleapis.com/", "schemas": { "AudioConfig": { @@ -578,7 +578,7 @@ }, "input": { "$ref": "SynthesisInput", - "description": "Required. The Synthesizer requires either plain text or SSML as input. While Long Audio is in preview, SSML is temporarily unsupported." + "description": "Required. The Synthesizer requires either plain text or SSML as input." }, "outputGcsUri": { "description": "Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.", diff --git a/texttospeech/v1/texttospeech-gen.go b/texttospeech/v1/texttospeech-gen.go index dcfae96ce8b..ce92a981701 100644 --- a/texttospeech/v1/texttospeech-gen.go +++ b/texttospeech/v1/texttospeech-gen.go @@ -614,7 +614,7 @@ type SynthesizeLongAudioRequest struct { // AudioConfig: Required. The configuration of the synthesized audio. AudioConfig *AudioConfig `json:"audioConfig,omitempty"` // Input: Required. The Synthesizer requires either plain text or SSML as - // input. While Long Audio is in preview, SSML is temporarily unsupported. + // input. Input *SynthesisInput `json:"input,omitempty"` // OutputGcsUri: Required. Specifies a Cloud Storage URI for the synthesis // results. Must be specified in the format: `gs://bucket_name/object_name`, diff --git a/texttospeech/v1beta1/texttospeech-api.json b/texttospeech/v1beta1/texttospeech-api.json index bc73be742d5..27e3af57b4a 100644 --- a/texttospeech/v1beta1/texttospeech-api.json +++ b/texttospeech/v1beta1/texttospeech-api.json @@ -261,7 +261,7 @@ } } }, - "revision": "20240419", + "revision": "20240815", "rootUrl": "https://texttospeech.googleapis.com/", "schemas": { "AudioConfig": { @@ -511,7 +511,7 @@ }, "input": { "$ref": "SynthesisInput", - "description": "Required. The Synthesizer requires either plain text or SSML as input. While Long Audio is in preview, SSML is temporarily unsupported." + "description": "Required. The Synthesizer requires either plain text or SSML as input." }, "outputGcsUri": { "description": "Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.", diff --git a/texttospeech/v1beta1/texttospeech-gen.go b/texttospeech/v1beta1/texttospeech-gen.go index 1d6c0903ba5..bb7b44eaa8f 100644 --- a/texttospeech/v1beta1/texttospeech-gen.go +++ b/texttospeech/v1beta1/texttospeech-gen.go @@ -590,7 +590,7 @@ type SynthesizeLongAudioRequest struct { // AudioConfig: Required. The configuration of the synthesized audio. AudioConfig *AudioConfig `json:"audioConfig,omitempty"` // Input: Required. The Synthesizer requires either plain text or SSML as - // input. While Long Audio is in preview, SSML is temporarily unsupported. + // input. Input *SynthesisInput `json:"input,omitempty"` // OutputGcsUri: Required. Specifies a Cloud Storage URI for the synthesis // results. Must be specified in the format: `gs://bucket_name/object_name`, diff --git a/translate/v3/translate-api.json b/translate/v3/translate-api.json index 6d8b356dc24..ff84ab86a41 100644 --- a/translate/v3/translate-api.json +++ b/translate/v3/translate-api.json @@ -1396,7 +1396,7 @@ ], "parameters": { "name": { - "description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"", + "description": "Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+$", "required": true, @@ -1707,7 +1707,7 @@ } } }, - "revision": "20240718", + "revision": "20240821", "rootUrl": "https://translation.googleapis.com/", "schemas": { "AdaptiveMtDataset": { @@ -1829,7 +1829,7 @@ "type": "string" }, "glossaryConfig": { - "$ref": "TranslateTextGlossaryConfig", + "$ref": "GlossaryConfig", "description": "Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned." }, "referenceSentenceConfig": { @@ -2227,7 +2227,7 @@ "id": "Example", "properties": { "name": { - "description": "Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}'", + "description": "Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}`", "readOnly": true, "type": "string" }, @@ -2367,6 +2367,21 @@ }, "type": "object" }, + "GlossaryConfig": { + "description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.", + "id": "GlossaryConfig", + "properties": { + "glossary": { + "description": "Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`", + "type": "string" + }, + "ignoreCase": { + "description": "Optional. Indicates match is case insensitive. The default value is `false` if missing.", + "type": "boolean" + } + }, + "type": "object" + }, "GlossaryEntry": { "description": "Represents a single entry in a glossary.", "id": "GlossaryEntry", @@ -2376,7 +2391,7 @@ "type": "string" }, "name": { - "description": "Identifier. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"", + "description": "Identifier. The resource name of the entry. Format: `projects/*/locations/*/glossaries/*/glossaryEntries/*`", "type": "string" }, "termsPair": { diff --git a/translate/v3/translate-gen.go b/translate/v3/translate-gen.go index c9ffa140a8b..304e754888e 100644 --- a/translate/v3/translate-gen.go +++ b/translate/v3/translate-gen.go @@ -425,7 +425,7 @@ type AdaptiveMtTranslateRequest struct { // GlossaryConfig: Optional. Glossary to be applied. The glossary must be // within the same region (have the same location-id) as the model, otherwise // an INVALID_ARGUMENT (400) error is returned. - GlossaryConfig *TranslateTextGlossaryConfig `json:"glossaryConfig,omitempty"` + GlossaryConfig *GlossaryConfig `json:"glossaryConfig,omitempty"` // ReferenceSentenceConfig: Configuration for caller provided reference // sentences. ReferenceSentenceConfig *ReferenceSentenceConfig `json:"referenceSentenceConfig,omitempty"` @@ -1052,7 +1052,7 @@ type Empty struct { type Example struct { // Name: Output only. The resource name of the example, in form of // `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id - // }/examples/{example_id}' + // }/examples/{example_id}` Name string `json:"name,omitempty"` // SourceText: Sentence in source language. SourceText string `json:"sourceText,omitempty"` @@ -1267,12 +1267,41 @@ func (s Glossary) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GlossaryConfig: Configures which glossary is used for a specific target +// language and defines options for applying that glossary. +type GlossaryConfig struct { + // Glossary: Required. The `glossary` to be applied for this translation. The + // format depends on the glossary: - User-provided custom glossary: + // `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary + // -id}` + Glossary string `json:"glossary,omitempty"` + // IgnoreCase: Optional. Indicates match is case insensitive. The default value + // is `false` if missing. + IgnoreCase bool `json:"ignoreCase,omitempty"` + // ForceSendFields is a list of field names (e.g. "Glossary") 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. "Glossary") 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 GlossaryConfig) MarshalJSON() ([]byte, error) { + type NoMethod GlossaryConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GlossaryEntry: Represents a single entry in a glossary. type GlossaryEntry struct { // Description: Describes the glossary entry. Description string `json:"description,omitempty"` // Name: Identifier. The resource name of the entry. Format: - // "projects/*/locations/*/glossaries/*/glossaryEntries/*" + // `projects/*/locations/*/glossaries/*/glossaryEntries/*` Name string `json:"name,omitempty"` // TermsPair: Used for an unidirectional glossary. TermsPair *GlossaryTermsPair `json:"termsPair,omitempty"` @@ -7349,7 +7378,7 @@ type ProjectsLocationsGlossariesGlossaryEntriesPatchCall struct { // Patch: Updates a glossary entry. // // - name: Identifier. The resource name of the entry. Format: -// "projects/*/locations/*/glossaries/*/glossaryEntries/*". +// `projects/*/locations/*/glossaries/*/glossaryEntries/*`. func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Patch(name string, glossaryentry *GlossaryEntry) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall { c := &ProjectsLocationsGlossariesGlossaryEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 8dc686259f9..bdc41e4fd11 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -1180,66 +1180,6 @@ } } }, - "diskMigrationJobs": { - "methods": { - "cancel": { - "description": "Cancels the disk migration job.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/diskMigrationJobs/{diskMigrationJobsId}:cancel", - "httpMethod": "POST", - "id": "vmmigration.projects.locations.sources.diskMigrationJobs.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the DiskMigrationJob.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/diskMigrationJobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:cancel", - "request": { - "$ref": "CancelDiskMigrationJobRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "run": { - "description": "Runs the disk migration job.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/diskMigrationJobs/{diskMigrationJobsId}:run", - "httpMethod": "POST", - "id": "vmmigration.projects.locations.sources.diskMigrationJobs.run", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the DiskMigrationJob.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/diskMigrationJobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:run", - "request": { - "$ref": "RunDiskMigrationJobRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, "migratingVms": { "methods": { "create": { @@ -2280,7 +2220,7 @@ } } }, - "revision": "20240712", + "revision": "20240808", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2461,11 +2401,6 @@ "description": "User specified tags to add to every M2VM generated resource in AWS. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m2vm`.", "type": "object" }, - "networkInsights": { - "$ref": "NetworkInsights", - "description": "Output only. Information about the network coniguration of the source. Only gatherred upon request.", - "readOnly": true - }, "publicIp": { "description": "Output only. The source's public IP. All communication initiated by this source will originate from this IP.", "readOnly": true, @@ -2968,12 +2903,6 @@ "properties": {}, "type": "object" }, - "CancelDiskMigrationJobRequest": { - "description": "Request message for 'CancelDiskMigrationJob' request.", - "id": "CancelDiskMigrationJobRequest", - "properties": {}, - "type": "object" - }, "CancelImageImportJobRequest": { "description": "Request message for 'CancelImageImportJob' request.", "id": "CancelImageImportJobRequest", @@ -3180,6 +3109,20 @@ "description": "Output only. The OS license returned from the adaptation module report.", "readOnly": true }, + "bootConversion": { + "description": "Optional. By default the virtual machine will keep its existing boot option. Setting this property will trigger an internal process which will convert the virtual machine from using the existing boot option to another.", + "enum": [ + "BOOT_CONVERSION_UNSPECIFIED", + "NONE", + "BIOS_TO_EFI" + ], + "enumDescriptions": [ + "Unspecified conversion type.", + "No conversion.", + "Convert from BIOS to EFI." + ], + "type": "string" + }, "bootOption": { "description": "Output only. The VM Boot Option, as set in the source VM.", "enum": [ @@ -3217,6 +3160,14 @@ ], "type": "string" }, + "enableIntegrityMonitoring": { + "description": "Optional. Defines whether the instance has integrity monitoring enabled. This can be set to true only if the VM boot option is EFI, and vTPM is enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Defines whether the instance has vTPM enabled. This can be set to true only if the VM boot option is EFI.", + "type": "boolean" + }, "encryption": { "$ref": "Encryption", "description": "Optional. Immutable. The encryption to apply to the VM disks." @@ -3313,6 +3264,20 @@ "$ref": "AppliedLicense", "description": "The OS license returned from the adaptation module report." }, + "bootConversion": { + "description": "Optional. By default the virtual machine will keep its existing boot option. Setting this property will trigger an internal process which will convert the virtual machine from using the existing boot option to another.", + "enum": [ + "BOOT_CONVERSION_UNSPECIFIED", + "NONE", + "BIOS_TO_EFI" + ], + "enumDescriptions": [ + "Unspecified conversion type.", + "No conversion.", + "Convert from BIOS to EFI." + ], + "type": "string" + }, "bootOption": { "description": "The VM Boot Option, as set in the source VM.", "enum": [ @@ -3349,6 +3314,14 @@ ], "type": "string" }, + "enableIntegrityMonitoring": { + "description": "Optional. Defines whether the instance has integrity monitoring enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Defines whether the instance has vTPM enabled.", + "type": "boolean" + }, "encryption": { "$ref": "Encryption", "description": "Optional. The encryption to apply to the VM disks." @@ -3864,6 +3837,14 @@ "$ref": "ComputeScheduling", "description": "Optional. Compute instance scheduling information (if empty default is used)." }, + "enableIntegrityMonitoring": { + "description": "Optional. Defines whether the instance has integrity monitoring enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Defines whether the instance has vTPM enabled.", + "type": "boolean" + }, "encryption": { "$ref": "Encryption", "description": "Optional. The encryption to apply to the VM." @@ -5007,23 +4988,6 @@ }, "type": "object" }, - "NetworkInsights": { - "description": "Information about the network coniguration of the source.", - "id": "NetworkInsights", - "properties": { - "sourceNetworkConfig": { - "description": "Output only. The gathered network configuration of the source. Presented in json format.", - "readOnly": true, - "type": "string" - }, - "sourceNetworkTerraform": { - "description": "Output only. The gathered network configuration of the source. Presented in terraform format.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "NetworkInterface": { "description": "NetworkInterface represents a NIC of a VM.", "id": "NetworkInterface", @@ -5041,7 +5005,7 @@ "type": "string" }, "networkTier": { - "description": "Optional. The networking tier used for configuring network access configuration. If left empty, will default to PREMIUM.", + "description": "Optional. The networking tier used for optimizing connectivity between instances and systems on the internet. Applies only for external ephemeral IP addresses. If left empty, will default to PREMIUM.", "enum": [ "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED", "NETWORK_TIER_STANDARD", @@ -5397,12 +5361,6 @@ "properties": {}, "type": "object" }, - "RunDiskMigrationJobRequest": { - "description": "Request message for 'RunDiskMigrationJobRequest' request.", - "id": "RunDiskMigrationJobRequest", - "properties": {}, - "type": "object" - }, "SchedulePolicy": { "description": "A policy for scheduling replications.", "id": "SchedulePolicy", diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 7f7098c4578..a5c233a90a6 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -232,7 +232,6 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService { rs := &ProjectsLocationsSourcesService{s: s} rs.DatacenterConnectors = NewProjectsLocationsSourcesDatacenterConnectorsService(s) - rs.DiskMigrationJobs = NewProjectsLocationsSourcesDiskMigrationJobsService(s) rs.MigratingVms = NewProjectsLocationsSourcesMigratingVmsService(s) rs.UtilizationReports = NewProjectsLocationsSourcesUtilizationReportsService(s) return rs @@ -243,8 +242,6 @@ type ProjectsLocationsSourcesService struct { DatacenterConnectors *ProjectsLocationsSourcesDatacenterConnectorsService - DiskMigrationJobs *ProjectsLocationsSourcesDiskMigrationJobsService - MigratingVms *ProjectsLocationsSourcesMigratingVmsService UtilizationReports *ProjectsLocationsSourcesUtilizationReportsService @@ -259,15 +256,6 @@ type ProjectsLocationsSourcesDatacenterConnectorsService struct { s *Service } -func NewProjectsLocationsSourcesDiskMigrationJobsService(s *Service) *ProjectsLocationsSourcesDiskMigrationJobsService { - rs := &ProjectsLocationsSourcesDiskMigrationJobsService{s: s} - return rs -} - -type ProjectsLocationsSourcesDiskMigrationJobsService struct { - s *Service -} - func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocationsSourcesMigratingVmsService { rs := &ProjectsLocationsSourcesMigratingVmsService{s: s} rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s) @@ -545,9 +533,6 @@ type AwsSourceDetails struct { // tags that are set as part of the migration process. The tags must not begin // with the reserved prefix `m2vm`. MigrationResourcesUserTags map[string]string `json:"migrationResourcesUserTags,omitempty"` - // NetworkInsights: Output only. Information about the network coniguration of - // the source. Only gatherred upon request. - NetworkInsights *NetworkInsights `json:"networkInsights,omitempty"` // PublicIp: Output only. The source's public IP. All communication initiated // by this source will originate from this IP. PublicIp string `json:"publicIp,omitempty"` @@ -969,11 +954,6 @@ type CancelCloneJobRequest struct { type CancelCutoverJobRequest struct { } -// CancelDiskMigrationJobRequest: Request message for 'CancelDiskMigrationJob' -// request. -type CancelDiskMigrationJobRequest struct { -} - // CancelImageImportJobRequest: Request message for 'CancelImageImportJob' // request. type CancelImageImportJobRequest struct { @@ -1175,6 +1155,16 @@ type ComputeEngineTargetDefaults struct { // AppliedLicense: Output only. The OS license returned from the adaptation // module report. AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"` + // BootConversion: Optional. By default the virtual machine will keep its + // existing boot option. Setting this property will trigger an internal process + // which will convert the virtual machine from using the existing boot option + // to another. + // + // Possible values: + // "BOOT_CONVERSION_UNSPECIFIED" - Unspecified conversion type. + // "NONE" - No conversion. + // "BIOS_TO_EFI" - Convert from BIOS to EFI. + BootConversion string `json:"bootConversion,omitempty"` // BootOption: Output only. The VM Boot Option, as set in the source VM. // // Possible values: @@ -1197,6 +1187,13 @@ type ComputeEngineTargetDefaults struct { // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk // type. DiskType string `json:"diskType,omitempty"` + // EnableIntegrityMonitoring: Optional. Defines whether the instance has + // integrity monitoring enabled. This can be set to true only if the VM boot + // option is EFI, and vTPM is enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + // EnableVtpm: Optional. Defines whether the instance has vTPM enabled. This + // can be set to true only if the VM boot option is EFI. + EnableVtpm bool `json:"enableVtpm,omitempty"` // Encryption: Optional. Immutable. The encryption to apply to the VM disks. Encryption *Encryption `json:"encryption,omitempty"` // Hostname: The hostname to assign to the VM. @@ -1260,6 +1257,16 @@ type ComputeEngineTargetDetails struct { AdditionalLicenses []string `json:"additionalLicenses,omitempty"` // AppliedLicense: The OS license returned from the adaptation module report. AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"` + // BootConversion: Optional. By default the virtual machine will keep its + // existing boot option. Setting this property will trigger an internal process + // which will convert the virtual machine from using the existing boot option + // to another. + // + // Possible values: + // "BOOT_CONVERSION_UNSPECIFIED" - Unspecified conversion type. + // "NONE" - No conversion. + // "BIOS_TO_EFI" - Convert from BIOS to EFI. + BootConversion string `json:"bootConversion,omitempty"` // BootOption: The VM Boot Option, as set in the source VM. // // Possible values: @@ -1282,6 +1289,11 @@ type ComputeEngineTargetDetails struct { // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk // type. DiskType string `json:"diskType,omitempty"` + // EnableIntegrityMonitoring: Optional. Defines whether the instance has + // integrity monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + // EnableVtpm: Optional. Defines whether the instance has vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` // Encryption: Optional. The encryption to apply to the VM disks. Encryption *Encryption `json:"encryption,omitempty"` // Hostname: The hostname to assign to the VM. @@ -1750,6 +1762,11 @@ type DisksMigrationVmTargetDefaults struct { // ComputeScheduling: Optional. Compute instance scheduling information (if // empty default is used). ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"` + // EnableIntegrityMonitoring: Optional. Defines whether the instance has + // integrity monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + // EnableVtpm: Optional. Defines whether the instance has vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` // Encryption: Optional. The encryption to apply to the VM. Encryption *Encryption `json:"encryption,omitempty"` // Hostname: Optional. The hostname to assign to the VM. @@ -2915,32 +2932,6 @@ func (s MigrationWarning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// NetworkInsights: Information about the network coniguration of the source. -type NetworkInsights struct { - // SourceNetworkConfig: Output only. The gathered network configuration of the - // source. Presented in json format. - SourceNetworkConfig string `json:"sourceNetworkConfig,omitempty"` - // SourceNetworkTerraform: Output only. The gathered network configuration of - // the source. Presented in terraform format. - SourceNetworkTerraform string `json:"sourceNetworkTerraform,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceNetworkConfig") 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. "SourceNetworkConfig") 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 NetworkInsights) MarshalJSON() ([]byte, error) { - type NoMethod NetworkInsights - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // NetworkInterface: NetworkInterface represents a NIC of a VM. type NetworkInterface struct { // ExternalIp: Optional. The external IP to define in the NIC. @@ -2951,8 +2942,9 @@ type NetworkInterface struct { InternalIp string `json:"internalIp,omitempty"` // Network: The network to connect the NIC to. Network string `json:"network,omitempty"` - // NetworkTier: Optional. The networking tier used for configuring network - // access configuration. If left empty, will default to PREMIUM. + // NetworkTier: Optional. The networking tier used for optimizing connectivity + // between instances and systems on the internet. Applies only for external + // ephemeral IP addresses. If left empty, will default to PREMIUM. // // Possible values: // "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED" - An unspecified network tier. @@ -3337,11 +3329,6 @@ func (s ReplicationSync) MarshalJSON() ([]byte, error) { type ResumeMigrationRequest struct { } -// RunDiskMigrationJobRequest: Request message for 'RunDiskMigrationJobRequest' -// request. -type RunDiskMigrationJobRequest struct { -} - // SchedulePolicy: A policy for scheduling replications. type SchedulePolicy struct { // IdleDuration: The idle duration between replication stages. @@ -7887,208 +7874,6 @@ func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Do(op return ret, nil } -type ProjectsLocationsSourcesDiskMigrationJobsCancelCall struct { - s *Service - name string - canceldiskmigrationjobrequest *CancelDiskMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the disk migration job. -// -// - name: The name of the DiskMigrationJob. -func (r *ProjectsLocationsSourcesDiskMigrationJobsService) Cancel(name string, canceldiskmigrationjobrequest *CancelDiskMigrationJobRequest) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { - c := &ProjectsLocationsSourcesDiskMigrationJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceldiskmigrationjobrequest = canceldiskmigrationjobrequest - 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 *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { - 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 *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceldiskmigrationjobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - 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{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "vmmigration.projects.locations.sources.diskMigrationJobs.cancel" 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 *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsSourcesDiskMigrationJobsRunCall struct { - s *Service - name string - rundiskmigrationjobrequest *RunDiskMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Run: Runs the disk migration job. -// -// - name: The name of the DiskMigrationJob. -func (r *ProjectsLocationsSourcesDiskMigrationJobsService) Run(name string, rundiskmigrationjobrequest *RunDiskMigrationJobRequest) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { - c := &ProjectsLocationsSourcesDiskMigrationJobsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.rundiskmigrationjobrequest = rundiskmigrationjobrequest - 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 *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Context(ctx context.Context) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { - 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 *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.rundiskmigrationjobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:run") - 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{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "vmmigration.projects.locations.sources.diskMigrationJobs.run" 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 *ProjectsLocationsSourcesDiskMigrationJobsRunCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - type ProjectsLocationsSourcesMigratingVmsCreateCall struct { s *Service parent string diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index 338595c2122..8cd2c47de3d 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -1180,66 +1180,6 @@ } } }, - "diskMigrationJobs": { - "methods": { - "cancel": { - "description": "Cancels the disk migration job.", - "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/diskMigrationJobs/{diskMigrationJobsId}:cancel", - "httpMethod": "POST", - "id": "vmmigration.projects.locations.sources.diskMigrationJobs.cancel", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the DiskMigrationJob.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/diskMigrationJobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha1/{+name}:cancel", - "request": { - "$ref": "CancelDiskMigrationJobRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "run": { - "description": "Runs the disk migration job.", - "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/diskMigrationJobs/{diskMigrationJobsId}:run", - "httpMethod": "POST", - "id": "vmmigration.projects.locations.sources.diskMigrationJobs.run", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. The name of the DiskMigrationJob.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/diskMigrationJobs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha1/{+name}:run", - "request": { - "$ref": "RunDiskMigrationJobRequest" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, "migratingVms": { "methods": { "create": { @@ -2280,7 +2220,7 @@ } } }, - "revision": "20240712", + "revision": "20240808", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -2461,11 +2401,6 @@ "description": "User specified tags to add to every M2VM generated resource in AWS. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m2vm`.", "type": "object" }, - "networkInsights": { - "$ref": "NetworkInsights", - "description": "Output only. Information about the network coniguration of the source. Only gatherred upon request.", - "readOnly": true - }, "publicIp": { "description": "Output only. The source's public IP. All communication initiated by this source will originate from this IP.", "readOnly": true, @@ -2968,12 +2903,6 @@ "properties": {}, "type": "object" }, - "CancelDiskMigrationJobRequest": { - "description": "Request message for 'CancelDiskMigrationJob' request.", - "id": "CancelDiskMigrationJobRequest", - "properties": {}, - "type": "object" - }, "CancelImageImportJobRequest": { "description": "Request message for 'CancelImageImportJob' request.", "id": "CancelImageImportJobRequest", @@ -3192,6 +3121,20 @@ "description": "Output only. The OS license returned from the adaptation module report.", "readOnly": true }, + "bootConversion": { + "description": "Optional. By default the virtual machine will keep its existing boot option. Setting this property will trigger an internal process which will convert the virtual machine from using the existing boot option to another.", + "enum": [ + "BOOT_CONVERSION_UNSPECIFIED", + "NONE", + "BIOS_TO_EFI" + ], + "enumDescriptions": [ + "Unspecified conversion type.", + "No conversion.", + "Convert from BIOS to EFI." + ], + "type": "string" + }, "bootOption": { "description": "Output only. The VM Boot Option, as set in the source VM.", "enum": [ @@ -3229,6 +3172,14 @@ ], "type": "string" }, + "enableIntegrityMonitoring": { + "description": "Optional. Defines whether the instance has integrity monitoring enabled. This can be set to true only if the VM boot option is EFI, and vTPM is enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Defines whether the instance has vTPM enabled. This can be set to true only if the VM boot option is EFI.", + "type": "boolean" + }, "encryption": { "$ref": "Encryption", "description": "Optional. Immutable. The encryption to apply to the VM disks." @@ -3325,6 +3276,20 @@ "$ref": "AppliedLicense", "description": "The OS license returned from the adaptation module report." }, + "bootConversion": { + "description": "Optional. By default the virtual machine will keep its existing boot option. Setting this property will trigger an internal process which will convert the virtual machine from using the existing boot option to another.", + "enum": [ + "BOOT_CONVERSION_UNSPECIFIED", + "NONE", + "BIOS_TO_EFI" + ], + "enumDescriptions": [ + "Unspecified conversion type.", + "No conversion.", + "Convert from BIOS to EFI." + ], + "type": "string" + }, "bootOption": { "description": "The VM Boot Option, as set in the source VM.", "enum": [ @@ -3361,6 +3326,14 @@ ], "type": "string" }, + "enableIntegrityMonitoring": { + "description": "Optional. Defines whether the instance has integrity monitoring enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Defines whether the instance has vTPM enabled.", + "type": "boolean" + }, "encryption": { "$ref": "Encryption", "description": "Optional. The encryption to apply to the VM disks." @@ -3899,6 +3872,14 @@ "$ref": "ComputeScheduling", "description": "Optional. Compute instance scheduling information (if empty default is used)." }, + "enableIntegrityMonitoring": { + "description": "Optional. Defines whether the instance has integrity monitoring enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Defines whether the instance has vTPM enabled.", + "type": "boolean" + }, "encryption": { "$ref": "Encryption", "description": "Optional. The encryption to apply to the VM." @@ -5052,23 +5033,6 @@ }, "type": "object" }, - "NetworkInsights": { - "description": "Information about the network coniguration of the source.", - "id": "NetworkInsights", - "properties": { - "sourceNetworkConfig": { - "description": "Output only. The gathered network configuration of the source. Presented in json format.", - "readOnly": true, - "type": "string" - }, - "sourceNetworkTerraform": { - "description": "Output only. The gathered network configuration of the source. Presented in terraform format.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "NetworkInterface": { "description": "NetworkInterface represents a NIC of a VM.", "id": "NetworkInterface", @@ -5086,7 +5050,7 @@ "type": "string" }, "networkTier": { - "description": "Optional. The networking tier used for configuring network access configuration. If left empty, will default to PREMIUM.", + "description": "Optional. The networking tier used for optimizing connectivity between instances and systems on the internet. Applies only for external ephemeral IP addresses. If left empty, will default to PREMIUM.", "enum": [ "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED", "NETWORK_TIER_STANDARD", @@ -5448,12 +5412,6 @@ "properties": {}, "type": "object" }, - "RunDiskMigrationJobRequest": { - "description": "Request message for 'RunDiskMigrationJobRequest' request.", - "id": "RunDiskMigrationJobRequest", - "properties": {}, - "type": "object" - }, "SchedulePolicy": { "description": "A policy for scheduling replications.", "id": "SchedulePolicy", diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index a4199c4dd0d..c8eab0e2569 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -232,7 +232,6 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService { rs := &ProjectsLocationsSourcesService{s: s} rs.DatacenterConnectors = NewProjectsLocationsSourcesDatacenterConnectorsService(s) - rs.DiskMigrationJobs = NewProjectsLocationsSourcesDiskMigrationJobsService(s) rs.MigratingVms = NewProjectsLocationsSourcesMigratingVmsService(s) rs.UtilizationReports = NewProjectsLocationsSourcesUtilizationReportsService(s) return rs @@ -243,8 +242,6 @@ type ProjectsLocationsSourcesService struct { DatacenterConnectors *ProjectsLocationsSourcesDatacenterConnectorsService - DiskMigrationJobs *ProjectsLocationsSourcesDiskMigrationJobsService - MigratingVms *ProjectsLocationsSourcesMigratingVmsService UtilizationReports *ProjectsLocationsSourcesUtilizationReportsService @@ -259,15 +256,6 @@ type ProjectsLocationsSourcesDatacenterConnectorsService struct { s *Service } -func NewProjectsLocationsSourcesDiskMigrationJobsService(s *Service) *ProjectsLocationsSourcesDiskMigrationJobsService { - rs := &ProjectsLocationsSourcesDiskMigrationJobsService{s: s} - return rs -} - -type ProjectsLocationsSourcesDiskMigrationJobsService struct { - s *Service -} - func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocationsSourcesMigratingVmsService { rs := &ProjectsLocationsSourcesMigratingVmsService{s: s} rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s) @@ -545,9 +533,6 @@ type AwsSourceDetails struct { // tags that are set as part of the migration process. The tags must not begin // with the reserved prefix `m2vm`. MigrationResourcesUserTags map[string]string `json:"migrationResourcesUserTags,omitempty"` - // NetworkInsights: Output only. Information about the network coniguration of - // the source. Only gatherred upon request. - NetworkInsights *NetworkInsights `json:"networkInsights,omitempty"` // PublicIp: Output only. The source's public IP. All communication initiated // by this source will originate from this IP. PublicIp string `json:"publicIp,omitempty"` @@ -969,11 +954,6 @@ type CancelCloneJobRequest struct { type CancelCutoverJobRequest struct { } -// CancelDiskMigrationJobRequest: Request message for 'CancelDiskMigrationJob' -// request. -type CancelDiskMigrationJobRequest struct { -} - // CancelImageImportJobRequest: Request message for 'CancelImageImportJob' // request. type CancelImageImportJobRequest struct { @@ -1181,6 +1161,16 @@ type ComputeEngineTargetDefaults struct { // AppliedLicense: Output only. The OS license returned from the adaptation // module report. AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"` + // BootConversion: Optional. By default the virtual machine will keep its + // existing boot option. Setting this property will trigger an internal process + // which will convert the virtual machine from using the existing boot option + // to another. + // + // Possible values: + // "BOOT_CONVERSION_UNSPECIFIED" - Unspecified conversion type. + // "NONE" - No conversion. + // "BIOS_TO_EFI" - Convert from BIOS to EFI. + BootConversion string `json:"bootConversion,omitempty"` // BootOption: Output only. The VM Boot Option, as set in the source VM. // // Possible values: @@ -1203,6 +1193,13 @@ type ComputeEngineTargetDefaults struct { // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk // type. DiskType string `json:"diskType,omitempty"` + // EnableIntegrityMonitoring: Optional. Defines whether the instance has + // integrity monitoring enabled. This can be set to true only if the VM boot + // option is EFI, and vTPM is enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + // EnableVtpm: Optional. Defines whether the instance has vTPM enabled. This + // can be set to true only if the VM boot option is EFI. + EnableVtpm bool `json:"enableVtpm,omitempty"` // Encryption: Optional. Immutable. The encryption to apply to the VM disks. Encryption *Encryption `json:"encryption,omitempty"` // Hostname: The hostname to assign to the VM. @@ -1266,6 +1263,16 @@ type ComputeEngineTargetDetails struct { AdditionalLicenses []string `json:"additionalLicenses,omitempty"` // AppliedLicense: The OS license returned from the adaptation module report. AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"` + // BootConversion: Optional. By default the virtual machine will keep its + // existing boot option. Setting this property will trigger an internal process + // which will convert the virtual machine from using the existing boot option + // to another. + // + // Possible values: + // "BOOT_CONVERSION_UNSPECIFIED" - Unspecified conversion type. + // "NONE" - No conversion. + // "BIOS_TO_EFI" - Convert from BIOS to EFI. + BootConversion string `json:"bootConversion,omitempty"` // BootOption: The VM Boot Option, as set in the source VM. // // Possible values: @@ -1288,6 +1295,11 @@ type ComputeEngineTargetDetails struct { // "COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED" - Hyperdisk balanced disk // type. DiskType string `json:"diskType,omitempty"` + // EnableIntegrityMonitoring: Optional. Defines whether the instance has + // integrity monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + // EnableVtpm: Optional. Defines whether the instance has vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` // Encryption: Optional. The encryption to apply to the VM disks. Encryption *Encryption `json:"encryption,omitempty"` // Hostname: The hostname to assign to the VM. @@ -1766,6 +1778,11 @@ type DisksMigrationVmTargetDefaults struct { // ComputeScheduling: Optional. Compute instance scheduling information (if // empty default is used). ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"` + // EnableIntegrityMonitoring: Optional. Defines whether the instance has + // integrity monitoring enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + // EnableVtpm: Optional. Defines whether the instance has vTPM enabled. + EnableVtpm bool `json:"enableVtpm,omitempty"` // Encryption: Optional. The encryption to apply to the VM. Encryption *Encryption `json:"encryption,omitempty"` // Hostname: Optional. The hostname to assign to the VM. @@ -2938,32 +2955,6 @@ func (s MigrationWarning) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// NetworkInsights: Information about the network coniguration of the source. -type NetworkInsights struct { - // SourceNetworkConfig: Output only. The gathered network configuration of the - // source. Presented in json format. - SourceNetworkConfig string `json:"sourceNetworkConfig,omitempty"` - // SourceNetworkTerraform: Output only. The gathered network configuration of - // the source. Presented in terraform format. - SourceNetworkTerraform string `json:"sourceNetworkTerraform,omitempty"` - // ForceSendFields is a list of field names (e.g. "SourceNetworkConfig") 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. "SourceNetworkConfig") 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 NetworkInsights) MarshalJSON() ([]byte, error) { - type NoMethod NetworkInsights - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // NetworkInterface: NetworkInterface represents a NIC of a VM. type NetworkInterface struct { // ExternalIp: Optional. The external IP to define in the NIC. @@ -2974,8 +2965,9 @@ type NetworkInterface struct { InternalIp string `json:"internalIp,omitempty"` // Network: The network to connect the NIC to. Network string `json:"network,omitempty"` - // NetworkTier: Optional. The networking tier used for configuring network - // access configuration. If left empty, will default to PREMIUM. + // NetworkTier: Optional. The networking tier used for optimizing connectivity + // between instances and systems on the internet. Applies only for external + // ephemeral IP addresses. If left empty, will default to PREMIUM. // // Possible values: // "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED" - An unspecified network tier. @@ -3362,11 +3354,6 @@ func (s ReplicationSync) MarshalJSON() ([]byte, error) { type ResumeMigrationRequest struct { } -// RunDiskMigrationJobRequest: Request message for 'RunDiskMigrationJobRequest' -// request. -type RunDiskMigrationJobRequest struct { -} - // SchedulePolicy: A policy for scheduling replications. type SchedulePolicy struct { // IdleDuration: The idle duration between replication stages. @@ -8024,208 +8011,6 @@ func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Do(op return ret, nil } -type ProjectsLocationsSourcesDiskMigrationJobsCancelCall struct { - s *Service - name string - canceldiskmigrationjobrequest *CancelDiskMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels the disk migration job. -// -// - name: The name of the DiskMigrationJob. -func (r *ProjectsLocationsSourcesDiskMigrationJobsService) Cancel(name string, canceldiskmigrationjobrequest *CancelDiskMigrationJobRequest) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { - c := &ProjectsLocationsSourcesDiskMigrationJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceldiskmigrationjobrequest = canceldiskmigrationjobrequest - 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 *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesDiskMigrationJobsCancelCall { - 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 *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceldiskmigrationjobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel") - 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{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "vmmigration.projects.locations.sources.diskMigrationJobs.cancel" 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 *ProjectsLocationsSourcesDiskMigrationJobsCancelCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsSourcesDiskMigrationJobsRunCall struct { - s *Service - name string - rundiskmigrationjobrequest *RunDiskMigrationJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Run: Runs the disk migration job. -// -// - name: The name of the DiskMigrationJob. -func (r *ProjectsLocationsSourcesDiskMigrationJobsService) Run(name string, rundiskmigrationjobrequest *RunDiskMigrationJobRequest) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { - c := &ProjectsLocationsSourcesDiskMigrationJobsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.rundiskmigrationjobrequest = rundiskmigrationjobrequest - 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 *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Context(ctx context.Context) *ProjectsLocationsSourcesDiskMigrationJobsRunCall { - 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 *ProjectsLocationsSourcesDiskMigrationJobsRunCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsSourcesDiskMigrationJobsRunCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.rundiskmigrationjobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:run") - 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{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "vmmigration.projects.locations.sources.diskMigrationJobs.run" 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 *ProjectsLocationsSourcesDiskMigrationJobsRunCall) 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 - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - type ProjectsLocationsSourcesMigratingVmsCreateCall struct { s *Service parent string diff --git a/workflowexecutions/v1/workflowexecutions-api.json b/workflowexecutions/v1/workflowexecutions-api.json index 40e02ac1298..d829cc1715f 100644 --- a/workflowexecutions/v1/workflowexecutions-api.json +++ b/workflowexecutions/v1/workflowexecutions-api.json @@ -199,6 +199,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "deleteExecutionHistory": { + "description": "Deletes all step entries for an execution.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:deleteExecutionHistory", + "httpMethod": "POST", + "id": "workflowexecutions.projects.locations.workflows.executions.deleteExecutionHistory", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the execution for which step entries should be deleted. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:deleteExecutionHistory", + "request": { + "$ref": "DeleteExecutionHistoryRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "exportData": { "description": "Returns all metadata stored about an execution, excluding most data that is already accessible using other API methods.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:exportData", @@ -384,6 +412,22 @@ "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+/stepEntries/[^/]+$", "required": true, "type": "string" + }, + "view": { + "deprecated": true, + "description": "Deprecated field.", + "enum": [ + "EXECUTION_ENTRY_VIEW_UNSPECIFIED", + "EXECUTION_ENTRY_VIEW_BASIC", + "EXECUTION_ENTRY_VIEW_DETAILED" + ], + "enumDescriptions": [ + "The default/unset value.", + "Include basic information in the step entries. All fields in StepEntry are returned except for variable_data.", + "Include all data." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -404,7 +448,7 @@ ], "parameters": { "filter": { - "description": "Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `createTime\u003e\"2023-08-01\" AND state=\"FAILED\"`", + "description": "Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `parent`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `createTime\u003e\"2023-08-01\" AND state=\"FAILED\"`", "location": "query", "type": "string" }, @@ -425,7 +469,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the workflow execution to list entries for. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/", + "description": "Required. Name of the workflow execution to list entries for. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", "required": true, @@ -436,6 +480,22 @@ "format": "int32", "location": "query", "type": "integer" + }, + "view": { + "deprecated": true, + "description": "Deprecated field.", + "enum": [ + "EXECUTION_ENTRY_VIEW_UNSPECIFIED", + "EXECUTION_ENTRY_VIEW_BASIC", + "EXECUTION_ENTRY_VIEW_DETAILED" + ], + "enumDescriptions": [ + "The default/unset value.", + "Include basic information in the step entries. All fields in StepEntry are returned except for variable_data.", + "Include all data." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/stepEntries", @@ -457,7 +517,7 @@ } } }, - "revision": "20240715", + "revision": "20240813", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "Callback": { @@ -497,6 +557,18 @@ "properties": {}, "type": "object" }, + "DeleteExecutionHistoryRequest": { + "description": "Request for the DeleteExecutionHistory method.", + "id": "DeleteExecutionHistoryRequest", + "properties": {}, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, "Error": { "description": "Error describes why the execution was abnormally terminated.", "id": "Error", @@ -1012,6 +1084,11 @@ "format": "google-datetime", "readOnly": true, "type": "string" + }, + "variableData": { + "$ref": "VariableData", + "description": "Output only. The VariableData associated to this step.", + "readOnly": true } }, "type": "object" @@ -1080,6 +1157,20 @@ } }, "type": "object" + }, + "VariableData": { + "description": "VariableData contains the variable data for this step.", + "id": "VariableData", + "properties": { + "variables": { + "additionalProperties": { + "type": "any" + }, + "description": "Variables that are associated with this step.", + "type": "object" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index 17bf51450b9..f060013906a 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -259,6 +259,20 @@ func (s Callback) MarshalJSON() ([]byte, error) { type CancelExecutionRequest struct { } +// DeleteExecutionHistoryRequest: Request for the DeleteExecutionHistory +// method. +type DeleteExecutionHistoryRequest struct { +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use it as +// the request or the response type of an API method. For instance: service Foo +// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + // Error: Error describes why the execution was abnormally terminated. type Error struct { // Context: Human-readable stack trace string. @@ -839,6 +853,8 @@ type StepEntry struct { StepType string `json:"stepType,omitempty"` // UpdateTime: Output only. The most recently updated time of the step entry. UpdateTime string `json:"updateTime,omitempty"` + // VariableData: Output only. The VariableData associated to this step. + VariableData *VariableData `json:"variableData,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -939,6 +955,28 @@ func (s TriggerPubsubExecutionRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VariableData: VariableData contains the variable data for this step. +type VariableData struct { + // Variables: Variables that are associated with this step. + Variables googleapi.RawMessage `json:"variables,omitempty"` + // ForceSendFields is a list of field names (e.g. "Variables") 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. "Variables") 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 VariableData) MarshalJSON() ([]byte, error) { + type NoMethod VariableData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ProjectsLocationsWorkflowsTriggerPubsubExecutionCall struct { s *Service workflow string @@ -1249,6 +1287,110 @@ func (c *ProjectsLocationsWorkflowsExecutionsCreateCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall struct { + s *Service + name string + deleteexecutionhistoryrequest *DeleteExecutionHistoryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DeleteExecutionHistory: Deletes all step entries for an execution. +// +// - name: Name of the execution for which step entries should be deleted. +// Format: +// projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex +// ecution}. +func (r *ProjectsLocationsWorkflowsExecutionsService) DeleteExecutionHistory(name string, deleteexecutionhistoryrequest *DeleteExecutionHistoryRequest) *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall { + c := &ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deleteexecutionhistoryrequest = deleteexecutionhistoryrequest + 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 *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) Context(ctx context.Context) *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall { + 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 *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.deleteexecutionhistoryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteExecutionHistory") + 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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "workflowexecutions.projects.locations.workflows.executions.deleteExecutionHistory" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.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 *ProjectsLocationsWorkflowsExecutionsDeleteExecutionHistoryCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsWorkflowsExecutionsExportDataCall struct { s *Service name string @@ -1850,6 +1992,21 @@ func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) Get(name string return c } +// View sets the optional parameter "view": Deprecated field. +// +// Possible values: +// +// "EXECUTION_ENTRY_VIEW_UNSPECIFIED" - The default/unset value. +// "EXECUTION_ENTRY_VIEW_BASIC" - Include basic information in the step +// +// entries. All fields in StepEntry are returned except for variable_data. +// +// "EXECUTION_ENTRY_VIEW_DETAILED" - Include all data. +func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall) View(view string) *ProjectsLocationsWorkflowsExecutionsStepEntriesGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -1953,7 +2110,7 @@ type ProjectsLocationsWorkflowsExecutionsStepEntriesListCall struct { // // - parent: Name of the workflow execution to list entries for. Format: // projects/{project}/locations/{location}/workflows/{workflow}/executions/{ex -// ecution}/stepEntries/. +// ecution}. func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) List(parent string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall { c := &ProjectsLocationsWorkflowsExecutionsStepEntriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -1963,9 +2120,9 @@ func (r *ProjectsLocationsWorkflowsExecutionsStepEntriesService) List(parent str // Filter sets the optional parameter "filter": Filters applied to the // `[StepEntries.ListStepEntries]` results. The following fields are supported // for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, -// `stepType`, `state`. For details, see AIP-160. For example, if you are using -// the Google APIs Explorer: `state="SUCCEEDED" or `createTime>"2023-08-01" -// AND state="FAILED" +// `stepType`, `parent`, `state`. For details, see AIP-160. For example, if you +// are using the Google APIs Explorer: `state="SUCCEEDED" or +// `createTime>"2023-08-01" AND state="FAILED" func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Filter(filter string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall { c.urlParams_.Set("filter", filter) return c @@ -2007,6 +2164,21 @@ func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) Skip(skip int6 return c } +// View sets the optional parameter "view": Deprecated field. +// +// Possible values: +// +// "EXECUTION_ENTRY_VIEW_UNSPECIFIED" - The default/unset value. +// "EXECUTION_ENTRY_VIEW_BASIC" - Include basic information in the step +// +// entries. All fields in StepEntry are returned except for variable_data. +// +// "EXECUTION_ENTRY_VIEW_DETAILED" - Include all data. +func (c *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall) View(view string) *ProjectsLocationsWorkflowsExecutionsStepEntriesListCall { + c.urlParams_.Set("view", view) + 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/workflows/v1/workflows-api.json b/workflows/v1/workflows-api.json index 6b0fbe3846d..0c7cf710d47 100644 --- a/workflows/v1/workflows-api.json +++ b/workflows/v1/workflows-api.json @@ -485,7 +485,7 @@ } } }, - "revision": "20240710", + "revision": "20240814", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "Empty": { @@ -776,6 +776,20 @@ "description": "Description of the workflow provided by the user. Must be at most 1000 Unicode characters long. This is a workflow-wide field and is not tied to a specific revision.", "type": "string" }, + "executionHistoryLevel": { + "description": "Optional. Describes the level of the execution history feature to apply to this workflow.", + "enum": [ + "EXECUTION_HISTORY_LEVEL_UNSPECIFIED", + "EXECUTION_HISTORY_BASIC", + "EXECUTION_HISTORY_DETAILED" + ], + "enumDescriptions": [ + "The default/unset value.", + "Enable execution history basic feature.", + "Enable execution history detailed feature." + ], + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" diff --git a/workflows/v1/workflows-gen.go b/workflows/v1/workflows-gen.go index 3e6d6fb42a5..a49eb3a4ff6 100644 --- a/workflows/v1/workflows-gen.go +++ b/workflows/v1/workflows-gen.go @@ -541,6 +541,14 @@ type Workflow struct { // most 1000 Unicode characters long. This is a workflow-wide field and is not // tied to a specific revision. Description string `json:"description,omitempty"` + // ExecutionHistoryLevel: Optional. Describes the level of the execution + // history feature to apply to this workflow. + // + // Possible values: + // "EXECUTION_HISTORY_LEVEL_UNSPECIFIED" - The default/unset value. + // "EXECUTION_HISTORY_BASIC" - Enable execution history basic feature. + // "EXECUTION_HISTORY_DETAILED" - Enable execution history detailed feature. + ExecutionHistoryLevel string `json:"executionHistoryLevel,omitempty"` // Labels: Labels associated with this workflow. Labels can contain at most 64 // entries. Keys and values can be no longer than 63 characters and can only // contain lowercase letters, numeric characters, underscores, and dashes. diff --git a/workstations/v1/workstations-api.json b/workstations/v1/workstations-api.json index 25c276048de..cbbb6d77837 100644 --- a/workstations/v1/workstations-api.json +++ b/workstations/v1/workstations-api.json @@ -1195,7 +1195,7 @@ } } }, - "revision": "20240723", + "revision": "20240820", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -2374,6 +2374,10 @@ "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", "type": "string" }, + "grantWorkstationAdminRoleOnCreate": { + "description": "Optional. Grant creator of a workstation `roles/workstations.policyAdmin` role along with `roles/workstations.user` role on the workstation created by them. This allows workstation users to share access to either their entire workstation, or individual ports. Defaults to false.", + "type": "boolean" + }, "host": { "$ref": "Host", "description": "Optional. Runtime host for the workstation." @@ -2390,6 +2394,11 @@ "description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation configuration and that are also propagated to the underlying Compute Engine resources.", "type": "object" }, + "maxUsableWorkstations": { + "description": "Optional. Maximum number of workstations under this config a user can have `workstations.workstation.use` permission on. Only enforced on CreateWorkstation API calls on the user issuing the API request. Can be overridden by: - granting a user workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, or - having a user with that permission create a workstation and granting another user `workstations.workstation.use` permission on that workstation. If not specified defaults to 0 which indicates unlimited.", + "format": "int32", + "type": "integer" + }, "name": { "description": "Identifier. Full name of this workstation configuration.", "type": "string" diff --git a/workstations/v1/workstations-gen.go b/workstations/v1/workstations-gen.go index dbec8df6886..e884f50b230 100644 --- a/workstations/v1/workstations-gen.go +++ b/workstations/v1/workstations-gen.go @@ -1876,6 +1876,12 @@ type WorkstationConfig struct { // delete requests to make sure that the client has an up-to-date value before // proceeding. Etag string `json:"etag,omitempty"` + // GrantWorkstationAdminRoleOnCreate: Optional. Grant creator of a workstation + // `roles/workstations.policyAdmin` role along with `roles/workstations.user` + // role on the workstation created by them. This allows workstation users to + // share access to either their entire workstation, or individual ports. + // Defaults to false. + GrantWorkstationAdminRoleOnCreate bool `json:"grantWorkstationAdminRoleOnCreate,omitempty"` // Host: Optional. Runtime host for the workstation. Host *Host `json:"host,omitempty"` // IdleTimeout: Optional. Number of seconds to wait before automatically @@ -1891,6 +1897,15 @@ type WorkstationConfig struct { // applied to the workstation configuration and that are also propagated to the // underlying Compute Engine resources. Labels map[string]string `json:"labels,omitempty"` + // MaxUsableWorkstations: Optional. Maximum number of workstations under this + // config a user can have `workstations.workstation.use` permission on. Only + // enforced on CreateWorkstation API calls on the user issuing the API request. + // Can be overridden by: - granting a user + // workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, + // or - having a user with that permission create a workstation and granting + // another user `workstations.workstation.use` permission on that workstation. + // If not specified defaults to 0 which indicates unlimited. + MaxUsableWorkstations int64 `json:"maxUsableWorkstations,omitempty"` // Name: Identifier. Full name of this workstation configuration. Name string `json:"name,omitempty"` // PersistentDirectories: Optional. Directories to persist across workstation diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index 9a59a79eed1..9396cd533a3 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -1127,7 +1127,7 @@ } } }, - "revision": "20240803", + "revision": "20240820", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -2356,6 +2356,10 @@ "description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", "type": "string" }, + "grantWorkstationAdminRoleOnCreate": { + "description": "Optional. Grant creator of a workstation `roles/workstations.policyAdmin` role along with `roles/workstations.user` role on the workstation created by them. This allows workstation users to share access to either their entire workstation, or individual ports. Defaults to false.", + "type": "boolean" + }, "host": { "$ref": "Host", "description": "Optional. Runtime host for the workstation." diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 3388f1c8371..63e98651639 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -1941,6 +1941,12 @@ type WorkstationConfig struct { // delete requests to make sure that the client has an up-to-date value before // proceeding. Etag string `json:"etag,omitempty"` + // GrantWorkstationAdminRoleOnCreate: Optional. Grant creator of a workstation + // `roles/workstations.policyAdmin` role along with `roles/workstations.user` + // role on the workstation created by them. This allows workstation users to + // share access to either their entire workstation, or individual ports. + // Defaults to false. + GrantWorkstationAdminRoleOnCreate bool `json:"grantWorkstationAdminRoleOnCreate,omitempty"` // Host: Optional. Runtime host for the workstation. Host *Host `json:"host,omitempty"` // HttpOptions: Optional. HTTP options that customize the behavior of the diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index 4c0e1dfe098..57933503ba4 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -1770,7 +1770,7 @@ "type": "string" }, "part": { - "description": "The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id and snippet.", + "description": "The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id, snippet, and authorDetails.", "location": "query", "repeated": true, "required": true, @@ -4072,7 +4072,7 @@ } } }, - "revision": "20240514", + "revision": "20240814", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -10259,6 +10259,18 @@ "PlaylistStatus": { "id": "PlaylistStatus", "properties": { + "podcastStatus": { + "description": "The playlist's podcast status.", + "enum": [ + "enabled", + "disabled" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "privacyStatus": { "description": "The playlist's privacy status.", "enum": [ diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 87ed93a47c6..90ba46f5453 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -6381,6 +6381,12 @@ func (s PlaylistSnippet) MarshalJSON() ([]byte, error) { } type PlaylistStatus struct { + // PodcastStatus: The playlist's podcast status. + // + // Possible values: + // "enabled" + // "disabled" + PodcastStatus string `json:"podcastStatus,omitempty"` // PrivacyStatus: The playlist's privacy status. // // Possible values: @@ -6388,13 +6394,13 @@ type PlaylistStatus struct { // "unlisted" // "private" PrivacyStatus string `json:"privacyStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "PrivacyStatus") to + // ForceSendFields is a list of field names (e.g. "PodcastStatus") 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. "PrivacyStatus") to include in API + // NullFields is a list of field names (e.g. "PodcastStatus") 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. @@ -13159,7 +13165,8 @@ type LiveChatMessagesListCall struct { // // - liveChatId: The id of the live chat for which comments should be returned. // - part: The *part* parameter specifies the liveChatComment resource parts -// that the API response will include. Supported values are id and snippet. +// that the API response will include. Supported values are id, snippet, and +// authorDetails. func (r *LiveChatMessagesService) List(liveChatId string, part []string) *LiveChatMessagesListCall { c := &LiveChatMessagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.urlParams_.Set("liveChatId", liveChatId)